Skip to content

Kyle/spiral out loading#477

Open
kylebarron wants to merge 7 commits intomainfrom
kyle/spiral-out-loading
Open

Kyle/spiral out loading#477
kylebarron wants to merge 7 commits intomainfrom
kyle/spiral-out-loading

Conversation

@kylebarron
Copy link
Copy Markdown
Member

@kylebarron kylebarron commented Apr 24, 2026

Closes #450

Next week I'll do a second pass on this implementation

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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
tileIndices: TileIndex[],
viewport: Viewport,
): TileIndex[] {
console.log("unsorted", tileIndices);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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