mirror of
https://github.com/lubosz/overte.git
synced 2025-04-06 01:02:29 +02:00
removed dead comment
This commit is contained in:
parent
3c12ed3b75
commit
537db37b26
2 changed files with 15 additions and 16 deletions
1
script-archive/dressing_room/.#doppelganger.js
Normal file
1
script-archive/dressing_room/.#doppelganger.js
Normal file
|
@ -0,0 +1 @@
|
|||
dante@0228-DESKTOP-PC.9420:1516899782
|
|
@ -32,7 +32,7 @@ function Doppelganger(avatar) {
|
|||
script: FREEZE_TOGGLER_SCRIPT_URL,
|
||||
userData: JSON.stringify({
|
||||
grabbableKey: {
|
||||
grabbable: true,
|
||||
grabbable: false,
|
||||
wantsTrigger: true
|
||||
}
|
||||
})
|
||||
|
@ -64,7 +64,6 @@ function setJointData(doppelganger, relativeXforms) {
|
|||
var i, l = relativeXforms.length;
|
||||
for (i = 0; i < l; i++) {
|
||||
jointRotations.push(relativeXforms[i].rot);
|
||||
//Entities.setAbsoluteJointRotationInObjectFrame(doppelganger.id, i, relativeXforms[i].rot);
|
||||
}
|
||||
|
||||
Entities.setLocalJointRotations(doppelganger.id, jointRotations);
|
||||
|
@ -206,7 +205,7 @@ function Xform(rot, pos) {
|
|||
};
|
||||
Xform.ident = function () {
|
||||
return new Xform({x: 0, y: 0, z: 0, w: 1}, {x: 0, y: 0, z: 0});
|
||||
}
|
||||
};
|
||||
Xform.mul = function (lhs, rhs) {
|
||||
var rot = Quat.multiply(lhs.rot, rhs.rot);
|
||||
var pos = Vec3.sum(lhs.pos, Vec3.multiplyQbyV(lhs.rot, rhs.pos));
|
||||
|
@ -354,12 +353,12 @@ function getAvatarFootOffset() {
|
|||
if (jointName === "RightToe_End") {
|
||||
toeTop = d.translation.y
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var myPosition = MyAvatar.position;
|
||||
var offset = upperLeg + lowerLeg + foot + toe + toeTop;
|
||||
offset = offset / 100;
|
||||
return offset
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
|
@ -545,15 +544,15 @@ function mirrorEntitiesForDoppelganger(doppelganger, parsedMessage) {
|
|||
baseEntity: baseEntity,
|
||||
doppelganger: doppelganger.id
|
||||
}
|
||||
})
|
||||
});
|
||||
var mirrorEntity = Entities.addEntity(wearableProps);
|
||||
|
||||
var mirrorEntityProps = Entities.getEntityProperties(mirrorEntity)
|
||||
print('MIRROR PROPS::' + JSON.stringify(mirrorEntityProps))
|
||||
var mirrorEntityProps = Entities.getEntityProperties(mirrorEntity);
|
||||
print('MIRROR PROPS::' + JSON.stringify(mirrorEntityProps));
|
||||
var wearablePair = {
|
||||
baseEntity: baseEntity,
|
||||
mirrorEntity: mirrorEntity
|
||||
}
|
||||
};
|
||||
|
||||
wearablePairs.push(wearablePair);
|
||||
}
|
||||
|
@ -563,11 +562,11 @@ function mirrorEntitiesForDoppelganger(doppelganger, parsedMessage) {
|
|||
|
||||
var mirrorEntity = getMirrorEntityForBaseEntity(baseEntity);
|
||||
// print('MIRROR ENTITY, newPosition' + mirrorEntity + ":::" + JSON.stringify(newPosition))
|
||||
Entities.editEntity(mirrorEntity, wearableProps)
|
||||
Entities.editEntity(mirrorEntity, wearableProps);
|
||||
}
|
||||
|
||||
if (action === 'remove') {
|
||||
Entities.deleteEntity(getMirrorEntityForBaseEntity(baseEntity))
|
||||
Entities.deleteEntity(getMirrorEntityForBaseEntity(baseEntity));
|
||||
wearablePairs = wearablePairs.filter(function(obj) {
|
||||
return obj.baseEntity !== baseEntity;
|
||||
});
|
||||
|
@ -575,7 +574,7 @@ function mirrorEntitiesForDoppelganger(doppelganger, parsedMessage) {
|
|||
|
||||
if (action === 'updateBase') {
|
||||
//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 newPosition = Vec3.sum(MyAvatar.position, doppelgangerToMirrorEntity);
|
||||
|
||||
|
@ -596,7 +595,7 @@ function getMirrorEntityForBaseEntity(baseEntity) {
|
|||
if (result.length === 0) {
|
||||
return false;
|
||||
} else {
|
||||
return result[0].mirrorEntity
|
||||
return result[0].mirrorEntity;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -607,13 +606,12 @@ function getBaseEntityForMirrorEntity(mirrorEntity) {
|
|||
if (result.length === 0) {
|
||||
return false;
|
||||
} else {
|
||||
return result[0].baseEntity
|
||||
return result[0].baseEntity;
|
||||
}
|
||||
}
|
||||
|
||||
makeDoppelgangerForMyAvatar();
|
||||
subscribeToWearableMessages();
|
||||
//subscribeToWearableMessagesForAvatar();
|
||||
subscribeToFreezeMessages();
|
||||
|
||||
function cleanup() {
|
||||
|
@ -622,7 +620,7 @@ function cleanup() {
|
|||
}
|
||||
|
||||
doppelgangers.forEach(function(doppelganger) {
|
||||
print('DOPPELGANGER' + doppelganger.id)
|
||||
print('DOPPELGANGER' + doppelganger.id);
|
||||
Entities.deleteEntity(doppelganger.id);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue