mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-06 06:38:57 +00:00
At dawn, dusk and night the environment shows the moon in the top-left corner of the scene, behind the plan: computed in the card from the home coordinates and the browser clock (short Meeus series + topocentric parallax, within 1.4° / 1.8 pp of JPL Horizons), one designer image under a continuous phase mask with the lit side always on the left (owner 2026-09-29), a feathered terminator, 3°/3 % thresholds and the 2 s fade of the window rays. Everything but a small gate lives in the lazy moon-runtime chunk, with its own 30 s ticker. General settings: "Sun" becomes "Sun and Moon" with one switch, on for new installations (DEFAULT_CONFIG), off for existing ones. The initial View graph sat 728 B under its budget: the gate is paid for by moving fifteen dialog-only strings of General settings into the lazy settings dictionary (#459) and by one build fingerprint literal instead of three, so the graph ends 4 B above dev. Golden: two new moon scenes, and the two General settings help frames show «Sun and Moon»; the WSL artifact test fixture now models scenes whose first capture awaits acceptance. Issue: #661 User-Visible: yes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
House Plan moon pack 1.0.0
Designer asset for issue #661 (moon in its current phase on the "Follow the Sun" background), variant A: one full-moon image, the phase is applied by the card as an SVG mask (C5).
moon.svg: squareviewBox="0 0 512 512", disc centred at (256, 256), diameter 480 (16 px margin for anti-aliasing). Full moon, front-lit: no terminator, no shadow, no halo or glow outside the disc, no baked phase. Near side, north up, Mare Crisium on the right; the art is never mirrored. Owner 2026-09-29: the lit side is always the left one (as in the designer's phase sequence), waning runs the same states backwards; only the mask flips. Owner 2026-09-30: a distinct state for every day of the lunar month; the mask is continuous, so the card simply uses the daily illumination k. The dark side is not drawn: the card renders the same art at 8 % opacity.- Edge: one radial gradient ring with no hard outer edge (as in the designer's
Figma export): bright rim 0.855-0.90 R, dark outline
#2b3138at 50 % from 0.905 R to 0.92 R (owner 2026-09-29, for a forced white background), then a 1.5-unit fade to transparent by 0.935 R (r 239.4 in the 512 box, inside the 480 disc). The soft limb hides any missing anti-aliasing of the outer edge. - The disc is masked (
<mask>), not clipped: Chrome with GPU rasterisation drawsclip-pathedges without anti-aliasing (seen on Windows), masks are anti-aliased. - Art by JB (Figma,
House-planfile). The Figma export (source/figma-export/Full.svgin the source archive) was normalised for the pack bysource/convert_jb.py: viewBox 200 -> 512 (scale 2.56, disc clipped at r 240), themix-blend-modescreen ring and multiply groups removed (blend modes depend on the stacking context they land in, so the file now composites normally and looks the same everywhere), the three 5-7 % crater layers and the 484-path speckle texture dropped (invisible at 200 px), and each mare "blend" of 22 nested rings thinned to 4 rings (steps 0, 8, 16, 21). The export's screen-blended edge ring is rebuilt as a normal-composited radial gradient (the art is masked at r 230), so the feathered edge is part of the 480 disc and nothing is drawn outside it. Path coordinates rounded to 0.1, gradient offsets kept at 0.001 (svgo.config.mjs). - Vector only: two
radialGradients (disc, edge), onemask, paths. Nofilter,feGaussianBlur,feImage, embedded raster, fonts or external references. 25.6 KB raw, about 9 KB gzip. - Colours: disc
#949493(centre) ->#D6D5D4(rim), maria grey rings#404040 -> whiteunder a 0.2-0.6 group opacity. Checked on the night (#111a27 -> #1f2f3e), dusk (#48536c -> #9a7380) and dawn (#aabdd1 -> #e8c8b7) palettes at 200, 120 and 94 px. pack.json: pack id, version, licence, source link and the disc geometry forscripts/generate-moon-assets.mjs.
JB (justbusiness) supplies this asset for House Plan to use, modify and
distribute under the repository MIT License without separate UI attribution
(LICENSE.md). The reviewed source archive with its SHA-256 is attached to
issue #661. Generated TypeScript (src/moon-art.generated.ts) must not be
edited by hand; regenerate it from this pack.