Closed ian-whitestone closed 2 years ago
@ian-whitestone while those approaches would work, I think the simplest way is to set auto-rotate on the Three orbit controls, as in this example: https://github.com/vasturiano/globe.gl/blob/e7bfcc1408b97713d263838b6e8895d0514f64b5/example/countries-population/index.html#L23-L25
Thanks @vasturiano, apologies for not searching this repo more thoroughly.
I'm curious about the best way to automatically rotate the globe, in order to achieve a similar effect to the Github globe.
Right now I have this code, which appears to be doing the trick.
But I'm wondering if this is the best approach? Another option would be modifying the underlying three-globe object's rotation (i.e.
globeObj.rotation.y += desiredRotationAmount
), but I couldn't find a way to access that object withglobe.gl
(I'm a JS noob, so maybe there is a way?)).Any advice would be greatly appreciated!
Note, if you'd prefer me to ask questions elsewhere, like stackoverflow, lemme know and I will happily move!