Live data from Hacker News

Show HN: The current sky at your approximate location, as a CSS gradient

sky.dlazaro.ca

61–70 of 171 posts

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#63
post #23
post #13

Opened this up and sat there for a good 20 seconds waiting for something to happen... only to remember it's midnight here.

Maybe someone smarter than me could add stars to the night sky, so it's not just black.

I was just thinking about how to slice up a star map projection, and apply it as an overlay. I don’t do such things often enough to do it quickly, although I can imagine how it could be achieved. I’d imagine someone working in game dev probably could whip up a mechanism for applying coordinates to a star map fairly quickly, but realizing it in pure CSS would probably require exporting all the slices to a folder as SVG squares that are labeled with coordinates, and then using a bit of JS to stitch it all together in the rendered page.

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#65
post #20

@dlazaro, I believe that style={{backgroundColor: bottom}} is not needed in: is not needed.

I actually included that so the tab and status bars are themed on iOS/Safari. Here's someone else's writeup on that: https://medium.com/@evkirkiles/coloring-the-webkit-browser-b...

Today I learned! Thanks

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#69
post #67

21pm in The Netherlands, the sky is a clear blue down to a baby pink right now, however the app shows a black to dark red. Other people are saying it matches exactly for their location so maybe there's some sort of bug?

during the day it was good here, now that it is night it's a bit off for me too

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#70
post #23

Earlier quoted context omitted.

Maybe someone smarter than me could add stars to the night sky, so it's not just black.

I was just thinking about how to slice up a star map projection, and apply it as an overlay. I don’t do such things often enough to do it quickly, although I can imagine how it could be achieved. I’d imagine someone working in game dev probably could whip up a mechanism for applying coordinates to a star map fairly quickly, but realizing it in pure CSS would probably require exporting all the slices to a folder as SV…

I wrote a simple web-based night sky viewer a while ago [1], which renders the 750 brightest stars from coordinates in a data file (along with the moon). It uses D3.js to do fully client-side SVG-based rendering for interactive use, but it could be simplified to render server side to an SVG file. I think the main complication is that by adding stars, a projection needs to be decided on, and you'd need to consider the aspect ratio of the browser window.

[1] https://github.com/mpetroff/nightsky

Post reply on HN