Repository navigation
feat(examples): add a MultiCOGLayer explainer - #761
Merged
Merged
Conversation
Spec for an "anatomy of a tile" explainer that follows one Sentinel-2 tile through MultiCOGLayer's pipeline: each band's own tile grid, the covering tiles, stitching, the UV transforms, and sampling. Tracked in #757. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
RasterLayer runs in the slide's OrthographicView with identity reprojection functions, a cartesian coordinate system and a modelMatrix placement; moving the rect keeps the mesh (checked in Chrome), so no custom quad layer is needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The flights were bitmaps, which drew under every composite, so the tiles slid out from under the scene instead of lifting off it. Bitmaps marked `above` now draw after the composites. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the layer does The explainer passed selectSecondaryLevel a one-item list, so the level choice was made by hand. It now builds each band's levels coarsest first, as MultiCOGLayer does, passes the chosen index as secondaryZ, and fetches from that level's image, as the layer's selectImage does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd what the shader runs per Sentinel-2 itself ships JPEG2000; the COGs are the AWS archive's. The band-to-color mapping is the app's choice, not the layer's. And the shader runs once per screen pixel the tile covers, not once per texel of the tile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The white boxes marking where each inset looks disappeared on snow in B04 and B01. They and the inset frames now use the band's color over a dark halo. Co-Authored-By: Claude Opus 5.5 <[email protected]>
loadScene reports each band's header, covering tiles and overview as they arrive, and the loading screen shows a spinner and a bar, so a slow network at a venue reads as loading rather than stuck. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 21, 2026
kylebarron
commented
Oct 21, 2026
kylebarron
left a comment
Member
Author
There was a problem hiding this comment.
Amazing; this will be good to explain from
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Adds
examples/explainers/multi-cog-explainer, a step-by-step animation of howMultiCOGLayerdraws bands stored at different resolutions as one image. Like the reprojection explainer, it works both as a talk prop and on its own.It follows one real Sentinel-2 tile (scene
S2C_18FXJ_20260406_0_L2Aover Torres del Paine, tile (4, 4) of B04) through nine steps:uv * scale + offset, and bars show the values becoming red, green and blue.The explainer doesn't use
MultiCOGLayeritself. It calls the building blocks the layer calls (selectSecondaryLevel,resolveSecondaryTiles,fetchTilesandassembleTiles), so every grid, covering tile, UV transform and texel coordinate on screen comes from the library. It draws composites withRasterLayerand theCompositeBandsmodule. The data is read live from thesentinel-cogsbucket (about 5 MB). At startup the explainer checks each file's geometry againstsrc/scene/constants.ts, and fails with a message naming the band and field if the files have changed.Also included:
dev-docs/specs/2026-10-20-multi-cog-explainer-design.md.As with the reprojection explainer, the code is LLM-generated and unreviewed (see its README).
Closes #757
🤖 Written by Claude Code