Hello again,
I realize I’m sorta talking to myself here but am gonna give this one more shot.
I know my questions are not nearly as advanced as most but I’d honestly be really grateful for any help, from anyone.
I went off a posters question from this morning and believe I’m spinning the globe correctly now :
spingGlobe( 0.5 )
spinGlobe : function( dynamicRate ){
var viewer = this.viewer;
var scene = this.scene;
var clock = this.clock;
var previousTime = Date.now();
viewer.clock.onTick.addEventListener(function( clock ) {
var spinRate = dynamicRate;
var currentTime = Date.now();
var delta = ( currentTime - previousTime ) / 1000;
previousTime = currentTime;
viewer.scene.camera.rotate(Cesium.Cartesian3.UNIT_Z, -spinRate * delta);
});
}
BUT … when I try to stop it by then invoking : spinGobe( 0.0 ) … it doesn’t work. This only works if I invoke spinGlobe( 0.0 ) the first time. So it seems like you can’t dynamically change the spinRate??
If anyone can help me figure out how to stop the globe rotation so I can properly invoke a different event … man, I’d be so happy!
Thanks,
Scott