Repository navigation
feat(site): constellations on hover, every star labelled, softer fades - #3
Merged
Merged
Conversation
star-names.json now has an entry for all 2887 stars in stars.bin: - The 324 IAU-named stars as before: [index, "Sarin", "Hercules"]. - 1801 more with a Bayer letter or Flamsteed number from the catalogue's name field: [index, "ζ Herculis", "Hercules", 0], where 0 says the label already names the constellation. - The other 762, mostly faint southern stars: [index, "HR 104"]. The constellation names move to scripts/constellation-names.mjs, with their genitives, so the next build script can share them. stars.bin is unchanged byte for byte. 19 KB gzipped, up from 3 KB; it still loads after the stars.
scripts/build-constellations.mjs writes apps/site/public/constellations.json: the 88 stick figures from d3-celestial (Olaf Frohn, BSD-3-Clause, pinned to commit d2e20e1), each vertex matched to the nearest star in stars.bin within 0.2°. Keyed by constellation name as the star labels give it, as flat star index pairs. Serpens' head and tail share one figure. 739 lines; 4 that end on stars fainter than the catalogue's limit are left out. 2.3 KB gzipped. The formatter ignores it, like star-names.json.
- Hover (or tap) any star and its constellation draws itself outward
from that star, line by line, then fades a moment after the pointer
leaves. Moving to another star of the same constellation keeps it.
- The worker projects the figure on each pick: lines follow the great
circle in half-degree steps, stop 6 px short of each star, and break
wherever they pass below the horizon or behind the skyline. The page
draws them as SVG polylines under the cards; nothing runs until a
hover.
- Every star the sky draws now has a label: its IAU name with the
constellation ("Sarin · Hercules"), else its designation ("ζ Herculis").
- Tooltips rise into place out of a soft blur on the theme's enter
timing and fade out, instead of popping. Reduced motion keeps only the
fade.
- The popover credits d3-celestial for the figures.
On hover or focus a card's border brightens and a soft glow fades in on the theme's enter timing; it fades back quicker so moving between cards leaves no trail. The Docs and GitHub buttons do the same, with the glow on its own layer so it never fights the focus ring's box-shadow.
The header set its own border to the bottom edge, but the glass panel's hairline (::before) still outlined all four sides and its top highlight (::after) drew a line along the top. Both are off for the header.
baldurpan
reviewed
Oct 23, 2026
baldurpan
left a comment
There was a problem hiding this comment.
Nice work. I checked the build scripts against the Bright Star Catalogue and the pinned d3-celestial file:
- The Greek-letter map and the superscript digits cover every Bayer name in the catalogue.
- Every figure vertex lands within 0.6′ of its star.
- Every constellation in
star-names.jsonhas a figure.
The header fix in 5e5f023 looks right too.
I found two things, both inline: 20 figure stars that draw nothing when you hover them, and lines that stay where they were drawn when the view changes. I'll approve once both are settled, whether you fix them or answer them.
…the sky
From review:
- 20 stars in the stick figures have no Bayer letter or Flamsteed number,
so their label ("HR 3579") names no constellation and hovering them drew
nothing. The worker now maps each figure star to its figure when the
figures load and falls back to it. Each of the 20 is in one figure only.
- Lines were placed once, in screen pixels, so they stayed behind after a
resize or rotation and drifted off their stars as the sky turned. The
worker now follows the picked object: after a resize and on each
once-a-second sky refresh it picks it again where it is drawn now, or
answers null once it is not drawn. The page moves the existing lines
in place without drawing them again, and tells the worker to stop
following once nothing is shown. The tooltip follows the same way.
baldurpan
approved these changes
Oct 23, 2026
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.
Hovering a star now traces its constellation across the sky, every star the sky draws has a label, and tooltips, cards and buttons fade in instead of popping.
Changes
Verification
pnpm lint,pnpm checkandpnpm buildpass on every commit.stars.binis unchanged byte for byte.