Skip to content

Commit 21df5d4

Browse files
authored
ImageOverlayPlugin: Make image tile pre-load more robust (#1411)
1 parent eaf53cf commit 21df5d4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/three/plugins/images/ImageOverlayPlugin.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,11 @@ export class ImageOverlayPlugin {
287287

288288
this._onTileDownloadStart = ( { tile, url } ) => {
289289

290-
// TODO: it would be better if there were either a separate event or flag indicating that a tile is an external
291-
// tileset or not. We won't want to run "init" on tiles that have geometry.
292-
if ( ! /\.json$/.test( url ) ) {
290+
// TODO: it's not super straight forward to detect whether a tile is "geometry" or not ahead of time. Checking
291+
// for "subtree" or "json" are good broad strokes but some cases will still be missed.
292+
if ( ! /\.json$/i.test( url ) && ! /\.subtree/i.test( url ) ) {
293293

294+
this.processedTiles.add( tile );
294295
this._initTileOverlayInfo( tile );
295296

296297
}

0 commit comments

Comments
 (0)