diff --git a/examples/sit.js b/examples/sit.js index f8436a0fc8..3d41ebf64d 100644 --- a/examples/sit.js +++ b/examples/sit.js @@ -285,7 +285,16 @@ function update(deltaTime){ showIndicators(true); } } + + if (location.hostname != oldHost) { + print("Changed domain"); + for (model in models) { + removeIndicators(models[model]); + } + oldHost = location.hostname; + } } +var oldHost = location.hostname; function addIndicators(modelID) { if (modelID.properties.sittingPoints.length > 0) {