From 9e8f590ffe447812828de375613377cea83a4c76 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 4 Apr 2016 10:06:06 -0700 Subject: [PATCH] plant hull and whiteboard marker delay --- .../DomainContent/Home/growingPlant/wrapper.js | 9 ++++----- .../DomainContent/Home/whiteboard/wrapper.js | 16 ++++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js b/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js index 31dd103455..5091dc7b16 100644 --- a/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js @@ -12,7 +12,7 @@ // var PLANT_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/growingPlantEntityScript.js"); -var WATER_CAN_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/waterCanEntityScript.js"); +var WATER_CAN_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/waterCanEntityScript.js"); Plant = function(spawnPosition, spawnRotation) { var orientation; if (spawnRotation !== undefined) { @@ -57,7 +57,7 @@ Plant = function(spawnPosition, spawnRotation) { y: plantDimensions.y / 2, z: 0 }); - + var plant = Entities.addEntity({ type: "Model", modelURL: PLANT_MODEL_URL, @@ -89,8 +89,7 @@ Plant = function(spawnPosition, spawnRotation) { y: 0.2762, z: 0.4115 }, - shapeType: 'compound', - compoundShapeURL: WATER_CAN_COLLIISION_HULL_URL, + shapeType: 'box', position: waterCanPosition, collisionSoundURL: "atp:/growingPlant/watering_can_drop.L.wav", dynamic: true, @@ -139,7 +138,7 @@ Plant = function(spawnPosition, spawnRotation) { var waterSpoutPosition = Vec3.sum(waterCanPosition, Vec3.multiply(0.21, Quat.getFront(orientation))) var waterSpoutRotation = Quat.multiply(waterCanRotation, Quat.fromPitchYawRollDegrees(10, 0, 0)); - var WATER_SPOUT_NAME = "home_box_waterSpout"; + var WATER_SPOUT_NAME = "home_box_waterSpout"; var waterSpout = Entities.addEntity({ type: "Box", name: WATER_SPOUT_NAME, diff --git a/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js b/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js index 68b8864854..95a6f9b6b9 100644 --- a/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js @@ -10,9 +10,9 @@ // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -var ERASER_SCRIPT_URL = Script.resolvePath("eraserEntityScript.js" ); +var ERASER_SCRIPT_URL = Script.resolvePath("eraserEntityScript.js"); -var MARKER_SCRIPT_URL = Script.resolvePath("markerEntityScript.js" ); +var MARKER_SCRIPT_URL = Script.resolvePath("markerEntityScript.js"); Whiteboard = function(spawnPosition, spawnRotation) { @@ -57,7 +57,7 @@ Whiteboard = function(spawnPosition, spawnRotation) { whiteboardSurfacePosition = Vec3.sum(whiteboardSurfacePosition, Vec3.multiply(-0.02, Quat.getRight(whiteboardRotation))); var moveForwardDistance = 0.02; whiteboardFrontSurfacePosition = Vec3.sum(whiteboardSurfacePosition, Vec3.multiply(-moveForwardDistance, Quat.getFront(whiteboardRotation))); - var WHITEBOARD_SURFACE_NAME = "home_box_whiteboardDrawingSurface"; + var WHITEBOARD_SURFACE_NAME = "home_box_whiteboardDrawingSurface"; var whiteboardSurfaceSettings = { type: "Box", name: WHITEBOARD_SURFACE_NAME, @@ -98,7 +98,7 @@ Whiteboard = function(spawnPosition, spawnRotation) { eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation))); var eraserRotation = markerRotation; - var eraser = Entities.addEntity({ + var eraserProps = { type: "Model", name: "home_model_whiteboardEraser", modelURL: ERASER_MODEL_URL, @@ -153,9 +153,8 @@ Whiteboard = function(spawnPosition, spawnRotation) { } } }) - }); + } - createMarkers(); function createMarkers() { var modelURLS = [ @@ -249,6 +248,11 @@ Whiteboard = function(spawnPosition, spawnRotation) { markers.push(marker); } + var eraser; + Script.setTimeout(function() { + eraser = Entities.addEntity(eraserProps); + createMarkers(); + }, 1500) function cleanup() { print('WHITEBOARD CLEANUP')