aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/viz/survive_viewer.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/viz/survive_viewer.js b/tools/viz/survive_viewer.js
index 56ef47f..cbd4fce 100644
--- a/tools/viz/survive_viewer.js
+++ b/tools/viz/survive_viewer.js
@@ -49,6 +49,9 @@ function add_lighthouse(idx, p, q) {
}
function recolorTrackers(when) {
+ if(ctx == undefined)
+ return;
+
for (var key in angles) {
var colors = [];
@@ -501,6 +504,6 @@ function animate() {
}
function render() {
- var use_fpv = $("#fpv")[0].checked;
+ var use_fpv = $("#fpv").length > 0 && $("#fpv")[0].checked;
renderer.render(scene, use_fpv ? fpv_camera : camera);
}