For fun

Planet

A living window onto Earth: the real day/night terminator, city lights coming on across the night side, and the cities watching the sun rise and set at this exact moment. When Osaka is losing the light, San Francisco is just catching it.

A photoreal globe at night showing the day/night terminator and city lights, with the cities at dawn and dusk listed beside a timeline.

The idea

Born on the road, from a traveler's question: the sun is setting here — where is it rising?

Planet started during travels. Checking sunrise and sunset times in one more time zone, the question flipped outward: never mind here — where on Earth is the sun coming up right now? Nothing answered that at a glance, so we built the glance.

A photoreal globe renders the terminator — the moving line between day and night — exactly where it is at this moment, with NASA’s night-lights imagery glowing on the dark side. Beside it, the cities meeting the sun: who is getting first light, who is watching it go. Drag the timeline and the terminator sweeps up to twelve hours either way; release it and the planet snaps back to LIVE.

How it works

There is no backend. The sun's position is computed, not fetched.

Any moment in time can be turned into the spot on Earth where the sun is directly overhead — astronomers call it the subsolar point — using a compact astronomy formula (a solar ephemeris plus the Earth’s rotation angle). No lookup, no service: it is pure math. One clock owns the app’s idea of “now”; the time scrubber never touches anything else, it just shifts that clock.

NASA imagery + the app day & night photos of Earth your browser the whole app runs here — no server behind it downloaded once · works offline after Time scrubber ±12 h · snaps to LIVE Clock one time for the whole app shifts time Solar engine finds the spot on Earth directly under the sun Globe the GPU shades day vs night for every pixel, every frame sharp at any zoom Dawn & dusk panel checks 147 cities: who is at sunrise or sunset right now same moment
One clock drives everything: the same moment shades the globe and picks the cities at dawn and dusk, so the two can never disagree. After first load nothing crosses the boundary — the sun’s position is computed, not fetched.

That one moment feeds two consumers. On the globe, the graphics card compares every pixel with the sun’s direction, so the day/night line stays razor-sharp at any zoom and animates for free — there are no baked day-and-night images to crossfade. In parallel, the same moment is checked against a bundled list of 147 cities: any city where the sun sits within six degrees of the horizon is at dawn or dusk, ranked by population — and when the line crosses open water, the nearest city is shown with minutes to the event.

Decisions worth noting

  • Shader, not textures. Day/night shading is computed per pixel from the sun vector instead of blending pre-baked frames — the terminator stays sharp at any zoom, and animating it costs nothing.
  • Validated, not eyeballed. The solar math is unit-tested against an independent reference implementation (suncalc3, a dev dependency only) — the approximation is checked, not assumed.
  • Offline by design. The app installs as a PWA with textures and shell precached; after the first visit it runs with the network off.
  • Nothing to operate. React and three.js ship as static assets from a Cloudflare Worker — no server code, no API to monitor, nothing to wake up for.

Built with

  • Three.js
  • React
  • TypeScript
  • PWA

This is how we treat the fun stuff

The same care goes into client systems — cloud, network, and security work with a fixed scope and a fixed price, delivered as code you own.