vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
1.97k stars 293 forks source link

How to add animation to the globe #143

Closed advaith-unnikrishnan closed 1 year ago

advaith-unnikrishnan commented 1 year ago

Hi @vasturiano Thanks for building this amazing tool. I was using the globe.gl in one of my projects and wanted to add a spin animation to the globe and I encountered an issue.

If you could share any helpful resources it would be great 🙂

vasturiano commented 1 year ago

@advaith-unnikrishnan thanks for reaching out.

You can tell the controls to continuously animate the spin. Like it's done in this example.

https://github.com/vasturiano/globe.gl/blob/e35b68b66362e5199cf3371a9154f9074c39244a/example/world-population/index.html#L35-L37

advaith-unnikrishnan commented 1 year ago

Thanks for the help. It works now.

I have one more question, is it possible to adjust the scale of the globe? In the documentation, I found only the parameters to adjust the height and width of the canvas. If you could help with this it would be great.

vasturiano commented 1 year ago

Scale as in zoom level? If so, you can adjust that using pointOfView.

advaith-unnikrishnan commented 1 year ago

Thanks for the help 🙂