Today in the Sky
The Time dashboard turns a single effective instant into clocks, daylight, moon phase, sky quality, and calendars. This standalone SVG compresses that idea into one local-time scene.
The production app uses SunCalc for sun and moon positions, a rendered lunar disc, a world-map terminator, and a shared clock that also responds to time travel. Its key architectural idea is consistency: every visual derives from the same instant.
This course visual is deliberately dependency-free. The sun uses a 06:00–18:00 reference arc in the visitor’s local time; the moon uses a synodic-month estimate. It demonstrates the rendering model, not observatory-grade ephemerides.
- Source repo
time- Production astronomy
- SunCalc
- Course calculation
- Local clock + lunar estimate
- Course asset
- New animated SVG
How the SVG becomes “today”
The hidden quadratic path is both the visible daylight arc and a measuring instrument. JavaScript converts local minutes into a 0–1 daylight fraction, asks the path for the point at that length, then translates the sun group there. The rays keep rotating independently because their transform origin stays local to the sun.
The moon starts from a known new moon and reduces elapsed days modulo the average synodic month. The illuminated shape is rebuilt as two sampled curves: the circular limb and a terminator whose width follows the phase angle.
Concept reference: time/src/lib/components/MoonPhase.svelte, time/src/lib/astro/, and the Time project architecture. The scene and dependency-free approximation are original course code; no Time project asset was copied.