Repository navigation
feat(examples): add an antimeridian explainer - #767
Merged
Merged
Conversation
How the mesh of an image that crosses 180° is built today: unwrap the corners, snap every point, mesh as usual, cut at the world's edge. Supersedes the explainer in #703, which explains #673's design. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The explainer reaches deck.gl-raster's unexported makeUnwrappedReprojectionFns, clipMeshToWorld and rescaleEPSG3857ToCommonSpace through a private alias in its own Vite and TypeScript config, pointing at the built dist/, so it runs the code RasterLayer runs without changing the package's exports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ecifier 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]>
Each map framing is its own deck.gl view placed on the letterboxed slide, so it clips to its box and its camera is part of the frame. Layer ids name their view, and a layerFilter routes them. 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]>
- Step 8 gives the library's reason for the cut: the layer draws every tile inside one world. - Step 6 keeps the probe's whole trail at its end. - The walks are recorded from the library's own calls while it unwraps, so a change to its walk changes what step 5 shows, and a test catches a walk that stops starting at the center. - Loading names the file and host, and gives up after 20 s with an error naming the file. - Text says what is on screen: the meridian slants across this image; both raw west corners; every layer measures error on the map. - Step 4 builds each snapshot's triangles once instead of every frame. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…767 Co-Authored-By: Claude Opus 5.5 <[email protected]>
A step can mark stops where the player holds until the presenter presses next (previous goes back one), shown as a beat counter beside the title. Step 5 now plays one walk sample per beat, in order: the walk reaches the point in the image, its raw position flies to the world strip, then its moved copy flies into the close-up. Steps 3, 6 and 8 hold between their phases, and step 6 sweeps once, holding on each side of 180°. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a bare graticule it's hard to tell where the image is, or what the world-spanning triangles cover. Every map view now draws Natural Earth's 1:50m land under the meshes, read live from GitHub alongside the image. Up close, the coastlines also go over the image, so the Aleutians show through it. In step 4, the smeared triangles now visibly cover Canada, Europe and Asia. The land is only the backdrop: if it can't be read, the app logs a warning and the maps keep their graticule alone. The docs card is a new step 8 frame with the land. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Step 5 ended with 24 unlabeled dots and 8 crossing lines. Each sample is now numbered in the image and up close, each edge's cluster in the world strip gets one label listing its samples, the center is labeled, and only the latest sample keeps its leader. The leaders in steps 5 and 6 are dashed: a move to another copy of the world, not a path like the walk's solid lines. Step 6's sweeping probe read like the reprojector's own sampling. Its description now says what the reprojector projects, four check points in each triangle, 320 times in all for this image (counted from the library's own calls, without the recorder's), and that the probe is the explainer's. The probe is labeled in the image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The close-up's seam label read "-180° = 180°", and the dashed seam ran straight through the "=". It also didn't say which name goes with which side. Now "180°" sits west of the line, where the map shows the copy of the world to the west, and "-180°" sits east of it, at this world's west edge. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n explainer Rewords steps 1-5 of the antimeridian explainer, and replaces step 2's TODO with a link to the reprojection explainer, for how the meshing works in general. Step 3 no longer quotes the corners' x, so the test that each description uses the scene's own numbers now covers steps 4-8. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Steps 3 and 5 say proj4.js, while the rest of the explainer said proj4. Step 3's caption, step 6's description and probe label, and the README's steps now say proj4.js too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
enabled auto-merge (squash)
October 22, 2026 15:56
kylebarron
disabled auto-merge
October 22, 2026 15:57
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/antimeridian-explainer, a step-by-step animation of how deck.gl-raster meshes an image that crosses the antimeridian (±180°). It replaces #703, which explained #673's design, with the mechanism onmaintoday (#716 and #721).The explainer follows
antimeridian_UTM_60N.tiffrom geotiff-test-data: 42 x 42 pixels of 20 km in UTM zone 60N, over the Aleutian Islands. It reads the file live from GitHub at a pinned commit. The maps draw Natural Earth's 1:50m land (public domain) under the meshes, also read live. In the close-up, the coastlines go over the image too, so the Aleutians show through it. If the land can't be read, the maps fall back to a plain graticule. There are nine steps:unwrapAlong's walk from the image's center. Each sample is numbered, and shown where proj4 puts it, in a whole-world strip, and where it moves to, in a close-up of the seam.clipMeshToWorldcuts the 10 triangles that cross -180° and moves the overhang one world over.Steps 3, 5, 6 and 8 play in beats. Each press of Next plays one beat, so the image panel and the map panels can be followed one at a time.
Every corner, sample, snapped point, split and cut comes from the functions
RasterLayercalls, called in its order:makeUnwrappedReprojectionFns, which usesunwrapAlongandnearestCopy;RasterReprojector, with output-pixel error;clipMeshToWorld.makeUnwrappedReprojectionFns,clipMeshToWorldandrescaleEPSG3857ToCommonSpacearen't exported from@developmentseed/deck.gl-raster, and its export map blocks deep imports. The explainer reaches them through a private alias in its ownvite.config.tsandtsconfig.json, pointing at the builtdist/. The package's exports don't change.Also included:
dev-docs/specs/2026-10-21-antimeridian-explainer-design.md.As with the other explainers, the code is LLM-generated and unreviewed (see its README).
Closes #703
🤖 Written by Claude Code