Repository navigation
feat(milky-way): draw the far galaxy as six baked pictures with a crossfade to its slabs - #1591
Merged
Merged
Conversation
…ssfade to its slabs
…re bake reads it without the renderer
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.
Change
From afar the Milky Way drew its whole 13/13/7 slab bank, up to 33 full-screen layers, even when it was a small disc on the Local Group page. Now, below a projected diameter of 270 CSS px, six baked picture layers draw it; above 300 px the slabs return unchanged.
@cssearth/engine, so the bake fits the pictures with the runtime's own code without depending on the renderer. A rebake reproduces every picture byte for byte.main, and stay off the document until selected.The bake is the opt-in
--far-planesstep; the default replay and all 33 slab PNGs are unchanged. See the Milky Way README.Prepared assets
slice-galaxy.mts … --reuse=… --far-planes).node packages/bake/cli/publish-runtime-assets.mts --object=milky-way-volume);check-assets-publishedfinds all 62 keys live.inventory.json, and no baked files.The new files are
b30-far-planes/side.png(501,543 bytes),side-high.png(627,691),z.png(252,412) andz-high.png(251,729), plus the refreshedvolume.json.Evidence and limits
Light: compositing the mounted pictures matches the decoded slab bank within the 5% total-light limit at all 65 test views (azimuth 0°–90° every 7.5°, five elevations), worst 0.313%. Three low-elevation checks at 45° are worst 0.701%. Per-pixel error reaches 10.4% (27.8% at low elevation); no per-pixel limit is asserted. In the browser, the galaxy's light across a vertical orbit matched the slabs within about 1%.
Phone (Galaxy S23, Chrome, dev server): a hand-driven zoom and drag through the exchange and back was traced with the jankmonster categories. It had no tile-memory shortfall and no frame with missing content (3,325 frames). Its longest frame was 272 ms, when the slabs joined. A session without the crossfade had one of 136 ms.
Guarantees with tests that fail when removed:
Clean:
pnpm typecheck, eslint on the touched packages,check-no-hashes,check-prepared-delivery,check-no-variables,check-color-spelling, and the renderer, objects and bake tests for these files.Known: after a coast across more than one 22.5° side view, the next pair of views appears when the camera stops.