From 0fd389b02fdf015e9bf8d9610d7f2f88c4a7a4f8 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Mon, 23 Nov 2015 12:53:58 -0800 Subject: [PATCH] remove arrowTest --- examples/toybox/bow/arrowTest.js | 74 -------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 examples/toybox/bow/arrowTest.js diff --git a/examples/toybox/bow/arrowTest.js b/examples/toybox/bow/arrowTest.js deleted file mode 100644 index 98b30e9572..0000000000 --- a/examples/toybox/bow/arrowTest.js +++ /dev/null @@ -1,74 +0,0 @@ - var ARROW_HIT_SOUND_URL = 'http://hifi-content.s3.amazonaws.com/james/bow_and_arrow/sounds/Arrow_impact1.L.wav' - - var ARROW_DIMENSIONS = { - x: 0.02, - y: 0.02, - z: 0.64 - }; - - var ARROW_OFFSET = -0.36; - var ARROW_TIP_OFFSET = 0.32; - var ARROW_GRAVITY = { - x: 0, - y: -4.8, - z: 0 - }; - - var ARROW_MODEL_URL = "http://hifi-content.s3.amazonaws.com/james/bow_and_arrow/models/newarrow_textured.fbx"; - var ARROW_COLLISION_HULL_URL = "http://hifi-content.s3.amazonaws.com/james/bow_and_arrow/models/newarrow_collision_hull.obj"; - - var ARROW_DIMENSIONS = { - x: 0.02, - y: 0.02, - z: 0.64 - }; - - var center = Vec3.sum(Vec3.sum(MyAvatar.position, { - x: 0, - y: 0.5, - z: 0 - }), Vec3.multiply(1.5, Quat.getFront(Camera.getOrientation()))); - - var arrow; - createArrow = function() { - - arrow = Entities.addEntity({ - name: 'Hifi-Arrow', - type: 'Model', - modelURL: ARROW_MODEL_URL, - shapeType: 'compound', - compoundShapeURL: ARROW_COLLISION_HULL_URL, - dimensions: ARROW_DIMENSIONS, - position: center, - collisionsWillMove: false, - ignoreForCollisions: true, - - }); - - return arrow - } - - - createArrow(); - var yRotation = 0; - var rotateInterval = Script.setInterval(function() { - Entities.editEntity(arrow, { - rotation: Quat.fromPitchYawRollDegrees(0, yRotation, 0) - }) - yRotation += 1 - print('changing rotation') - }, 17) - - Script.setTimeout(function() { - Script.clearInterval(rotateInterval) - print('interval cleared') - Entities.editEntity(arrow, { - velocity: { - x: 0.5, - y: 0.25, - z: 1 - }, - collisionsWillMove: true, - }) - print('entity edited') - }, 2000) \ No newline at end of file