mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:54:25 +02:00
return early for now
This commit is contained in:
parent
f099f927e1
commit
a57ba39fdd
2 changed files with 17 additions and 12 deletions
|
@ -1,12 +1,12 @@
|
|||
var TRANSFORMER_SCRIPT = Script.resolvePath('transformer.js?' + Math.random());
|
||||
print('TRANSFORMER SCRIPT ++ '+ TRANSFORMER_SCRIPT)
|
||||
TransformerDoll = function(modelURL, spawnPosition, spawnRotation) {
|
||||
print('SCRIPT REF AT TRANSFORMER CREATE::' + TRANSFORMER_SCRIPT);
|
||||
var transformerProps = {
|
||||
name: 'hifi-home-dressing-room-little-transformer',
|
||||
type: 'Model',
|
||||
shapeType: 'box',
|
||||
position: spawnPosition,
|
||||
rotation: Quat.fromPitchYawRollDegrees(spawnRotation.x,spawnRotation.y,spawnRotation.z),
|
||||
rotation: Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z),
|
||||
modelURL: modelURL,
|
||||
dynamic: true,
|
||||
gravity: {
|
||||
|
@ -25,16 +25,16 @@
|
|||
'reset': true
|
||||
}
|
||||
}),
|
||||
script: TRANSFORMER_SCRIPT
|
||||
// script: TRANSFORMER_SCRIPT
|
||||
}
|
||||
var transformer = Entities.addEntity(transformerProps);
|
||||
Script.setTimeout(function() {
|
||||
var actualProps = Entities.getEntityProperties(transformer);
|
||||
var quarterSize = Vec3.multiply(0.25, actualProps.naturalDimensions);
|
||||
Entities.editEntity(transformer, {
|
||||
dimensions: quarterSize
|
||||
});
|
||||
}, 1500)
|
||||
// Script.setTimeout(function() {
|
||||
// var actualProps = Entities.getEntityProperties(transformer);
|
||||
// var quarterSize = Vec3.multiply(0.25, actualProps.naturalDimensions);
|
||||
// Entities.editEntity(transformer, {
|
||||
// dimensions: quarterSize
|
||||
// });
|
||||
// }, 1500)
|
||||
|
||||
print('CREATED TRANSFORMER' + transformer);
|
||||
print('at location: ' + JSON.stirngify(transformerProps.position))
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
},
|
||||
|
||||
createDynamicEntities: function() {
|
||||
|
||||
return;
|
||||
print("EBL CREATE DYNAMIC ENTITIES");
|
||||
|
||||
var fishTank = new FishTank({
|
||||
|
@ -186,6 +186,7 @@
|
|||
|
||||
|
||||
createKineticEntities: function() {
|
||||
return;
|
||||
var blocks = new Blocks({
|
||||
x: 1097.1383,
|
||||
y: 460.3790,
|
||||
|
@ -291,13 +292,17 @@
|
|||
|
||||
var dollLateralSeparation = 0.5;
|
||||
dolls.forEach(function(doll, index) {
|
||||
print('CREATE TRANSFORMER:: ' + doll)
|
||||
var separation = index * dollLateralSeparation;
|
||||
var right = Quat.getRight(dollRotation);
|
||||
var left = Vec3.multiply(-1, right);
|
||||
var howFarLeft = Vec3.multiply(separation, left);
|
||||
var distanceToLeft = Vec3.sum(firstDollPosition, howFarLeft);
|
||||
print('PARAMS AT CREATE')
|
||||
print('distanceToLeft : ' + JSON.stringify(distanceToLeft))
|
||||
print('dollRotation : ' + JSON.stringify(dollRotation))
|
||||
var transformer = new TransformerDoll(doll, distanceToLeft, dollRotation);
|
||||
print('CREATE TRANSFORMER:: ' + doll)
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue