mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:18:24 +02:00
dressing room updates
This commit is contained in:
parent
2ef87557fc
commit
0b867713cb
3 changed files with 43 additions and 19 deletions
|
@ -39,6 +39,20 @@
|
||||||
z: 0.2606
|
z: 0.2606
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var PRISCILLA_DIMENSIONS = {
|
||||||
|
//priscilla
|
||||||
|
x: 1.6448,
|
||||||
|
y: 1.6657,
|
||||||
|
z: 0.3078
|
||||||
|
};
|
||||||
|
|
||||||
|
var MATTHEW_DIMENSIONS = {
|
||||||
|
//matthew
|
||||||
|
x: 1.8722,
|
||||||
|
y: 1.8197,
|
||||||
|
z: 0.3666
|
||||||
|
}
|
||||||
|
|
||||||
var _this;
|
var _this;
|
||||||
|
|
||||||
function Transformer() {
|
function Transformer() {
|
||||||
|
@ -54,7 +68,6 @@
|
||||||
print('PRELOAD TRANSFORMER SCRIPT')
|
print('PRELOAD TRANSFORMER SCRIPT')
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
||||||
this.initialProperties = Entities.getEntityProperties(entityID);
|
this.initialProperties = Entities.getEntityProperties(entityID);
|
||||||
// this.transformationSound = SoundCache.getSound(TRANSFORMATION_SOUND_URL);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
collisionWithEntity: function(myID, otherID, collisionInfo) {
|
collisionWithEntity: function(myID, otherID, collisionInfo) {
|
||||||
|
@ -69,14 +82,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// playTransformationSound: function(position) {
|
|
||||||
// print('transformer should play a sound')
|
|
||||||
// Audio.playSound(_this.transformationSound, {
|
|
||||||
// position: position,
|
|
||||||
// volume: 0.5
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
findRotatorBlock: function() {
|
findRotatorBlock: function() {
|
||||||
print('transformer should find rotator block')
|
print('transformer should find rotator block')
|
||||||
var myProps = Entities.getEntityProperties(_this.entityID);
|
var myProps = Entities.getEntityProperties(_this.entityID);
|
||||||
|
@ -89,7 +94,6 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
removeCurrentBigVersion: function(rotatorBlock) {
|
removeCurrentBigVersion: function(rotatorBlock) {
|
||||||
|
@ -125,7 +129,6 @@
|
||||||
dimensions = WILL_DIMENSIONS;
|
dimensions = WILL_DIMENSIONS;
|
||||||
} else if (smallProps.modelURL.indexOf('being_of_light') > -1) {
|
} else if (smallProps.modelURL.indexOf('being_of_light') > -1) {
|
||||||
print('TRANSFORMER IS BEING OF LIGHT')
|
print('TRANSFORMER IS BEING OF LIGHT')
|
||||||
|
|
||||||
dimensions = BEING_OF_LIGHT_DIMENSIONS;
|
dimensions = BEING_OF_LIGHT_DIMENSIONS;
|
||||||
} else if (smallProps.modelURL.indexOf('stylized_female') > -1) {
|
} else if (smallProps.modelURL.indexOf('stylized_female') > -1) {
|
||||||
print('TRANSFORMER IS ARTEMIS')
|
print('TRANSFORMER IS ARTEMIS')
|
||||||
|
@ -133,6 +136,12 @@
|
||||||
} else if (smallProps.modelURL.indexOf('simple_robot') > -1) {
|
} else if (smallProps.modelURL.indexOf('simple_robot') > -1) {
|
||||||
print('TRANSFORMER IS A ROBOT')
|
print('TRANSFORMER IS A ROBOT')
|
||||||
dimensions = ROBOT_DIMENSIONS;
|
dimensions = ROBOT_DIMENSIONS;
|
||||||
|
} else if (smallProps.modelURL.indexOf('priscilla') > -1) {
|
||||||
|
print('TRANSFORMER IS PRISCILLA')
|
||||||
|
dimensions = PRISCILLA_DIMENSIONS;
|
||||||
|
} else if (smallProps.modelURL.indexOf('matthew') > -1) {
|
||||||
|
print('TRANSFORMER IS MATTHEW')
|
||||||
|
dimensions = MATTHEW_DIMENSIONS;
|
||||||
} else {
|
} else {
|
||||||
print('TRANSFORMER IS SOME OTHER');
|
print('TRANSFORMER IS SOME OTHER');
|
||||||
dimensions = smallProps.naturalDimensions;
|
dimensions = smallProps.naturalDimensions;
|
||||||
|
@ -156,8 +165,8 @@
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bigVersionProps.modelURL.indexOf('simple_robot') > -1){
|
if (bigVersionProps.modelURL.indexOf('simple_robot') > -1) {
|
||||||
bigVersionProps.position.y+=0.5;
|
bigVersionProps.position.y += 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bigVersion = Entities.addEntity(bigVersionProps);
|
var bigVersion = Entities.addEntity(bigVersionProps);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
var TRANSFORMER_SCRIPT = Script.resolvePath('transformer.js');
|
var TRANSFORMER_SCRIPT = Script.resolvePath('transformer.js');
|
||||||
|
|
||||||
var AVATAR_COLLISION_HULL = 'atp:/dressingRoom/Avatar-Hull-4.obj';
|
var AVATAR_COLLISION_HULL = 'atp:/dressingRoom/Avatar-Hull-5.obj';
|
||||||
|
|
||||||
TransformerDoll = function(modelURL, spawnPosition, spawnRotation, dimensions) {
|
TransformerDoll = function(modelURL, spawnPosition, spawnRotation, dimensions) {
|
||||||
print('SCRIPT REF AT TRANSFORMER CREATE::' + TRANSFORMER_SCRIPT);
|
print('SCRIPT REF AT TRANSFORMER CREATE::' + TRANSFORMER_SCRIPT);
|
||||||
|
|
|
@ -68,9 +68,9 @@
|
||||||
|
|
||||||
var TRANSFORMER_URL_STYLIZED_FEMALE = 'atp:/dressingRoom/stylized_female.fbx';
|
var TRANSFORMER_URL_STYLIZED_FEMALE = 'atp:/dressingRoom/stylized_female.fbx';
|
||||||
|
|
||||||
var TRANSFORMER_URL_REALISTIC_MALE = '';
|
var TRANSFORMER_URL_PRISCILLA = 'atp:/dressingRoom/priscilla.fbx';
|
||||||
|
|
||||||
var TRANSFORMER_URL_REALISTIC_FEMALE = '';
|
var TRANSFORMER_URL_MATTHEW = 'atp:/dressingRoom/matthew.fbx';
|
||||||
|
|
||||||
Reset.prototype = {
|
Reset.prototype = {
|
||||||
tidying: false,
|
tidying: false,
|
||||||
|
@ -414,7 +414,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var dais = Entities.addEntity(daisProperties);
|
var dais = Entities.addEntity(daisProperties);
|
||||||
print('HOME created dais : ' + dais)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
createTransformers: function() {
|
createTransformers: function() {
|
||||||
|
@ -436,7 +435,9 @@
|
||||||
TRANSFORMER_URL_STYLIZED_FEMALE,
|
TRANSFORMER_URL_STYLIZED_FEMALE,
|
||||||
TRANSFORMER_URL_ROBOT,
|
TRANSFORMER_URL_ROBOT,
|
||||||
TRANSFORMER_URL_BEING_OF_LIGHT,
|
TRANSFORMER_URL_BEING_OF_LIGHT,
|
||||||
TRANSFORMER_URL_WILL
|
TRANSFORMER_URL_WILL,
|
||||||
|
TRANSFORMER_URL_PRISCILLA,
|
||||||
|
TRANSFORMER_URL_MATTHEW
|
||||||
];
|
];
|
||||||
|
|
||||||
var dollDimensions = [{
|
var dollDimensions = [{
|
||||||
|
@ -459,6 +460,16 @@
|
||||||
x: 1.6326,
|
x: 1.6326,
|
||||||
y: 1.6764,
|
y: 1.6764,
|
||||||
z: 0.2606
|
z: 0.2606
|
||||||
|
}, {
|
||||||
|
//priscilla
|
||||||
|
x: 1.6448,
|
||||||
|
y: 1.6657,
|
||||||
|
z: 0.3078
|
||||||
|
}, {
|
||||||
|
//matthew
|
||||||
|
x: 1.8722,
|
||||||
|
y: 1.8197,
|
||||||
|
z: 0.3666
|
||||||
}];
|
}];
|
||||||
|
|
||||||
var TRANSFORMER_SCALE = 0.25;
|
var TRANSFORMER_SCALE = 0.25;
|
||||||
|
@ -474,7 +485,11 @@
|
||||||
var separation = index * dollLateralSeparation;
|
var separation = index * dollLateralSeparation;
|
||||||
var left = Quat.getRight(rotationAsQuat);
|
var left = Quat.getRight(rotationAsQuat);
|
||||||
var distanceToLeft = Vec3.multiply(separation, left);
|
var distanceToLeft = Vec3.multiply(separation, left);
|
||||||
var dollPosition = Vec3.sum(firstDollPosition, distanceToLeft)
|
var dollPosition = Vec3.sum(firstDollPosition, distanceToLeft);
|
||||||
|
if (index === 1) {
|
||||||
|
//special case for robot
|
||||||
|
dollPosition.y += 0.15;
|
||||||
|
}
|
||||||
var transformer = new TransformerDoll(doll, dollPosition, dollRotation,
|
var transformer = new TransformerDoll(doll, dollPosition, dollRotation,
|
||||||
dollDimensions[index]);
|
dollDimensions[index]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue