Solar System
A live 3D solar system in the browser, built from real orbital data
Why I made it
Most solar system pictures are diagrams: planets in a neat row, sizes and positions made up. They look nice but tell you nothing about where things actually are today, or how far apart they really are.
I wanted a scene for the PhasedState site that was both a calm backdrop and something you could explore: real positions, real spin and tilt, and distances that mean something to a person rather than a string of zeros.
What I built
- Planet positions come from the VSOP87 theory (via the astronomia library), pre-baked at build time into a small binary ephemeris file so the browser doesn't do heavy maths on every frame.
- Each planet spins at its real sidereal rate with its real axial tilt; the sun uses a custom GLSL shader, Saturn gets a textured ring and Earth a cloud layer.
- A single time controller drives everything, so the timeline scrubber can run the whole system forward at an hour to a month per second, or snap back to live.
- Distances are shown in AU and km, plus a made-up but intuitive unit: the Earth Rotation Day, how long it would take Earth to roll like a wheel from one body to another.
- The interface is a frosted-glass HUD: a body list, a 'target lock' info card with each planet's facts and its distances to every other body, and a route panel.
What it does
- Opens on the live sky: today's date and planet positions, with orbits and the asteroid belt drawn around the sun.
- Click any planet in the list or in the scene and the camera eases in to orbit it, with a card of its classification, size, day length, orbit and gravity.
- Pick a connection to draw a route line between two bodies and see the distance in AU, km and years:months:days of Earth-rolling.
- 'Simulate route' animates Earth rolling along the line while a counter ticks.
- The timeline lets you play the system forward and watch the planets move along their orbits.
Built with Three.js, WebGL / GLSL, astronomia (VSOP87), Vite, Web Audio API, JavaScript, 2026.