diff --git a/examples/entityScripts/sprayPaintCan.js b/examples/entityScripts/sprayPaintCan.js index e1d8a2535b..02ddb91534 100644 --- a/examples/entityScripts/sprayPaintCan.js +++ b/examples/entityScripts/sprayPaintCan.js @@ -98,9 +98,8 @@ green: 20, blue: 150 }, - lifetime: 500, //probably wont be holding longer than this straight + lifetime: 50, //probably wont be holding longer than this straight }); - } this.letGo = function() { @@ -228,7 +227,6 @@ this.unload = function() { Script.update.disconnect(this.update); - Entities.deleteEntity(this.paintStream); this.strokes.forEach(function(stroke) { Entities.deleteEntity(stroke); }); diff --git a/examples/sprayPaintSpawner.js b/examples/sprayPaintSpawner.js index 6d7243cb45..56cf6cccdc 100644 --- a/examples/sprayPaintSpawner.js +++ b/examples/sprayPaintSpawner.js @@ -9,7 +9,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html //Just temporarily using my own bucket here so others can test the entity. Once PR is tested and merged, then the entity script will appear in its proper place in S3, and I wil switch it -var scriptURL = "https://hifi-public.s3.amazonaws.com/eric/scripts/sprayPaintCan.js?=v1"; +var scriptURL = "https://hifi-public.s3.amazonaws.com/eric/scripts/sprayPaintCan.js?=v3"; var modelURL = "https://hifi-public.s3.amazonaws.com/eric/models/paintcan.fbx"; var sprayCan = Entities.addEntity({ @@ -26,12 +26,14 @@ var sprayCan = Entities.addEntity({ collisionsWillMove: true, shapeType: 'box', script: scriptURL, - // gravity: {x: 0, y: -0.5, z: 0}, - // velocity: {x: 0, y: -1, z: 0} + gravity: {x: 0, y: -0.5, z: 0}, + velocity: {x: 0, y: -1, z: 0} }); function cleanup() { - Entities.deleteEntity(sprayCan); + + // Uncomment the below line to delete sprayCan on script reload- for faster iteration during development + // Entities.deleteEntity(sprayCan); } Script.scriptEnding.connect(cleanup);