mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:36:56 +02:00
Don't render overlay unless debug
This commit is contained in:
parent
54980f46a9
commit
10ac6bc9ca
1 changed files with 15 additions and 11 deletions
|
@ -17,7 +17,7 @@ var RainSquall = function (properties) {
|
||||||
dropSize = { x: 0.1, y: 0.1, z: 0.1 },
|
dropSize = { x: 0.1, y: 0.1, z: 0.1 },
|
||||||
dropFallSpeed = 1, // m/s
|
dropFallSpeed = 1, // m/s
|
||||||
dropLifetime = 60, // Seconds
|
dropLifetime = 60, // Seconds
|
||||||
debug = false, // Display origin circle
|
debug = false, // Display origin circle; don't use running on Stack Manager
|
||||||
// Other
|
// Other
|
||||||
squallCircle,
|
squallCircle,
|
||||||
SQUALL_CIRCLE_COLOR = { red: 255, green: 0, blue: 0 },
|
SQUALL_CIRCLE_COLOR = { red: 255, green: 0, blue: 0 },
|
||||||
|
@ -84,22 +84,26 @@ var RainSquall = function (properties) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
squallCircle = Overlays.addOverlay("circle3d", {
|
if (debug) {
|
||||||
size: { x: 2 * squallRadius, y: 2 * squallRadius },
|
squallCircle = Overlays.addOverlay("circle3d", {
|
||||||
color: SQUALL_CIRCLE_COLOR,
|
size: { x: 2 * squallRadius, y: 2 * squallRadius },
|
||||||
alpha: SQUALL_CIRCLE_ALPHA,
|
color: SQUALL_CIRCLE_COLOR,
|
||||||
solid: true,
|
alpha: SQUALL_CIRCLE_ALPHA,
|
||||||
visible: debug,
|
solid: true,
|
||||||
position: squallOrigin,
|
visible: debug,
|
||||||
rotation: SQUALL_CIRCLE_ROTATION
|
position: squallOrigin,
|
||||||
});
|
rotation: SQUALL_CIRCLE_ROTATION
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
raindropTimer = Script.setInterval(createRaindrop, 60000 / dropsPerMinute);
|
raindropTimer = Script.setInterval(createRaindrop, 60000 / dropsPerMinute);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tearDown() {
|
function tearDown() {
|
||||||
Script.clearInterval(raindropTimer);
|
Script.clearInterval(raindropTimer);
|
||||||
Overlays.deleteOverlay(squallCircle);
|
if (debug) {
|
||||||
|
Overlays.deleteOverlay(squallCircle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processProperties();
|
processProperties();
|
||||||
|
|
Loading…
Reference in a new issue