d3-celestial
d3-celestial copied to clipboard
How to prevent animation on initial load?
I can't seem to figure out how to prevent the animation that occurs on the initial load? It seems to happen on every example provided as well.
There are a number of comments on the site that are asking this question as well: https://armchairastronautics.blogspot.com/p/skymap.html
No matter what I set as the initial center, the map always seems to animate on load
When I set the third value (orientation) of config parameter center to 0, for example center:[0,0,0] my sky doesn't animate. Or you could try setting the ANIMDISTANCE variable in celestial.js (line 9) to some big number, for example 7
If you set follow = "center" in the configuration, it should not animate on load and be set to whatever you put into center, [0,0] by default.
As to your second issue, center:[0,0,0] appears not to work as expected, while ANIMDISTANCE = 2*PI should switch off animation completely, as you found out.