Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/core/renderer/tiles/TilesRendererBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export class TilesRendererBase {
visible: 0,
};
this.frameCount = 0;
this.framesSinceLastLoad = 0;

// callbacks
this._dispatchNeedsUpdateEvent = throttle( () => {
Expand Down Expand Up @@ -427,6 +428,24 @@ export class TilesRendererBase {

}

if ( ! this.isLoading && ! runningTasks ) {

this.framesSinceLastLoad ++;

// Wait for 2 frames to ensure the update loop has had a chance to queue new downloads.
if ( this.framesSinceLastLoad === 2 ) {

this.dispatchEvent( { type: 'tiles-settled' } );

}

} else {

this.framesSinceLastLoad = 0;

}


}

resetFailedTiles() {
Expand Down
Loading