Created
July 20, 2020 10:14
-
-
Save RalucaNicola/159a51ad5b0a060015aa2c1274e5fd97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rotate() { | |
if (!view.interacting) { | |
const camera = view.camera.clone(); | |
camera.position.longitude -= 0.2; | |
view.goTo(camera, { animate: false }); | |
requestAnimationFrame(rotate); | |
} | |
} | |
view.when(function () { | |
watchUtils.whenFalseOnce(view, "updating", rotate); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment