Repository navigation
Sky Clock: load Chronicle's shared GPU painter before the sky - #303
Merged
Merged
Conversation
Chronicle's sky now paints through gl_shared.js (SharedGL), the page's one WebGL2 context and slow-device verdict, which the painted crafting benches share. Copy it into vendor/chronicle/ with the current sky files, all unchanged, and load it right before sky_gl.js in the Sky Clock and its test. Fixes #300 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZefPi2DYXfRvFz1WymVFu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZefPi2DYXfRvFz1WymVFu
This was referenced Nov 3, 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.
Requested by Key Maker · project thread
Fixes #300
Security implication: none. Client-side drawing code copied unchanged from Chronicle; no new requests, settings or saved data.
Consumer-verified: Chronicle loads
gl_shared.jsright beforesky_gl.js(internal/templates/layouts/base.templ:318-319on Chronicle main 00fe30a), andsky_gl.js:20stops with a console line whenwindow.SharedGLis missing. The Sky Clock now loads them in that same order.Foundry compatibility: n/a for new Foundry APIs (no Foundry calls change). Not yet run in a live Foundry world; the live check is below and belongs with #210.
Mockup: n/a
What this changes
Chronicle's sky now paints through one shared graphics-card painter,
gl_shared.js(SharedGL), which the painted crafting benches also use (keyxmakerx/Chronicle#2069, ADR-072 there). Without it, the newersky_gl.jsdraws nothing on the graphics card and the Sky Clock falls back to the flat basic sky. This copiesgl_shared.jsand the current sky files intovendor/chronicle/, unchanged, and loadsgl_shared.jsjust beforesky_gl.js.Why
#300, filed when the shared painter went into Chronicle. Copying the files byte-for-byte keeps the module's sky exactly Chronicle's, which the
CHRONICLE_DIRsync test checks.What the refreshed sky files bring along, besides the shared painter:
sky_world.js/sky_pane.js: daylight tinted by the calendar's kind of sun, and the pane'sbodyAt/bodiesUp/overlayhooks used by Chronicle's hand controls. The Sky Clock doesn't pass the calendar's sun yet, so the tint and the coloured disc stay off in Foundry (filed as Sky Clock: show the calendar's kind of sun #302); the hooks are unused here.sky_2d.js,sky_shaders.js: the sun's disc drawn in that colour, on the basic and the painted sky. With no sun passed it is the old disc.Test plan
CHRONICLE_DIR=../Chronicle node --test tools/test-sky-clock.mjs: 18 of 18, including the byte-for-byte match of every vendored sky file against Chronicle main.CHRONICLE_DIR=../Chronicle node --test tools/test-*.mjs: 1671 of 1673. The 2 failures are byte checks for files this PR doesn't touch and that drifted from earlier Chronicle merges:crafting_lib.jsintest-craft-relay.mjs(Refresh the vendored crafting and sky copies from Chronicle main #299) andshop_room.jsintest-shop-room.mjs(Copy Chronicle's shop room again: one comment has drifted #284). Both fail the same way onmain(checked: 30 of 32 there, the same two).tools/check-comment-clutter.sh: OK.node tools/check-package-descriptor.mjs: descriptor unchanged, not needed.Tenet self-check
.ai.md's vendored sky row now namesgl_shared.jsand why it loads first.Stop-and-flag
If during review you find a tenet violation the author missed, flag explicitly citing the tenet by number.
Generated by Claude Code