From d1d4a9d6b1f6dacbfe9fdf9789e93fcbf00d66b0 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Tue, 23 Feb 2016 14:48:45 -0800 Subject: [PATCH] adjusted surface position --- .../whiteboardV2/markerEntityScript.js | 17 +++++++++-------- .../whiteboardV2/whiteboardSpawner.js | 11 ++++++----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/homeContent/whiteboardV2/markerEntityScript.js b/examples/homeContent/whiteboardV2/markerEntityScript.js index 4bf90b6562..618a190587 100644 --- a/examples/homeContent/whiteboardV2/markerEntityScript.js +++ b/examples/homeContent/whiteboardV2/markerEntityScript.js @@ -23,7 +23,7 @@ MarkerTip = function() { _this = this; _this.MARKER_TEXTURE_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/textures/markerStroke.png"; - this.strokeForwardOffset = 0.0005; + this.strokeForwardOffset = 0.0001; this.STROKE_FORWARD_OFFSET_INCRERMENT = 0.00001; this.STROKE_WIDTH = 0.003 _this.MAX_MARKER_TO_BOARD_DISTANCE = 1.4; @@ -43,6 +43,9 @@ releaseEquip: function() { _this.resetStroke(); + Overlays.editOverlay(_this.laserPointer, { + visible: false + }); }, @@ -69,14 +72,12 @@ } else { _this.resetStroke(); Overlays.editOverlay(_this.laserPointer, { - visible: true - }) + visible: false + }); } }, - - newStroke: function(position) { _this.strokeBasePosition = position; _this.currentStroke = Entities.addEntity({ @@ -158,9 +159,9 @@ _this.whiteboardNormal = Quat.getFront(whiteboardProps.rotation); _this.laserPointer = Overlays.addOverlay("circle3d", { color: { - red: 200, - green: 10, - blue: 10 + red: 220, + green: 35, + blue: 53 }, solid: true, size: 0.01, diff --git a/examples/homeContent/whiteboardV2/whiteboardSpawner.js b/examples/homeContent/whiteboardV2/whiteboardSpawner.js index 05aaff3565..378bd9ff5c 100644 --- a/examples/homeContent/whiteboardV2/whiteboardSpawner.js +++ b/examples/homeContent/whiteboardV2/whiteboardSpawner.js @@ -13,7 +13,7 @@ Script.include("../../libraries/utils.js") -var orientation = Camera.getOrientation(); +var orientation = MyAvatar.orientation; orientation = Quat.safeEulerAngles(orientation); var markerRotation = Quat.fromVec3Degrees({ x: orientation.x + 10, @@ -52,12 +52,13 @@ var whiteboardSurfacePosition = Vec3.sum(whiteboardPosition, { x: 0.0, y: 0.45, z: 0.0 -}) +}); +whiteboardSurfacePosition = Vec3.sum(whiteboardSurfacePosition, Vec3.multiply(-0.02, Quat.getRight(orientation))); var whiteboardDrawingSurface = Entities.addEntity({ type: "Box", name: "whiteboardDrawingSurface", dimensions: { - x: 1.85, + x: 1.82, y: 1.8, z: 0.04 }, @@ -75,7 +76,7 @@ var whiteboardDrawingSurface = Entities.addEntity({ var WHITEBOARD_RACK_DEPTH = 1.9; -var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser.fbx"; +var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser-2.fbx"; var ERASER_SCRIPT_URL = Script.resolvePath("eraserEntityScript.js"); var eraserPosition = Vec3.sum(MyAvatar.position, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation))); eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getFront(whiteboardRotation))); @@ -102,7 +103,7 @@ var eraser = Entities.addEntity({ x: 0, y: -0.1, z: 0 - } + }, }); createMarkers();