Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…
Show HN: The current sky at your approximate location, as a CSS gradient
81–90 of 171 posts
Re: Show HN: The current sky at your approximate location, as a CSS gradient
#82Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…
The reality is that we have certain conventions that are immediately understandable, and that too much visual complexity results in confusion rather than clarity.
If the sky is hazy white when I expect it to be blue, I'm confused as to whether it's the sky or if the map is still loading. It's adding cognitive complexity for no reason. Stars similarly serve no functional purpose at night.
What you built sounds great for an actual planetary view like Google Earth. And it sounds fun to build. But it's an anti-feature for a navigation view. When you're navigating, simplicity and clarity are paramount. Not realism.
Re: Show HN: The current sky at your approximate location, as a CSS gradient
#83Re: Show HN: The current sky at your approximate location, as a CSS gradient
#84Well, that's delightful. Works really well here in the Pacific Northwest :)
Re: Show HN: The current sky at your approximate location, as a CSS gradient
#85As an old-timer who's not up on all the latest whiz-bang web stuff, I have to ask what is the astro/cloudflare/wrangler magic that allows the following to work: const { latitude = "0", longitude = "0" } = Astro.locals.runtime.cf || {}; I gather you're using some cloudflare feature wrapped in astro to provide lat/long but I don't see the actual plumbing that gets it to you (and I did try to spelunk through a decent am…
There is no visible plumbing because it kinda is magic! Astro provides adapters for different server runtimes (e.g., Vercel, Cloudflare, Netlify), and it's basically just plug and play. The Cloudflare adapter exposes a bunch of bindings [1] through `Astro.locals.runtime`, which can be accessed during each request. The `cf` binding contains incoming request properties [2], including latitude and longitude. These bindi…
Re: Show HN: The current sky at your approximate location, as a CSS gradient
#86Re: Show HN: The current sky at your approximate location, as a CSS gradient
#87Re: Show HN: The current sky at your approximate location, as a CSS gradient
#88Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…
Whipping down the innovator with the stupidity whip. Great management
This is like if you were renovating your house and the drywall guy spends a huge amount of time building up round corners, but you just wanted regular square corners. Then on some drywall forum they're bitching about how "all clients are stupid" or something.
Re: Show HN: The current sky at your approximate location, as a CSS gradient
#89Re: Show HN: The current sky at your approximate location, as a CSS gradient
#90Author of Suncalc here — this is exactly the kind of stuff I love to see my code being used in, thanks for sharing!
Hey, small note that your excellent https://suncalc.net/ is showing an error due to the Google Maps API token having expired. I know that you deeply know map tech :-) but if I may make a suggestion - you might consider switching from Google Maps to Protomaps? https://github.com/protomaps/protomaps-leaflet Cheers