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

Is it possible to get only the stars' canvas location?

Open JoBerkner opened this issue 5 years ago • 2 comments

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?

JoBerkner avatar Jan 28 '20 05:01 JoBerkner

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()

ofrohn avatar Feb 02 '20 20:02 ofrohn

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.

ofrohn avatar Jun 05 '20 18:06 ofrohn