feat(viewer): the moon's phase, the Earth with day and night, a robot and a snow globe #7

Merged
dawid merged 1 commit from sky-models into main 2026-11-16 11:30:35 +00:00
Owner

Four of the models from docs/model-ideas.md. They need only the time: no permission, no network, and they work on a laptop too.

The moon on 2026-11-16, the Earth at noon UTC, the robot and the snow globe

ID Model What it shows
0 Moon phase The moon lit as it is now, with a label: the lit share and the next full or new moon
1 Earth, day and night The day side around the point where the sun is overhead now, and a yellow meridian at your time zone
2 Robot A mascot that bobs, looks around, blinks and waves
3 Snow globe A fir tree in a glass dome, the snow drifting down
4-7 The placeholders Moved from IDs 0-3
  • The math is in js/sky.js: low-precision formulas for the sun and the moon. test/sky.test.mjs checks them against the USNO's published equinox, solstice and moon phases of 2024. They agree to within 0.05° and an hour.
  • The land comes from Natural Earth's 1:110m outline, which is public domain. tools/generate-land.mjs turns it into an 11 KB mask with one bit per degree; the download isn't committed.
  • To see another day, add ?date=2026-12-24T18:00Z to the address.
  • Docs: docs/content.md (the models, how they work, the screenshot), the ideas page (status), the device test protocol (now IDs 0-7), the README and the CHANGELOG.

Checks

  • 13 viewer tests pass, among them the bounding-box check that every model stands on the marker.
  • eslint and markdownlint are clean.
  • The image builds and passes its smoke test.
  • The renders show the right phases: 38% waxing on 2026-11-16, full on 2026-11-24, new on 2026-12-09.

To try

The studio viewer at https://8095-dawid.studio.ciepiela.org/ runs this branch. Show it markers 0-3 from the watch or from /markers.html.

Not in this PR

  • The globe and the moon don't know where north is or where the sun stands in the room. North points to the watch's top, and the phase is drawn as it looks from the northern hemisphere.
  • No reaction to wrist movements yet (shaking the snow globe, the robot losing its balance). That comes with the interaction work.
Four of the models from `docs/model-ideas.md`. They need only the time: no permission, no network, and they work on a laptop too. ![The moon on 2026-11-16, the Earth at noon UTC, the robot and the snow globe](https://git.ciepiela.org/dawid/wristmarkcompanion/raw/branch/sky-models/docs/images/models.png) | ID | Model | What it shows | |----|-------|---------------| | 0 | Moon phase | The moon lit as it is now, with a label: the lit share and the next full or new moon | | 1 | Earth, day and night | The day side around the point where the sun is overhead now, and a yellow meridian at your time zone | | 2 | Robot | A mascot that bobs, looks around, blinks and waves | | 3 | Snow globe | A fir tree in a glass dome, the snow drifting down | | 4-7 | The placeholders | Moved from IDs 0-3 | - **The math** is in `js/sky.js`: low-precision formulas for the sun and the moon. `test/sky.test.mjs` checks them against the USNO's published equinox, solstice and moon phases of 2024. They agree to within 0.05° and an hour. - **The land** comes from Natural Earth's 1:110m outline, which is public domain. `tools/generate-land.mjs` turns it into an 11 KB mask with one bit per degree; the download isn't committed. - **To see another day,** add `?date=2026-12-24T18:00Z` to the address. - **Docs:** `docs/content.md` (the models, how they work, the screenshot), the ideas page (status), the device test protocol (now IDs 0-7), the README and the CHANGELOG. ## Checks - 13 viewer tests pass, among them the bounding-box check that every model stands on the marker. - eslint and markdownlint are clean. - The image builds and passes its smoke test. - The renders show the right phases: 38% waxing on 2026-11-16, full on 2026-11-24, new on 2026-12-09. ## To try The studio viewer at https://8095-dawid.studio.ciepiela.org/ runs this branch. Show it markers 0-3 from the watch or from `/markers.html`. ## Not in this PR - The globe and the moon don't know where north is or where the sun stands in the room. North points to the watch's top, and the phase is drawn as it looks from the northern hemisphere. - No reaction to wrist movements yet (shaking the snow globe, the robot losing its balance). That comes with the interaction work.
feat(viewer): the moon's phase, the Earth with day and night, a robot and a snow globe
All checks were successful
CI / checks (pull_request) Successful in 14s
CI / e2e (pull_request) Successful in 1m1s
CI / image (pull_request) Successful in 12s
CI / watch (pull_request) Successful in 14s
379eb1d7aa
Four models from the time alone, with no permission or network: the moon lit as it is
now with its next full or new moon, the Earth's day side around the subsolar point
(sun and moon from low-precision formulas, checked against the USNO's tables), a
waving robot and a snow globe. The globe's land is Natural Earth's (public domain),
an 11 KB one-degree mask from tools/generate-land.mjs. The placeholders move to IDs 4-7;
?date= shows another day.
dawid merged commit 5156e0d1d7 into main 2026-11-16 11:30:35 +00:00
dawid deleted branch sky-models 2026-11-16 11:30:35 +00:00
Sign in to join this conversation.
No description provided.