crucıble

Terminator

A planet's limb seen from orbit: analytic sphere with fbm continents, ocean sun-glint, drifting clouds, warm night-side city lights and a Rayleigh atmosphere rim under a starfield. The sun slowly orbits and swings with the cursor; the camera rises in on load; clicks flare stacking auroras. Original OGL shader, soft tone-mapped, offscreen-paused, reduced-motion-safe.

oglpro

Installation

CLI

npx shadcn@latest add @crucible/terminator

Manual — install dependencies, then copy the source

npm install ogl

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier for the sun's orbit, planet spin and cloud drift. 1 = default, 0 = still (pointer and clicks still respond).
sunAnglenumber100Resting sun azimuth in degrees. 0 = sun behind the viewer (full day), 90 = sun hard right (terminator through mid-disk), 180 = sun behind the planet (night with a lit rim). The sun slowly orbits ±22° around this.
cityLightsnumber1City-light brightness on the night side, 0–2. 0 hides them.
atmospherestringa clear sky blue-cyanAtmosphere tint — the Rayleigh rim glow and day-side haze. Any hex string.
cloudsnumber0.6Cloud coverage, 0–1. 0 = clear skies.
tone"dark" | "light""dark"Backdrop tone. "dark" = deep starfield; "light" = pale high-altitude sky with the atmosphere as a tinted haze (for light pages).
interactivebooleantruePointer swings the sun (eased, released on leave) and clicks flare an aurora.
pausedbooleanFreeze the scene at its current frame.
refReact.Ref<TerminatorHandle>Imperative handle — see {@link TerminatorHandle}.
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"div">, "children"> — they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.