d3-celestial icon indicating copy to clipboard operation
d3-celestial copied to clipboard

How to prevent animation on initial load?

Open alancwoo opened this issue 5 years ago • 2 comments

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

alancwoo avatar Aug 19 '20 13:08 alancwoo

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

oudeicrat avatar Aug 20 '20 09:08 oudeicrat

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.

ofrohn avatar Aug 20 '20 18:08 ofrohn