mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 16:41:57 +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());
|
var TRANSFORMER_SCRIPT = Script.resolvePath('transformer.js?' + Math.random());
|
||||||
print('TRANSFORMER SCRIPT ++ '+ TRANSFORMER_SCRIPT)
|
|
||||||
TransformerDoll = function(modelURL, spawnPosition, spawnRotation) {
|
TransformerDoll = function(modelURL, spawnPosition, spawnRotation) {
|
||||||
|
print('SCRIPT REF AT TRANSFORMER CREATE::' + TRANSFORMER_SCRIPT);
|
||||||
var transformerProps = {
|
var transformerProps = {
|
||||||
name: 'hifi-home-dressing-room-little-transformer',
|
name: 'hifi-home-dressing-room-little-transformer',
|
||||||
type: 'Model',
|
type: 'Model',
|
||||||
shapeType: 'box',
|
shapeType: 'box',
|
||||||
position: spawnPosition,
|
position: spawnPosition,
|
||||||
rotation: Quat.fromPitchYawRollDegrees(spawnRotation.x,spawnRotation.y,spawnRotation.z),
|
rotation: Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z),
|
||||||
modelURL: modelURL,
|
modelURL: modelURL,
|
||||||
dynamic: true,
|
dynamic: true,
|
||||||
gravity: {
|
gravity: {
|
||||||
|
@ -25,16 +25,16 @@
|
||||||
'reset': true
|
'reset': true
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
script: TRANSFORMER_SCRIPT
|
// script: TRANSFORMER_SCRIPT
|
||||||
}
|
}
|
||||||
var transformer = Entities.addEntity(transformerProps);
|
var transformer = Entities.addEntity(transformerProps);
|
||||||
Script.setTimeout(function() {
|
// Script.setTimeout(function() {
|
||||||
var actualProps = Entities.getEntityProperties(transformer);
|
// var actualProps = Entities.getEntityProperties(transformer);
|
||||||
var quarterSize = Vec3.multiply(0.25, actualProps.naturalDimensions);
|
// var quarterSize = Vec3.multiply(0.25, actualProps.naturalDimensions);
|
||||||
Entities.editEntity(transformer, {
|
// Entities.editEntity(transformer, {
|
||||||
dimensions: quarterSize
|
// dimensions: quarterSize
|
||||||
});
|
// });
|
||||||
}, 1500)
|
// }, 1500)
|
||||||
|
|
||||||
print('CREATED TRANSFORMER' + transformer);
|
print('CREATED TRANSFORMER' + transformer);
|
||||||
print('at location: ' + JSON.stirngify(transformerProps.position))
|
print('at location: ' + JSON.stirngify(transformerProps.position))
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
createDynamicEntities: function() {
|
createDynamicEntities: function() {
|
||||||
|
return;
|
||||||
print("EBL CREATE DYNAMIC ENTITIES");
|
print("EBL CREATE DYNAMIC ENTITIES");
|
||||||
|
|
||||||
var fishTank = new FishTank({
|
var fishTank = new FishTank({
|
||||||
|
@ -186,6 +186,7 @@
|
||||||
|
|
||||||
|
|
||||||
createKineticEntities: function() {
|
createKineticEntities: function() {
|
||||||
|
return;
|
||||||
var blocks = new Blocks({
|
var blocks = new Blocks({
|
||||||
x: 1097.1383,
|
x: 1097.1383,
|
||||||
y: 460.3790,
|
y: 460.3790,
|
||||||
|
@ -291,13 +292,17 @@
|
||||||
|
|
||||||
var dollLateralSeparation = 0.5;
|
var dollLateralSeparation = 0.5;
|
||||||
dolls.forEach(function(doll, index) {
|
dolls.forEach(function(doll, index) {
|
||||||
|
print('CREATE TRANSFORMER:: ' + doll)
|
||||||
var separation = index * dollLateralSeparation;
|
var separation = index * dollLateralSeparation;
|
||||||
var right = Quat.getRight(dollRotation);
|
var right = Quat.getRight(dollRotation);
|
||||||
var left = Vec3.multiply(-1, right);
|
var left = Vec3.multiply(-1, right);
|
||||||
var howFarLeft = Vec3.multiply(separation, left);
|
var howFarLeft = Vec3.multiply(separation, left);
|
||||||
var distanceToLeft = Vec3.sum(firstDollPosition, howFarLeft);
|
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);
|
var transformer = new TransformerDoll(doll, distanceToLeft, dollRotation);
|
||||||
print('CREATE TRANSFORMER:: ' + doll)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue