Repository navigation
feat(site): sun, planets, eclipses and star labels in the real sky - #2
Merged
Merged
Conversation
Helsinki sits about 6° of latitude south of Ísafjörður, so the same oval is much farther away and lower. The curtains move from 550/900 km to 750/1000 km north: the lower border now sits about 4° above the skyline and the tallest rays reach about 17°, a third of Ísafjörður's height.
The popover now says it is always night here, but the stars, planets, moon and sun are where they really are right now. - Planets: Mercury to Saturn from JPL's Keplerian elements (Standish), with Meeus ch. 41 magnitudes and Saturn's ring tilt. Drawn with the star program, barely twinkling. Within 5′ of astronomy-engine. - Sun: only while it is really up and in frame (summer evenings at Helsinki, summer nights at Ísafjörður, often behind the mountains). An ice-blue disc at true size with a soft glow, a faint, patchy 22° halo and a pillar when low. The sky stays dark. - Moon: the same soft glow as the sun, scaled by phase, and half as bright while the sun is up so the sun always outshines it. - Eclipses: the moon covers the sun (crescent, diamond ring, ice-blue corona at totality), and Earth's shadow crosses the moon (soft penumbra, a dim umbra in the theme's purple where life has copper, a turquoise fringe at its edge). The moon lights the sky less while eclipsed. - Accuracy for eclipses: terrestrial time (ΔT = 69.184 s) for the orbits, the full Meeus lunar tables, and solar aberration plus fitted perturbation terms. Moon within 2–7″ and the sun–moon separation within 17″ of astronomy-engine; the 2026-08-12 eclipse is total at Ísafjörður and 79% at Helsinki, and the 2025-09-07, 2026-03-03 and 2026-08-28 lunar eclipses match the published umbral magnitudes (Danjon's rule).
scripts/build-stars.mjs also writes apps/site/public/star-names.json: the IAU Catalog of Star Names (WGSN) matched to the Bright Star Catalogue by HR number, as [record index, name, constellation]. 324 named stars, 3 KB gzipped. stars.bin is unchanged byte for byte.
Hover (or tap) near the sun, the moon, a planet or one of the 324 IAU-named stars over bare sky and a small label names it, with the constellation for stars: "Capella · Auriga". The page sends the pointer position to the worker at most once a frame and the worker answers with the nearest object that is actually drawn: up, clear of the skyline, bright enough for the site and the moonlight, and in frame. The main thread only places the label. Star names load after the stars, and the popover credits the IAU Working Group on Star Names.
oxfmt --check failed CI on apps/site/public/star-names.json. It is build output served to browsers, kept compact on purpose, so the formatter ignores it like dist.
baldurpan
reviewed
Oct 22, 2026
baldurpan
left a comment
There was a problem hiding this comment.
This is careful work. I checked the parts most likely to go wrong, and they hold up:
- the full Meeus 47.A and 47.B tables (60 rows each, with
E ** |M|applied to the new M = ±2 rows) - the umbra and penumbra radii
uncovered()- the tooltip's projection and magnitude cut, which match
project()andSTAR_VS
I've left two inline comments. The first one matters: a tap never shows a tooltip on a touch screen. The second is cosmetic.
- A tap never showed a label: a touch pointer fires pointerleave on <html> as the finger lifts, which cleared the label before the pick went out. Leaving now only clears for pointers that hover; a touch label stays until the next tap, which replaces or clears it. - A label for something near the left or right edge ran off the screen. Its centre is now clamped to half its width (plus 4 px) from each side, as the below class already handles the top. Found in review by @baldurpan.
Contributor
Author
|
Thanks for the careful review, @baldurpan. Both inline points are fixed in 4513c0c and pushed: touch taps now show labels, and labels stay inside the window at the sides. Replies are on each thread. Lint, format, type check and build pass locally; CI is running. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The landing-page sky now shows everything in its real place, not just the stars and moon, and names what you point at.
Changes
Verification
pnpm lint,pnpm checkandpnpm buildpass on every commit.