diff --git a/examples/data_visualization/earthquakes_live.js b/examples/data_visualization/earthquakes_live.js index 3498885ff6..f625f9afb0 100644 --- a/examples/data_visualization/earthquakes_live.js +++ b/examples/data_visualization/earthquakes_live.js @@ -185,6 +185,7 @@ function cleanupMarkers() { function cleanupEarth() { Entities.deleteEntity(earth); + Script.update.disconnect(spinEarth); } function cleanupInterval() { @@ -196,7 +197,7 @@ function cleanupInterval() { Script.scriptEnding.connect(cleanupMarkers); Script.scriptEnding.connect(cleanupEarth); Script.scriptEnding.connect(cleanupInterval); -//first draw + getThenProcessQuakes(); var pollingInterval = null; @@ -206,4 +207,17 @@ if (POLL_FOR_CHANGES === true) { cleanupMarkers(); getThenProcessQuakes() }, CHECK_QUAKE_FREQUENCY) -} \ No newline at end of file +} + + +function spinEarth(){ +Entities.editEntity(earth,{ + angularVelocity:{ + x:0, + y:0.5, + z:0 + } +}) +} + +Script.update.connect(spinEarth) \ No newline at end of file