RFC(geo-layers) Share TerrainLayer tile data#10374
Draft
ibgreen-openai wants to merge 1 commit into
Draft
Conversation
55 tasks
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.
This is a stacked PR on top of the SharedTileLayer PR #10367
Summary
_TerrainSourceplusTerrainLayer._terrainTilesetpath so multipleTerrainLayerinstances can reuse one loaded terrain tile payload cache through_SharedTileset2D.TerrainLayerURL-template API intact. The shared path is caller-owned and opt-in;elevationDatastill uses the existing internalTileLayerpath when_terrainTilesetis not supplied._SharedTileset2Dhooks needed for terrain payload byte accounting, plus focused tests and docs.Why
TerrainLayercurrently bakes viewport-projected bounds into each loaded tiled mesh, so separate terrain layers fetch and materialize the same source tile data independently. This stacks on #10367 and uses the shared tileset/cache machinery instead of adding a terrain-specific parallel cache.Example
The source owns elevation/texture/decoder/load configuration, the shared tileset owns tile traversal and cache state, and each
TerrainLayerstill owns its per-layer render props such ascolor,wireframe,material, andoperation.Validation
yarn buildyarn lint(passes with existing repo warnings only)yarn vitest run --project headless test/modules/geo-layers/terrain-layer-loading.spec.tsyarn vitest run --project node test/modules/imports.node.spec.tsyarn test-headlesswas also run; the relevant terrain/shared specs passed, but the full suite still has an unrelated reproducibleLoadingWidgetfailure and oneDeckGL#mount/unmountfailure that passed when rerun in isolation.