Repository navigation
Sky Clock: a snow-globe look for the built-in calendar - #209
Merged
Merged
Conversation
Each person can pick the strip or the Sky Clock (new client setting calendarLook). The globe draws Chronicle's own sky code, vendored unchanged, with the day as a weathered stone figure that crumbles into the next number on a day change. It snaps to the nearest free corner, shrinks to a small still globe (replacing the strip's old round clock), and gives the GM a cradle that steps a day or an hour through CalendarSync. The players' snapshot gains the visible moons, hemisphere, weather presets and event sky types the globe needs, still built only from players-audience reads. The shop room and the sky now share one Chronicle page stand-in (vendor-chronicle.mjs). Fixes #208 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GabHbsRZxjJVzRxVEsurj7
The stone figure's chips were cut through it, so the sky showed through as pale spots that read as snow that never melted, and only snow ever touched the stone. Chips are now shadowed hollows with a small nick in the outline, the lichen is darker, and each weather's marks come from the sky's own recipe for it (SkyLooks.resolve): wet stone with running drops (tinted in acid and blood rain), snow and hail on the tops, frost, dew, dust, soot, resting leaves or petals, magic glowing from the cracks, heat bleaching, drained colour. Rain, snow, hail and fog in front of the figure come from the same recipe, and a change of weather fades the old marks out as the new ones roll in. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GabHbsRZxjJVzRxVEsurj7
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.
Fixes #208
Security implication: the players' calendar snapshot gains moons, hemisphere, weather presets and event sky types. All of it is copied field by field from the
?audience=playersreads it was already built from. Hidden moons are dropped before copying, and GM-only events are still left out. There are no new routes, and the API key is untouched.Consumer-verified: Chronicle
static/js/widgets/sky_pane.js:781(SkyPane.Scene, what the globe draws through),sky_events.js:52(parseDayEvents: an event'spayloadis a JSON string{type, moons}),sky_world.js:126(makeSkym(cal)),sky_looks.jsL.resolve/L.spec(each weather's recipe, which the stone marks are read from). These were read at Chronicle main 80dc1f0, and the vendored copies match it byte for byte (CHRONICLE_DIR=../Chronicle node --test tools/test-sky-clock.mjs).Foundry compatibility: not yet run in a real Foundry world. It was checked in Chromium against a stub page with Foundry-style panels. The live checks are in TESTING.md under "Built-in calendar (Sky Clock)" and in #210.
Mockup: signed on Chronicle Sign-offs, card
foundry-timepiece-208(https://claude.ai/artifact/CCAHNue2kR39QpYGJnLbu8). The stone weather is back on the card for one more yes.What this changes
Before: the only built-in calendar was a thin strip, which could shrink to a round clock icon.
After: each person picks the strip or the Sky Clock in Configure Settings → Calendar look.
Why
Key Maker asked for a timepiece like Calendaria's. The design was signed off on the Sign-offs card: the Sky Clock name, date only, every sky effect, the GM cradle, the campaign's calendar only, a per-person look, snapping to corners, and the stone figure.
On approval, Key Maker noted that the weather on the rocks "seems to get stuck" and asked for every weather to be accounted for. The stuck look had a cause in the code. The stone's chipped edges were cut through the figure (
destination-out), so the sky showed through them as pale spots that read as snow that never melted, and pale lichen added to it. Meanwhile only snow ever touched the stone. Chips are now shadowed hollows with a small nick through the outline, and the lichen is darker.This PR targets the release after 2.2.0. T-B3 drove the motion levels and the fallback states.
Load-bearing lines
scripts/sky-clock.mjs: the globe.loadSkyfalls back to a plain gradient if the sky scripts fail.still()paints once below Full motion.setViewruns the crumble, the time glide and the weather roll.weatherOfreads a weather fromSkyLooks.resolve, or fromplainRecipebefore the sky loads.stoneMarksandrestingOnTopsdraw the weather on the stone.crumblemakes chips into hollows.stepwarns and leaves the date alone on a refused write.scripts/_sky-clock.mjs: the pure decisions.clearOfandcradleLayout.skyCalendarandskyEvents.stoneWeather,frontOf,mixWeatherandplainRecipe.framesPerSecond: 0 when hidden, still, shrunk or resting.figureLight.scripts/_calendar-view-model.mjs:buildPlayerSnapshotgains:skyMoons(hidden moons filtered out before mapping)hemispherepreset_idandprecipitationskyA null value stays null and never becomes 0 (
given()).scripts/vendor-chronicle.mjs: one sharedChroniclepage stand-in for the shop room and the sky. It throws rather than replace one another script made.vendor/chronicle/sky_*.js: 8 files copied unchanged from Chronicle.fonts/AlfaSlabOne-Regular.ttf: OFL, with its licence alongside. Chronicle's package scan allows.ttf.Honest deviations from the mockup
SkyLooks.FADE_S) rather than the mockup's 2 seconds.motion_rest.jsis not vendored. The globe rests after its own 20 seconds without input, like the strip.Test plan
node --test tools/test-*.mjs: 1394 pass, 0 fail, 3 skipped. This includestools/test-sky-clock.mjswith 16 tests. WithCHRONICLE_DIRset it runs 17, the extra one comparing the vendored files with Chronicle byte for byte. Four of its tests are new:tools/test-calendar-view-model.mjshas 3 new snapshot tests, andtools/test-settings-form.mjslistscalendarLookas a personal setting.CHRONICLE_DIR=../Chronicle node --test tools/test-sky-clock.mjs: 17 passnode tools/check-package-descriptor.mjs: OK (0 warnings)./tools/check-comment-clutter.sh: OKnode tools/check-error-catalog.mjs: matchesRendered in Chromium on a stub Foundry page with no page errors:
Manual verification in Foundry v14: the TESTING.md "Built-in calendar (Sky Clock)" checks (Check: the Sky Clock globe in a real Foundry v14 world #210)
CI passes
Tenet self-check
.ai.md,CLAUDE.mdandTESTING.mdare updated.