Kyle/spiral out loading#477
Open
kylebarron wants to merge 7 commits intomainfrom
Open
Conversation
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>
kylebarron
commented
Apr 24, 2026
| tileIndices: TileIndex[], | ||
| viewport: Viewport, | ||
| ): TileIndex[] { | ||
| console.log("unsorted", tileIndices); |
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.
Closes #450
Next week I'll do a second pass on this implementation