From a7d2ff7c29bea5fbc044fa0ec25e9b78e84620f6 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Fri, 18 Mar 2016 15:23:53 -0700 Subject: [PATCH] fixed whiteboard markers not hsowing up --- .../DomainContent/Home/reset.js | 40 +++++++++---------- .../DomainContent/Home/whiteboard/wrapper.js | 11 +++-- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index 5be2564e5d..1b7e6e071e 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -90,7 +90,7 @@ }, 2500); Script.setTimeout(function() { - _this.createKineticEntities(); + // _this.createKineticEntities(); _this.createDynamicEntities(); }, 750) @@ -123,11 +123,11 @@ // 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, @@ -139,21 +139,21 @@ z: 0 }); - var myPlant = new Plant({ - x: 1099.8785, - y: 460.3115, - z: -84.7736 - }); + // var myPlant = new Plant({ + // x: 1099.8785, + // y: 460.3115, + // z: -84.7736 + // }); - 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(); diff --git a/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js b/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js index 9294765c80..8f0ec36bb3 100644 --- a/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js @@ -18,7 +18,11 @@ Whiteboard = function(spawnPosition, spawnRotation) { var orientation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z); var markers = []; - var markerRotation = orientation; + var markerRotation = Quat.fromVec3Degrees({ + x: spawnRotation.x + 10, + y: spawnRotation.y - 90, + z: spawnRotation.z + }); var whiteboardPosition = spawnPosition; var whiteboardRotation = orientation; var WHITEBOARD_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/Whiteboard-4.fbx"; @@ -89,7 +93,7 @@ Whiteboard = function(spawnPosition, spawnRotation) { var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser-2.fbx"; - var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(whiteboardRotation))); + var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1)); eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation))); var eraserRotation = markerRotation; @@ -157,8 +161,7 @@ Whiteboard = function(spawnPosition, spawnRotation) { "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-red.fbx", "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-black.fbx", ]; - - var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation))); + var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1)); createMarker(modelURLS[0], markerPosition, { red: 10,