mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02: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() {
|
function cleanupEarth() {
|
||||||
Entities.deleteEntity(earth);
|
Entities.deleteEntity(earth);
|
||||||
|
Script.update.disconnect(spinEarth);
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanupInterval() {
|
function cleanupInterval() {
|
||||||
|
@ -196,7 +197,7 @@ function cleanupInterval() {
|
||||||
Script.scriptEnding.connect(cleanupMarkers);
|
Script.scriptEnding.connect(cleanupMarkers);
|
||||||
Script.scriptEnding.connect(cleanupEarth);
|
Script.scriptEnding.connect(cleanupEarth);
|
||||||
Script.scriptEnding.connect(cleanupInterval);
|
Script.scriptEnding.connect(cleanupInterval);
|
||||||
//first draw
|
|
||||||
getThenProcessQuakes();
|
getThenProcessQuakes();
|
||||||
|
|
||||||
var pollingInterval = null;
|
var pollingInterval = null;
|
||||||
|
@ -206,4 +207,17 @@ if (POLL_FOR_CHANGES === true) {
|
||||||
cleanupMarkers();
|
cleanupMarkers();
|
||||||
getThenProcessQuakes()
|
getThenProcessQuakes()
|
||||||
}, CHECK_QUAKE_FREQUENCY)
|
}, 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