Skip to content

Instantly share code, notes, and snippets.

@RalucaNicola
Created July 20, 2020 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RalucaNicola/159a51ad5b0a060015aa2c1274e5fd97 to your computer and use it in GitHub Desktop.
Save RalucaNicola/159a51ad5b0a060015aa2c1274e5fd97 to your computer and use it in GitHub Desktop.
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