Skip to content

feat: Spiral out loading - #477

Merged
kylebarron merged 20 commits into
mainfrom
kyle/spiral-out-loading
May 14, 2026
Merged

kylebarron merged 20 commits into
mainfrom
kyle/spiral-out-loading

Conversation

@kylebarron

@kylebarron kylebarron commented Apr 24, 2026 •

Copy link
Copy Markdown
Member

Closes #450

(Network conditions slowed down for effect)

Screen.Recording.2026-05-14.at.4.58.31.PM.mov

kylebarron and others added 5 commits April 24, 2026 16:35
Pure helper for sorting arbitrary items by squared Euclidean distance
from a reference point, with a perf-conscious contract: one getCenter
call per item (decorate-sort-undecorate via parallel typed arrays),
no sqrt, no closure allocation inside the comparator, in-place.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
RasterTileset2D.getTileIndices now sorts tiles by projected-space
distance from viewport.center so loads initiate from the user's focal
point outward. Short-circuits when tile count <= maxRequests (all
fetches would start concurrently regardless of order).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
MosaicTileset2D.getTileIndices now sorts sources by WGS84 distance from
the viewport-bounds center so loads initiate center-out. Short-circuits
when source count <= maxRequests. Exposes sortByDistanceFromPoint from
the @developmentseed/deck.gl-raster public barrel so downstream
tilesets can share the same helper.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
# Conflicts:
#	examples/dynamical-zarr-ecmwf/src/App.tsx
#	packages/deck.gl-geotiff/src/mosaic-layer/mosaic-tileset-2d.ts
#	packages/deck.gl-raster/src/raster-tileset/raster-tileset-2d.ts
- MosaicTileset2D constructor takes a `() => sources` closure now
- TileMatrixSetAdaptor constructor uses named-options object

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@kylebarron kylebarron changed the title Kyle/spiral out loading feat: Spiral out loading May 14, 2026
@github-actions github-actions Bot added the feat label May 14, 2026
Comment thread examples/cog-basic/src/App.tsx Resolved
@kylebarron
kylebarron enabled auto-merge (squash) May 14, 2026 21:36
@kylebarron
kylebarron merged commit 157e6fe into main May 14, 2026
3 checks passed
@kylebarron
kylebarron deleted the kyle/spiral-out-loading branch May 14, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load tiles from center of the viewport and spiraling out, instead of starting from the top left

1 participant