From 0b867713cb416d11f4480e9f2e6376d0c7043674 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 2 May 2016 16:26:05 -0700 Subject: [PATCH] dressing room updates --- .../Home/dressingRoom/transformer.js | 35 ++++++++++++------- .../Home/dressingRoom/wrapper.js | 2 +- .../DomainContent/Home/reset.js | 25 ++++++++++--- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/dressingRoom/transformer.js b/unpublishedScripts/DomainContent/Home/dressingRoom/transformer.js index 404658cf6c..7b94120370 100644 --- a/unpublishedScripts/DomainContent/Home/dressingRoom/transformer.js +++ b/unpublishedScripts/DomainContent/Home/dressingRoom/transformer.js @@ -39,6 +39,20 @@ 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; function Transformer() { @@ -54,7 +68,6 @@ print('PRELOAD TRANSFORMER SCRIPT') this.entityID = entityID; this.initialProperties = Entities.getEntityProperties(entityID); - // this.transformationSound = SoundCache.getSound(TRANSFORMATION_SOUND_URL); }, 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() { print('transformer should find rotator block') var myProps = Entities.getEntityProperties(_this.entityID); @@ -89,7 +94,6 @@ return; } }); - }, removeCurrentBigVersion: function(rotatorBlock) { @@ -125,7 +129,6 @@ dimensions = WILL_DIMENSIONS; } else if (smallProps.modelURL.indexOf('being_of_light') > -1) { print('TRANSFORMER IS BEING OF LIGHT') - dimensions = BEING_OF_LIGHT_DIMENSIONS; } else if (smallProps.modelURL.indexOf('stylized_female') > -1) { print('TRANSFORMER IS ARTEMIS') @@ -133,6 +136,12 @@ } else if (smallProps.modelURL.indexOf('simple_robot') > -1) { print('TRANSFORMER IS A ROBOT') 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 { print('TRANSFORMER IS SOME OTHER'); dimensions = smallProps.naturalDimensions; @@ -156,8 +165,8 @@ }), } - if(bigVersionProps.modelURL.indexOf('simple_robot') > -1){ - bigVersionProps.position.y+=0.5; + if (bigVersionProps.modelURL.indexOf('simple_robot') > -1) { + bigVersionProps.position.y += 0.5; } var bigVersion = Entities.addEntity(bigVersionProps); diff --git a/unpublishedScripts/DomainContent/Home/dressingRoom/wrapper.js b/unpublishedScripts/DomainContent/Home/dressingRoom/wrapper.js index c1fe53e49b..458d5997f5 100644 --- a/unpublishedScripts/DomainContent/Home/dressingRoom/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/dressingRoom/wrapper.js @@ -11,7 +11,7 @@ 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) { print('SCRIPT REF AT TRANSFORMER CREATE::' + TRANSFORMER_SCRIPT); diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index 5f548cfd19..a12b7101f9 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -68,9 +68,9 @@ 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 = { tidying: false, @@ -414,7 +414,6 @@ }; var dais = Entities.addEntity(daisProperties); - print('HOME created dais : ' + dais) }, createTransformers: function() { @@ -436,7 +435,9 @@ TRANSFORMER_URL_STYLIZED_FEMALE, TRANSFORMER_URL_ROBOT, TRANSFORMER_URL_BEING_OF_LIGHT, - TRANSFORMER_URL_WILL + TRANSFORMER_URL_WILL, + TRANSFORMER_URL_PRISCILLA, + TRANSFORMER_URL_MATTHEW ]; var dollDimensions = [{ @@ -459,6 +460,16 @@ x: 1.6326, y: 1.6764, 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; @@ -474,7 +485,11 @@ var separation = index * dollLateralSeparation; var left = Quat.getRight(rotationAsQuat); 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, dollDimensions[index]); });