mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 23:33:26 +02:00
Update sprayPaintCan.js
add a header, cleanup
This commit is contained in:
parent
54a51e6b8b
commit
3565d96ffb
1 changed files with 12 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue