From 9c2c2f583c4bf904fd46b10fe0bf640809e8662a Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Thu, 21 May 2026 00:01:15 +0900 Subject: [PATCH 1/2] Adjust defaults --- src/core/renderer/tiles/TilesRendererBase.js | 41 ++++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/core/renderer/tiles/TilesRendererBase.js b/src/core/renderer/tiles/TilesRendererBase.js index a8e552df6..80da5fe73 100644 --- a/src/core/renderer/tiles/TilesRendererBase.js +++ b/src/core/renderer/tiles/TilesRendererBase.js @@ -384,6 +384,29 @@ export class TilesRendererBase { } + /** + * Enables an optimized tile loading strategy that loads only the tiles + * needed for the current view, reducing memory usage and improving initial load times. + * Tiles are loaded independently based on screen-space error without requiring all parent + * tiles to load first. Prevents visual gaps and flashing during camera movement. + * + * Based in part on {@link https://cesium.com/learn/cesium-native/ref-doc/selection-algorithm-details.html Cesium Native tile selection}. + * @type {boolean} + * @default true + */ + get optimizedLoadStrategy() { + + return this._optimizedLoadStrategy; + + } + + set optimizedLoadStrategy( v ) { + + console.warn( 'TilesRenderer: "optimizedLoadStrategy" has been deprecated. Please toggle "loadAncestors" to adjust the tile load behavior.' ); + this._optimizedLoadStrategy = v; + + } + /** * @param {string} [url] - URL of the root tileset JSON to load. */ @@ -568,21 +591,7 @@ export class TilesRendererBase { */ this.maxDepth = Infinity; - /** - * **Experimental.** Enables an optimized tile loading strategy that loads only the tiles - * needed for the current view, reducing memory usage and improving initial load times. - * Tiles are loaded independently based on screen-space error without requiring all parent - * tiles to load first. Prevents visual gaps and flashing during camera movement. - * - * Based in part on {@link https://cesium.com/learn/cesium-native/ref-doc/selection-algorithm-details.html Cesium Native tile selection}. - * @warn Setting is currently incompatible with plugins that split tiles and on-the-fly generate and - * dispose of child tiles including the `ImageOverlayPlugin` `enableTileSplitting` setting, - * `QuantizedMeshPlugin`, & `ImageFormatPlugin` subclasses (XYZ, TMS, etc). Any tile sets - * that share caches or queues must also use the same setting. - * @type {boolean} - * @default false - */ - this.optimizedLoadStrategy = false; + this._optimizedLoadStrategy = true; /** * **Experimental.** When `true`, sibling tiles are loaded together to prevent gaps during @@ -606,7 +615,7 @@ export class TilesRendererBase { * @type {boolean} * @default false */ - this.loadAncestors = false; + this.loadAncestors = true; /** * The number of tiles to process immediately when traversing the tile set to determine From 511d14b40922c1a0860b36f19747cb6afe64174f Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Thu, 21 May 2026 00:05:41 +0900 Subject: [PATCH 2/2] GeneratedSurfacePlugin: Remove the overlay texture behavior --- .../plugins/images/GeneratedSurfacePlugin.js | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/src/three/plugins/images/GeneratedSurfacePlugin.js b/src/three/plugins/images/GeneratedSurfacePlugin.js index f74eb67d2..8a6bc67e0 100644 --- a/src/three/plugins/images/GeneratedSurfacePlugin.js +++ b/src/three/plugins/images/GeneratedSurfacePlugin.js @@ -93,7 +93,6 @@ export class GeneratedSurfacePlugin { } - const { overlay } = this; let res; if ( this._useEllipsoid() ) { @@ -105,37 +104,6 @@ export class GeneratedSurfacePlugin { } - if ( overlay ) { - - const x = tile[ TILE_X ]; - const y = tile[ TILE_Y ]; - const level = tile[ TILE_LEVEL ]; - const range = this._tiling.getTileBounds( x, y, level, true, false ); - - if ( overlay.hasContent( range, level ) ) { - - await overlay.lockTexture( range, level ); - - const texture = overlay.getTexture( range, level ); - tile.overlayRange = range; - tile.overlayLevel = level; - - if ( abortSignal.aborted ) { - - overlay.releaseTexture( range, level ); - tile.overlayRange = null; - tile.overlayLevel = null; - return null; - - } - - res.material.map = texture; - res.material.needsUpdate = true; - - } - - } - return res; } @@ -153,19 +121,6 @@ export class GeneratedSurfacePlugin { } - disposeTile( tile ) { - - const { overlayRange, overlayLevel } = tile; - if ( this.overlay && overlayRange ) { - - this.overlay.releaseTexture( overlayRange, overlayLevel ); - tile.overlayRange = null; - tile.overlayLevel = null; - - } - - } - /** * Returns the cartographic coordinates for a given world-space position. "lat" and "lon" are assigned * to the target object.