cleanup spotlights

This commit is contained in:
James B. Pollack 2015-12-10 16:53:13 -08:00
parent efaa30a509
commit 16ab7e74de

View file

@ -476,7 +476,7 @@ function MyController(hand) {
"color": color, "color": color,
"maxParticles": 2000, "maxParticles": 2000,
"lifespan": 1, "lifespan": 1,
"emitRate": 15, "emitRate": 300,
"emitSpeed": 1, "emitSpeed": 1,
"speedSpread": 0, "speedSpread": 0,
"emitOrientation": { "emitOrientation": {
@ -505,7 +505,7 @@ function MyController(hand) {
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
"particleRadius": 0.02, "particleRadius": 0.01,
"radiusSpread": 0, "radiusSpread": 0,
// "radiusStart": 0.01, // "radiusStart": 0.01,
// "radiusFinish": 0.01, // "radiusFinish": 0.01,
@ -583,7 +583,10 @@ function MyController(hand) {
if (this.spotlight === null) { if (this.spotlight === null) {
this.spotlight = Entities.addEntity(lightProperties); this.spotlight = Entities.addEntity(lightProperties);
} else { } else {
// var rotationBetween = Quat.rotationBetween(Vec3.UP, )
// Entities.editEntity(this.spotlight, {
// rotation: lightTransform.q
// })
} }
} }
@ -612,8 +615,10 @@ function MyController(hand) {
} }
this.spotlightOff = function() { this.spotlightOff = function() {
// Entities.deleteEntity(this.spotlight); if (this.spotlight !== null) {
// this.spotlight = null; Overlays.deleteOverlay(this.spotlight);
}
this.spotlight = null;
} }
this.triggerPress = function(value) { this.triggerPress = function(value) {