Repository navigation
feat(examples): add reprojection explainer - #696
Merged
Merged
Conversation
A six-step animation of how deck.gl-raster reprojects a raster on the GPU. The NLCD land cover image, stored in Albers equal-area, is cut into the mesh that RasterReprojector builds, the refinement is replayed split by split, and every triangle is drawn into its Web Mercator position by a small textured-triangle layer: the same mechanism the animation explains. Each step has a title and an optional description, and a control bar (previous/next, step dots, replay, a slider over the refinement splits) makes it usable without a presenter. Also adds a card to the docs examples gallery and the design spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The explainer's code is LLM-generated and unreviewed, so it shouldn't sit with the examples meant for learning and reuse. It moves to a new examples/explainers/ folder, with its own "Explainers" section on the docs examples page and in examples/README.md. Both say the code is unreviewed. The published URL stays flat (/examples/reprojection-explainer/): the docs workflow builds examples/explainers/*/ and drops the folder name, as it already does for examples/experimental/. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Impressive reprojection explainer! |
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.
I'm honestly amazed at what Claude was able to do here.
This is both a helpful animation for a conference talk tomorrow and something that can live on the docs website itself.
Note
This PR was written by Claude (Claude Code) on behalf of @kylebarron.
Adds
examples/reprojection-explainer, a six-step animation of how deck.gl-raster reprojects a raster on the GPU with a triangle mesh. It works as a talk prop and on its own: each step has a title and an optional description, and a control bar makes it usable without a presenter.What it shows
The source is NLCD land cover stored in Albers equal-area, where the 49th parallel is curved.
RasterReprojector.refine()replayed one split at a time on both panels. Each split lands where the GPU's straight-line guess is furthest off, and the new corner snaps to its exact position (2 → 194 triangles, 261 → 3.9 px). A slider scrubs through the splits.Everything is computed live. The mesh comes from
@developmentseed/raster-reproject;refinement.tsreads its private priority queue to record each split, with no package change. Frames are drawn by a smallTexturedTrianglesLayer, as textured triangles whose texture coordinates the GPU interpolates: the mechanism the animation explains. The only asset is the 2500×1641 Albers PNG; nothing reprojected is stored.Also in this PR
dev-docs/specs/2026-10-07-reprojection-explainer-design.md.Controls
→ / Space / PageDown go forward (finishing a running animation first), ← / PageUp go back, R replays, 1–6 jump to a step, D toggles descriptions, F switches the flight style, and H opens a tuning panel. The control bar appears when the mouse moves and fades out at rest, so it stays off the projector while presenting from the keyboard or a clicker.
Testing
pnpm -r typecheck,biome ci .andvite buildpass on the branch, rebased onto feat(examples): experimental custom projection example with polar stereographic COGs #694.Notes
pnpm-lock.yamlalso drops somelibc:lines. That is the pinned pnpm 10.25 rewriting the file, not a dependency change;pnpm install --frozen-lockfilepasses.🤖 Written by Claude Code