removed dead comment

This commit is contained in:
Dante Ruiz 2018-01-25 16:23:35 -08:00
parent 3c12ed3b75
commit 537db37b26
2 changed files with 15 additions and 16 deletions

View file

@ -0,0 +1 @@
dante@0228-DESKTOP-PC.9420:1516899782

View file

@ -32,7 +32,7 @@ function Doppelganger(avatar) {
script: FREEZE_TOGGLER_SCRIPT_URL, script: FREEZE_TOGGLER_SCRIPT_URL,
userData: JSON.stringify({ userData: JSON.stringify({
grabbableKey: { grabbableKey: {
grabbable: true, grabbable: false,
wantsTrigger: true wantsTrigger: true
} }
}) })
@ -64,7 +64,6 @@ function setJointData(doppelganger, relativeXforms) {
var i, l = relativeXforms.length; var i, l = relativeXforms.length;
for (i = 0; i < l; i++) { for (i = 0; i < l; i++) {
jointRotations.push(relativeXforms[i].rot); jointRotations.push(relativeXforms[i].rot);
//Entities.setAbsoluteJointRotationInObjectFrame(doppelganger.id, i, relativeXforms[i].rot);
} }
Entities.setLocalJointRotations(doppelganger.id, jointRotations); Entities.setLocalJointRotations(doppelganger.id, jointRotations);
@ -206,7 +205,7 @@ function Xform(rot, pos) {
}; };
Xform.ident = function () { Xform.ident = function () {
return new Xform({x: 0, y: 0, z: 0, w: 1}, {x: 0, y: 0, z: 0}); return new Xform({x: 0, y: 0, z: 0, w: 1}, {x: 0, y: 0, z: 0});
} };
Xform.mul = function (lhs, rhs) { Xform.mul = function (lhs, rhs) {
var rot = Quat.multiply(lhs.rot, rhs.rot); var rot = Quat.multiply(lhs.rot, rhs.rot);
var pos = Vec3.sum(lhs.pos, Vec3.multiplyQbyV(lhs.rot, rhs.pos)); var pos = Vec3.sum(lhs.pos, Vec3.multiplyQbyV(lhs.rot, rhs.pos));
@ -354,12 +353,12 @@ function getAvatarFootOffset() {
if (jointName === "RightToe_End") { if (jointName === "RightToe_End") {
toeTop = d.translation.y toeTop = d.translation.y
} }
}) });
var myPosition = MyAvatar.position; var myPosition = MyAvatar.position;
var offset = upperLeg + lowerLeg + foot + toe + toeTop; var offset = upperLeg + lowerLeg + foot + toe + toeTop;
offset = offset / 100; offset = offset / 100;
return offset return offset;
} }
@ -545,15 +544,15 @@ function mirrorEntitiesForDoppelganger(doppelganger, parsedMessage) {
baseEntity: baseEntity, baseEntity: baseEntity,
doppelganger: doppelganger.id doppelganger: doppelganger.id
} }
}) });
var mirrorEntity = Entities.addEntity(wearableProps); var mirrorEntity = Entities.addEntity(wearableProps);
var mirrorEntityProps = Entities.getEntityProperties(mirrorEntity) var mirrorEntityProps = Entities.getEntityProperties(mirrorEntity);
print('MIRROR PROPS::' + JSON.stringify(mirrorEntityProps)) print('MIRROR PROPS::' + JSON.stringify(mirrorEntityProps));
var wearablePair = { var wearablePair = {
baseEntity: baseEntity, baseEntity: baseEntity,
mirrorEntity: mirrorEntity mirrorEntity: mirrorEntity
} };
wearablePairs.push(wearablePair); wearablePairs.push(wearablePair);
} }
@ -563,11 +562,11 @@ function mirrorEntitiesForDoppelganger(doppelganger, parsedMessage) {
var mirrorEntity = getMirrorEntityForBaseEntity(baseEntity); var mirrorEntity = getMirrorEntityForBaseEntity(baseEntity);
// print('MIRROR ENTITY, newPosition' + mirrorEntity + ":::" + JSON.stringify(newPosition)) // print('MIRROR ENTITY, newPosition' + mirrorEntity + ":::" + JSON.stringify(newPosition))
Entities.editEntity(mirrorEntity, wearableProps) Entities.editEntity(mirrorEntity, wearableProps);
} }
if (action === 'remove') { if (action === 'remove') {
Entities.deleteEntity(getMirrorEntityForBaseEntity(baseEntity)) Entities.deleteEntity(getMirrorEntityForBaseEntity(baseEntity));
wearablePairs = wearablePairs.filter(function(obj) { wearablePairs = wearablePairs.filter(function(obj) {
return obj.baseEntity !== baseEntity; return obj.baseEntity !== baseEntity;
}); });
@ -575,7 +574,7 @@ function mirrorEntitiesForDoppelganger(doppelganger, parsedMessage) {
if (action === 'updateBase') { if (action === 'updateBase') {
//this gets called when the mirrored entity gets grabbed. now we move the //this gets called when the mirrored entity gets grabbed. now we move the
var mirrorEntityProperties = Entities.getEntityProperties(message.mirrorEntity) var mirrorEntityProperties = Entities.getEntityProperties(message.mirrorEntity);
var doppelgangerToMirrorEntity = Vec3.subtract(doppelgangerProps.position, mirrorEntityProperties.position); var doppelgangerToMirrorEntity = Vec3.subtract(doppelgangerProps.position, mirrorEntityProperties.position);
var newPosition = Vec3.sum(MyAvatar.position, doppelgangerToMirrorEntity); var newPosition = Vec3.sum(MyAvatar.position, doppelgangerToMirrorEntity);
@ -596,7 +595,7 @@ function getMirrorEntityForBaseEntity(baseEntity) {
if (result.length === 0) { if (result.length === 0) {
return false; return false;
} else { } else {
return result[0].mirrorEntity return result[0].mirrorEntity;
} }
} }
@ -607,13 +606,12 @@ function getBaseEntityForMirrorEntity(mirrorEntity) {
if (result.length === 0) { if (result.length === 0) {
return false; return false;
} else { } else {
return result[0].baseEntity return result[0].baseEntity;
} }
} }
makeDoppelgangerForMyAvatar(); makeDoppelgangerForMyAvatar();
subscribeToWearableMessages(); subscribeToWearableMessages();
//subscribeToWearableMessagesForAvatar();
subscribeToFreezeMessages(); subscribeToFreezeMessages();
function cleanup() { function cleanup() {
@ -622,7 +620,7 @@ function cleanup() {
} }
doppelgangers.forEach(function(doppelganger) { doppelgangers.forEach(function(doppelganger) {
print('DOPPELGANGER' + doppelganger.id) print('DOPPELGANGER' + doppelganger.id);
Entities.deleteEntity(doppelganger.id); Entities.deleteEntity(doppelganger.id);
}); });
} }