diff --git a/unpublishedScripts/DomainContent/Home/whiteboard/eraserEntityScript.js b/unpublishedScripts/DomainContent/Home/whiteboard/eraserEntityScript.js index 9740c7380b..4175c65e96 100644 --- a/unpublishedScripts/DomainContent/Home/whiteboard/eraserEntityScript.js +++ b/unpublishedScripts/DomainContent/Home/whiteboard/eraserEntityScript.js @@ -84,15 +84,20 @@ var otherProps = Entities.getEntityProperties(otherID); if (otherProps.name === 'home_model_homeset') { var userData = getEntityUserData(_this.entityID); - Entities.editEntity(_this.entityID) { + Entities.editEntity(_this.entityID, { position: userData.originalPosition, rotation: userData.originalRotation, velocity: { x: 0, y: -0.01, z: 0 + }, + angularVelocity: { + x: 0, + y: 0, + z: 0 } - } + }); } }, diff --git a/unpublishedScripts/DomainContent/Home/whiteboard/markerEntityScript.js b/unpublishedScripts/DomainContent/Home/whiteboard/markerEntityScript.js index 6440044964..1f07172a45 100644 --- a/unpublishedScripts/DomainContent/Home/whiteboard/markerEntityScript.js +++ b/unpublishedScripts/DomainContent/Home/whiteboard/markerEntityScript.js @@ -67,34 +67,22 @@ visible: false }); - // Once user releases marker, wait a bit then put marker back to its original position and rotation - // Script.setTimeout(function() { - // var userData = getEntityUserData(_this.entityID); - // Entities.editEntity(_this.entityID, { - // position: userData.originalPosition, - // rotation: userData.originalRotation, - // velocity: { - // x: 0, - // y: -0.01, - // z: 0 - // } - // }); - // }, _this.MARKER_RESET_WAIT_TIME); }, collisionWithEntity: function(myID, otherID, collision) { var otherProps = Entities.getEntityProperties(otherID); if (otherProps.name === 'home_model_homeset') { var userData = getEntityUserData(_this.entityID); - Entities.editEntity(_this.entityID) { + Entities.editEntity(_this.entityID, { position: userData.originalPosition, rotation: userData.originalRotation, velocity: { x: 0, y: -0.01, z: 0 - } - } + }, + angularVelocity: {x: 0, y: 0, z: 0} + }) } }, continueEquip: function() { diff --git a/unpublishedScripts/DomainContent/Home/whiteboard/singleSpawner.js b/unpublishedScripts/DomainContent/Home/whiteboard/singleSpawner.js new file mode 100644 index 0000000000..5ed8fbe33f --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/whiteboard/singleSpawner.js @@ -0,0 +1,12 @@ + var whiteboardPath = Script.resolvePath('wrapper.js'); +Script.include(whiteboardPath); + + var whiteboard = new Whiteboard({ + x: 1104, + y: 460.5, + z: -77 + }, { + x: 0, + y: -133, + z: 0 + }); \ No newline at end of file diff --git a/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js b/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js index 95a6f9b6b9..9a292cd4f6 100644 --- a/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/whiteboard/wrapper.js @@ -25,8 +25,14 @@ Whiteboard = function(spawnPosition, spawnRotation) { }); var whiteboardPosition = spawnPosition; var whiteboardRotation = orientation; - var WHITEBOARD_MODEL_URL = "atp:/whiteboard/Whiteboard-4.fbx"; - var WHITEBOARD_COLLISION_HULL_URL = "atp:/whiteboard/whiteboardCollisionHull.obj"; + + // var WHITEBOARD_MODEL_URL = "atp:/whiteboard/Whiteboard-4.fbx"; + // var WHITEBOARD_COLLISION_HULL_URL = "atp:/whiteboard/whiteboardCollisionHull.obj"; + + // EBL REMOVE ME + var WHITEBOARD_MODEL_URL = "https://hifi-content.s3.amazonaws.com/eric/models/Whiteboard-4.fbx"; + var WHITEBOARD_COLLISION_HULL_URL = "https://hifi-content.s3.amazonaws.com/eric/models/whiteboardCollisionHull.obj"; + var whiteboard = Entities.addEntity({ type: "Model", name: "home_model_whiteboard", @@ -92,8 +98,16 @@ Whiteboard = function(spawnPosition, spawnRotation) { var WHITEBOARD_RACK_DEPTH = 1.9; + + + // ************ ERAAAAAAASSSEERRRR ************************************************ + // ******************************************************************************** var ERASER_MODEL_URL = "atp:/whiteboard/eraser-2.fbx"; + // EBL REMOVE ME + var ERASER_MODEL_URL = "https://s3.amazonaws.com/hifi-public/eric/models/eraser.fbx"; + + 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; @@ -156,11 +170,23 @@ Whiteboard = function(spawnPosition, spawnRotation) { } + // ************************************************************************************************* + // ************************************************************************************************* + // ************************************************************************************************* + function createMarkers() { + // var modelURLS = [ + // "atp:/whiteboard/marker-blue.fbx", + // "atp:/whiteboard/marker-red.fbx", + // "atp:/whiteboard/marker-black.fbx", + // ]; + + + // EBL REMOVE ME var modelURLS = [ - "atp:/whiteboard/marker-blue.fbx", - "atp:/whiteboard/marker-red.fbx", - "atp:/whiteboard/marker-black.fbx", + "https://hifi-content.s3.amazonaws.com/eric/models/marker-black.fbx", + "https://hifi-content.s3.amazonaws.com/eric/models/marker-red.fbx", + "https://hifi-content.s3.amazonaws.com/eric/models/marker-blue.fbx", ]; var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1)); @@ -196,7 +222,7 @@ Whiteboard = function(spawnPosition, spawnRotation) { dynamic: true, gravity: { x: 0, - y: -10, + y: -5, z: 0 }, velocity: {