d3-celestial
d3-celestial copied to clipboard
Is it possible to get only the stars' canvas location?
I would like to add a nightsky view into my application where the user can see the nightsky of his current location in the app. I was wondering how I could receive only the canvas coordinates of the stars without rendering the map. Is this possible?
At the moment this app is purely visual, for painting pixels on a canvas. The best way to do it would be to rewrite the redraw function to collect stellar positions and all other data you need in an object and return that instead of drawing it. Then you can set the current view with Celestial.skyview() and call data = Celestial.redraw()
If you are still following, I could provide a function to export the json data for a given configuration, essentially a headless setup without visual display.