From 3565d96ffb19b225798e161cc492e85d860c3240 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Thu, 1 Oct 2015 18:21:15 -0700 Subject: [PATCH] Update sprayPaintCan.js add a header, cleanup --- examples/toys/sprayPaintCan.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/toys/sprayPaintCan.js b/examples/toys/sprayPaintCan.js index 0de95f5d93..5c524a38bc 100644 --- a/examples/toys/sprayPaintCan.js +++ b/examples/toys/sprayPaintCan.js @@ -1,3 +1,14 @@ +// +// sprayPaintCan.js +// examples/entityScripts +// +// Created by Eric Levin on 9/21/15. +// Copyright 2015 High Fidelity, Inc. +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + + (function() { // Script.include("../libraries/utils.js"); //Need absolute path for now, for testing before PR merge and s3 cloning. Will change post-merge @@ -13,7 +24,7 @@ x: 0, y: 0, z: 0 - } + }; // if the trigger value goes below this while held, the can will stop spraying. if it goes above, it will spray var DISABLE_SPRAY_THRESHOLD = 0.5; @@ -129,14 +140,12 @@ } - this.preload = function(entityId) { this.spraying = false; this.entityId = entityId; this.resetKey = "resetMe"; } - this.unload = function() { if (this.paintStream) { Entities.deleteEntity(this.paintStream);