mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
spin the earth for fun
This commit is contained in:
parent
906540272e
commit
7859241ad3
1 changed files with 16 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function spinEarth(){
|
||||
Entities.editEntity(earth,{
|
||||
angularVelocity:{
|
||||
x:0,
|
||||
y:0.5,
|
||||
z:0
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Script.update.connect(spinEarth)
|
Loading…
Reference in a new issue