Peakylight: Chasing Shadows and Finding the True Sunrise in 3D
Disclaimer
This is a bit of a tongue in cheek post, but fits in line with the rest of this project. I wrote this app using mostly Vibe Coding with Gemini CLI as an experiment and had a ton of fun and on theme with that, this post is Vibe Written by the Gemini AI as well. I personally found this project useful for estimating actual sunlight as a location compared to the weather report astronomical sunlight, and hope if you stumbled upon this, that you do too.
Introduction
Have you ever stood in a deep valley or at the foot of a mountain and wondered when the sun would actually hit you? We all know the weather app says sunrise is at 6:30 AM, but if there’s a massive peak to your east, you might be standing in the shade until 9:00 AM.
Enter Peakylight, a fascinating browser-based tool designed to solve exactly that problem. It’s a 3D geographical map that visualizes sun position, terrain shadows, and the real daylight hours for any location on Earth.
Whether you are a landscape photographer scouting the perfect light, a hiker planning a trip, or a homebuyer trying to figure out if that property in the canyon gets any winter sun, Peakylight offers a level of detail that standard maps just can’t match.

How It Works
At its core, Peakylight is an interactive 3D simulation. It allows you to pinpoint a location—via address search, coordinates, or simply clicking on a map—and renders the terrain in three dimensions.
Once you’ve set your spot, the magic happens in the Controls panel. You can adjust the Time of Day and Date to watch shadows stretch and recede across the topography in real-time. It doesn’t just guess; it uses elevation data to calculate exactly where the shadows fall.

Key Features That Impressed Us
1. Astro vs. Topo Sunrise
This is the standout feature. The tool provides two sets of data:
- Astro Sunrise/Sunset: The theoretical time the sun crosses the horizon on a flat plane.
- Topo Sunrise/Sunset: The actual time the sun clears the surrounding terrain.
It even calculates the “Daylight Lost,” telling you exactly how many hours of direct sunlight the mountains are stealing from your day.

2. Customizable Visualization
You aren’t stuck with a single view. You can toggle between different map layers like OpenTopoMap, OpenStreetMap, or World Imagery (satellite view). You can also crank up the Terrain Detail from “Low” to “Ultra” depending on how much processing power you want to use, ensuring crisp ridges and accurate valleys.

3. Powerful Reporting Tools
Peakylight isn’t just a visual toy; it’s a planning tool.
- Monthly Reports: You can generate a full monthly breakdown of sunrise and sunset times.
- PDF Exports: Need to take the data offline? One click exports your report.
- Split-Screen Video: You can even export a video, likely to visualize the sun’s path over time, which is invaluable for explaining lighting conditions to clients or friends.

The Technical Details
Peakylight is built with modern web technologies. The 3D rendering is powered by Three.js, a popular JavaScript library for creating and displaying 3D computer graphics in a web browser. The terrain data is sourced from map services that provide elevation data, which is then used to generate the 3D mesh you see on the screen.
The shadow calculation, or the “magic,” is done by raycasting from the sun’s position. For a given point on the map, the application checks if there is any terrain blocking the “view” to the sun. This is done for many points to create the shadows you see.
The entire application runs in your browser, which is quite an achievement. The source code is available on GitHub if you want to dive in and see how it all works.
Who Is This For?
- Photographers & Cinematographers: Plan your Golden Hour shots with precision.
- Real Estate Buyers: Verify claims about “sunny aspects” in hilly areas.
- Outdoor Enthusiasts: Know when your campsite will turn dark.
- Gardeners: Understand the true solar exposure of your plot.
The Verdict
Peakylight is a brilliant example of how open data (like OpenStreetMap) can be_combined with 3D rendering to create something genuinely useful. It bridges the gap between a standard map and being there in person.
Next time you’re planning an adventure in the mountains, give Peakylight a spin. You might just find those few extra hours of sunshine you were looking for.