|
@@ -282,6 +282,7 @@ export function skipTraversal( tile, renderer ) {
|
|
|
|
|
|
const errorRequirement = ( renderer.errorTarget + 1 ) * renderer.errorThreshold;
|
|
const errorRequirement = ( renderer.errorTarget + 1 ) * renderer.errorThreshold;
|
|
const meetsSSE = tile.__error <= errorRequirement;
|
|
const meetsSSE = tile.__error <= errorRequirement;
|
|
|
|
+ const includeTile = meetsSSE || tile.refine === 'ADD';
|
|
const hasContent = ! tile.__contentEmpty;
|
|
const hasContent = ! tile.__contentEmpty;
|
|
const loadedContent = isDownloadFinished( tile.__loadingState ) && ! tile.__contentEmpty;
|
|
const loadedContent = isDownloadFinished( tile.__loadingState ) && ! tile.__contentEmpty;
|
|
const childrenWereVisible = tile.__childrenWereVisible;
|
|
const childrenWereVisible = tile.__childrenWereVisible;
|
|
@@ -290,14 +291,14 @@ export function skipTraversal( tile, renderer ) {
|
|
|
|
|
|
// Increment the relative depth of the node to the nearest rendered parent if it has content
|
|
// Increment the relative depth of the node to the nearest rendered parent if it has content
|
|
// and is being rendered.
|
|
// and is being rendered.
|
|
- if ( meetsSSE && hasContent ) {
|
|
|
|
|
|
+ if ( includeTile && hasContent ) {
|
|
|
|
|
|
tile.__depthFromRenderedParent ++;
|
|
tile.__depthFromRenderedParent ++;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// If we've met the SSE requirements and we can load content then fire a fetch.
|
|
// If we've met the SSE requirements and we can load content then fire a fetch.
|
|
- if ( meetsSSE && ! loadedContent && ! lruCache.isFull() && hasContent ) {
|
|
|
|
|
|
+ if ( includeTile && ! loadedContent && ! lruCache.isFull() && hasContent ) {
|
|
|
|
|
|
renderer.requestTileContents( tile );
|
|
renderer.requestTileContents( tile );
|
|
|
|
|
|
@@ -309,7 +310,7 @@ export function skipTraversal( tile, renderer ) {
|
|
// load in.
|
|
// load in.
|
|
|
|
|
|
// Skip the tile entirely if there's no content to load
|
|
// Skip the tile entirely if there's no content to load
|
|
- if ( meetsSSE && ! allChildrenHaveContent && ! childrenWereVisible && hasContent ) {
|
|
|
|
|
|
+ if ( includeTile && ! allChildrenHaveContent && ! childrenWereVisible && hasContent ) {
|
|
|
|
|
|
if ( loadedContent ) {
|
|
if ( loadedContent ) {
|
|
|
|
|
|
@@ -322,22 +323,31 @@ export function skipTraversal( tile, renderer ) {
|
|
tile.__active = true;
|
|
tile.__active = true;
|
|
stats.active ++;
|
|
stats.active ++;
|
|
|
|
|
|
- // load the child content if we've found that we've been loaded so we can move down to the next tile
|
|
|
|
- // layer when the data has loaded.
|
|
|
|
- for ( let i = 0, l = children.length; i < l; i ++ ) {
|
|
|
|
|
|
+ if ( meetsSSE ) {
|
|
|
|
|
|
- const c = children[ i ];
|
|
|
|
- if ( isUsedThisFrame( c, frameCount ) && ! lruCache.isFull() ) {
|
|
|
|
|
|
+ // load the child content if we've found that we've been loaded so we can move down to the next tile
|
|
|
|
+ // layer when the data has loaded.
|
|
|
|
+ for ( let i = 0, l = children.length; i < l; i ++ ) {
|
|
|
|
|
|
- c.__depthFromRenderedParent = tile.__depthFromRenderedParent + 1;
|
|
|
|
- recursivelyLoadTiles( c, c.__depthFromRenderedParent, renderer );
|
|
|
|
|
|
+ const c = children[ i ];
|
|
|
|
+ if ( isUsedThisFrame( c, frameCount ) && ! lruCache.isFull() ) {
|
|
|
|
+
|
|
|
|
+ c.__depthFromRenderedParent = tile.__depthFromRenderedParent + 1;
|
|
|
|
+ recursivelyLoadTiles( c, c.__depthFromRenderedParent, renderer );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- return;
|
|
|
|
|
|
+
|
|
|
|
+ if ( meetsSSE ) {
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|