From 9ce14a28ed5333d64bf28fabc534323b2b2e7f62 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Tue, 22 Mar 2016 16:30:20 -0700 Subject: [PATCH] clock rotation in progress --- .../cuckooClockMinuteHandEntityScript.js | 1 + .../DomainContent/Home/cuckooClock/wrapper.js | 14 +-- .../DomainContent/Home/reset.js | 94 +++++++++---------- 3 files changed, 55 insertions(+), 54 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/cuckooClock/cuckooClockMinuteHandEntityScript.js b/unpublishedScripts/DomainContent/Home/cuckooClock/cuckooClockMinuteHandEntityScript.js index af2c49205c..e176004958 100644 --- a/unpublishedScripts/DomainContent/Home/cuckooClock/cuckooClockMinuteHandEntityScript.js +++ b/unpublishedScripts/DomainContent/Home/cuckooClock/cuckooClockMinuteHandEntityScript.js @@ -92,6 +92,7 @@ }, unload: function() { + baton.unload(); if (connected === true) { connected = false; Script.update.disconnect(_this.update); diff --git a/unpublishedScripts/DomainContent/Home/cuckooClock/wrapper.js b/unpublishedScripts/DomainContent/Home/cuckooClock/wrapper.js index 01f26cc613..19f37d49c0 100644 --- a/unpublishedScripts/DomainContent/Home/cuckooClock/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/cuckooClock/wrapper.js @@ -50,7 +50,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) { var clockFaceOffset = { x: -0.0345, y: 0.2587, - z: 0.1255 + z: 0.3255 }; var clockFacePosition = Vec3.sum(spawnPosition, clockFaceOffset); clockFace = Entities.addEntity({ @@ -132,11 +132,11 @@ MyCuckooClock = function(spawnPosition, spawnRotation) { modelURL: CLOCK_SECOND_HAND_URL, name: "hifi-home_model_clockSecondHand", position: Vec3.sum(clockFacePosition, clockHandOffset), - // dimensions: { - // x: 0.00263, - // y: 0.0982, - // z: 0.0024 - // }, + dimensions: { + x: 0.0043, + y: 0.1117, + z: 0.0008 + }, color: { red: 200, green: 10, @@ -147,7 +147,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) { y: 0.05, z: 0.5 }, - // rotation: Quat.fromPitchYawRollDegrees(0, 0, secondRollDegrees), + rotation: Quat.fromPitchYawRollDegrees(0, 0, secondRollDegrees), angularDamping: 0, angularVelocity: { x: 0, diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index b85d33cd26..689d857a81 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -89,14 +89,14 @@ _this.showTidyingButton(); _this.playTidyingSound(); - _this.findAndDeleteHomeEntities(); + // _this.findAndDeleteHomeEntities(); Script.setTimeout(function() { _this.showTidyButton(); _this.tidying = false; }, 2500); Script.setTimeout(function() { - _this.createKineticEntities(); + // _this.createKineticEntities(); _this.createDynamicEntities(); }, 750) @@ -118,61 +118,61 @@ createDynamicEntities: function() { - var fishTank = new FishTank({ - x: 1098.9254, - y: 460.5814, - z: -79.1103 - }, { - x: 0, - y: 0, - z: 0 - }); + // var fishTank = new FishTank({ + // x: 1098.9254, + // y: 460.5814, + // z: -79.1103 + // }, { + // x: 0, + // y: 0, + // z: 0 + // }); - var tiltMaze = new TiltMaze({ - x: 1105.5768, - y: 460.3298, - z: -80.4891 - }); + // var tiltMaze = new TiltMaze({ + // x: 1105.5768, + // y: 460.3298, + // z: -80.4891 + // }); - var whiteboard = new Whiteboard({ - x: 1104, - y: 460.5, - z: -77 - }, { - x: 0, - y: -133, - z: 0 - }); + // var whiteboard = new Whiteboard({ + // x: 1104, + // y: 460.5, + // z: -77 + // }, { + // x: 0, + // y: -133, + // z: 0 + // }); - var myPlant = new Plant({ - x: 1099.8785, - y: 460.3115, - z: -84.7736 - }, { - x: 0, - y: 0, - z: 0 - }); + // var myPlant = new Plant({ + // x: 1099.8785, + // y: 460.3115, + // z: -84.7736 + // }, { + // x: 0, + // y: 0, + // z: 0 + // }); - var pingPongGun = new _PingPongGun({ - x: 1101.2123, - y: 460.2328, - z: -65.8513 - }, { - x: 97.3683, - y: 179.0293, - z: 89.9698 - }); + // var pingPongGun = new _PingPongGun({ + // x: 1101.2123, + // y: 460.2328, + // z: -65.8513 + // }, { + // x: 97.3683, + // y: 179.0293, + // z: 89.9698 + // }); //v2.0 // var musicBox = new MusicBox(); //var cuckooClock = new MyCuckooClock(center); var cuckooClock = new MyCuckooClock({ - x: 1105.172, + x: 1105.267, y: 461.44, - z: -81.86 + z: -81.9495 }, { x: 0, - y: 0, + y: -57, z: 0 }); // var doppelganger = new Doppelganger(); @@ -264,7 +264,7 @@ print('JBP after deleting home entities') }, unload: function() { - this.findAndDeleteHomeEntities(); + // this.findAndDeleteHomeEntities(); } }