Skip to content

Commit

Permalink
Update names
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jan 12, 2025
1 parent 836c2f6 commit 85cf97c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/base/TilesRendererBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class TilesRendererBase {
this.fetchOptions = {};
this.plugins = [];
this.queuedTiles = [];
this.cachedSinceReset = new Set();
this.cachedSinceLoadComplete = new Set();

const lruCache = new LRUCache();
lruCache.unloadPriorityCallback = lruPriorityCallback;
Expand All @@ -126,7 +126,7 @@ export class TilesRendererBase {
this.downloadQueue = downloadQueue;
this.parseQueue = parseQueue;
this.stats = {
inCacheSinceReset: 0,
inCacheSinceLoad: 0,
inCache: 0,
parsing: 0,
downloading: 0,
Expand Down Expand Up @@ -644,10 +644,10 @@ export class TilesRendererBase {

// Decrement stats
stats.inCache --;
if ( this.cachedSinceReset.has( tile ) ) {
if ( this.cachedSinceLoadComplete.has( tile ) ) {

this.cachedSinceReset.delete( tile );
stats.inCacheSinceReset --;
this.cachedSinceLoadComplete.delete( tile );
stats.inCacheSinceLoad --;

}

Expand Down Expand Up @@ -675,8 +675,8 @@ export class TilesRendererBase {

}

this.cachedSinceReset.add( tile );
stats.inCacheSinceReset ++;
this.cachedSinceLoadComplete.add( tile );
stats.inCacheSinceLoad ++;
stats.inCache ++;
stats.downloading ++;
tile.__loadingState = LOADING;
Expand Down Expand Up @@ -825,8 +825,8 @@ export class TilesRendererBase {

if ( stats.parsing === 0 && stats.downloading === 0 ) {

this.cachedSinceReset.clear();
stats.inCacheSinceReset = 0;
this.cachedSinceLoadComplete.clear();
stats.inCacheSinceLoad = 0;

}

Expand Down

0 comments on commit 85cf97c

Please sign in to comment.