From 8d80c06f02eedad5c5d7a9395152a87d902d3739 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Mon, 21 Dec 2015 18:26:28 -0800 Subject: [PATCH] updated ravestick model --- examples/flowArts/raveStick/raveStick.js | 50 +------------------ .../raveStick/raveStickEntityScript.js | 5 +- 2 files changed, 5 insertions(+), 50 deletions(-) diff --git a/examples/flowArts/raveStick/raveStick.js b/examples/flowArts/raveStick/raveStick.js index 79c281de47..1e49c525f2 100644 --- a/examples/flowArts/raveStick/raveStick.js +++ b/examples/flowArts/raveStick/raveStick.js @@ -77,61 +77,13 @@ RaveStick = function(spawnPosition) { green: 200, blue: 40 }; - var props = { - type: "ParticleEffect", - position: position, - parentID: stick, - isEmitting: true, - name: "raveBeam", - colorStart: color, - colorSpread: { - red: 200, - green: 10, - blue: 10 - }, - color: { - red: 200, - green: 200, - blue: 255 - }, - colorFinish: color, - maxParticles: 100000, - lifespan: 1, - emitRate: 1000, - emitOrientation: forwardQuat, - emitSpeed: 0.2, - speedSpread: 0.0, - polarStart: 0, - polarFinish: 0.0, - azimuthStart: .1, - azimuthFinish: 0.01, - emitAcceleration: { - x: 0, - y: 0, - z: 0 - }, - accelerationSpread: { - x: .00, - y: .00, - z: .00 - }, - radiusStart: 0.03, - radiusFinish: 0.025, - alpha: 0.7, - alphaSpread: 0.1, - alphaStart: 0.5, - alphaFinish: 0.5, - textures: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/textures/beamParticle.png", - emitterShouldTrail: false, - } - var beam = Entities.addEntity(props); + function cleanup() { Entities.deleteEntity(stick); Entities.deleteEntity(light); - Entities.deleteEntity(beam); } this.cleanup = cleanup; diff --git a/examples/flowArts/raveStick/raveStickEntityScript.js b/examples/flowArts/raveStick/raveStickEntityScript.js index 2fc51f6821..5a37a9b313 100644 --- a/examples/flowArts/raveStick/raveStickEntityScript.js +++ b/examples/flowArts/raveStick/raveStickEntityScript.js @@ -73,7 +73,7 @@ var forwardVec = Quat.getFront(Quat.multiply(props.rotation, Quat.fromPitchYawRollDegrees(-90, 0, 0))); forwardVec = Vec3.normalize(forwardVec); var forwardQuat = orientationOf(forwardVec); - var position = Vec3.sum(props.position, Vec3.multiply(Quat.getFront(props.rotation), 0.2)); + var position = Vec3.sum(props.position, Vec3.multiply(Quat.getFront(props.rotation), 0.04)); var localPoint = Vec3.subtract(position, this.trailBasePosition); if (this.points.length >= 1 && Vec3.distance(localPoint, this.points[this.points.length - 1]) < MIN_POINT_DISTANCE) { //Need a minimum distance to avoid binormal NANs @@ -114,6 +114,9 @@ }, releaseGrab: function() { + if(!this.trailEraseInterval) { + return; + } Script.setTimeout(function() { Script.clearInterval(_this.trailEraseInterval); _this.trailEraseInterval = null;