Hey guys, I was messing around with trying to get the globe to spin and I was able to make it spin everytime I called the function, but it seems like everytime the function is called the globe begins to increase in rotation speed.
I tried looking at the Camera API to try and find a resolution to it, as well as on here and google. The best answer I've gotten is to initialize the event listener as a variable and remove it as such, but i'm unsure how to do that and still call it inside a function. I've also tried removing the event listener at the end of the function and that didn't work too (maybe i'm calling it wrong?) Anyways, any help would be greatly appreciated!
function startSpin(){
viewer.clock.onTick.addEventListener(function(clock) {
scene.camera.rotateRight(.005);
});
}