mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 02:42:52 +02:00
cleanup spotlights
This commit is contained in:
parent
efaa30a509
commit
16ab7e74de
1 changed files with 10 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue