Garrett Johnson 5 年之前
父节点
当前提交
59bdcdd5d7
共有 1 个文件被更改,包括 24 次插入30 次删除
  1. 24 30
      src/base/traverseFunctions.js

+ 24 - 30
src/base/traverseFunctions.js

@@ -310,53 +310,47 @@ export function skipTraversal( tile, renderer ) {
 	// load in.
 
 	// Skip the tile entirely if there's no content to load
-	if ( includeTile && ! allChildrenHaveContent && ! childrenWereVisible && hasContent ) {
+	if ( includeTile && ! allChildrenHaveContent && ! childrenWereVisible && hasContent && loadedContent ) {
 
-		if ( loadedContent ) {
+		if ( tile.__inFrustum ) {
 
-			if ( tile.__inFrustum ) {
-
-				tile.__visible = true;
-				stats.visible ++;
-
-			}
-			tile.__active = true;
-			stats.active ++;
+			tile.__visible = true;
+			stats.visible ++;
 
-			if ( meetsSSE ) {
+		}
+		tile.__active = true;
+		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 ++ ) {
+	}
 
-					const c = children[ i ];
-					if ( isUsedThisFrame( c, frameCount ) && ! lruCache.isFull() ) {
+	// If we're additive then don't stop the traversal here because it doesn't matter whether the children load in
+	// at the same rate.
+	if ( tile.refine !== 'ADD' && meetsSSE && ! allChildrenHaveContent && loadedContent ) {
 
-						c.__depthFromRenderedParent = tile.__depthFromRenderedParent + 1;
-						recursivelyLoadTiles( c, c.__depthFromRenderedParent, renderer );
+		// 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 ++ ) {
 
-					}
+			const c = children[ i ];
+			if ( isUsedThisFrame( c, frameCount ) && ! lruCache.isFull() ) {
 
-				}
+				c.__depthFromRenderedParent = tile.__depthFromRenderedParent + 1;
+				recursivelyLoadTiles( c, c.__depthFromRenderedParent, renderer );
 
 			}
 
 		}
 
-		if ( meetsSSE ) {
-
-			return;
-
-		}
+	} else {
 
-	}
+		for ( let i = 0, l = children.length; i < l; i ++ ) {
 
-	for ( let i = 0, l = children.length; i < l; i ++ ) {
+			const c = children[ i ];
+			if ( isUsedThisFrame( c, frameCount ) ) {
 
-		const c = children[ i ];
-		if ( isUsedThisFrame( c, frameCount ) ) {
+				skipTraversal( c, renderer );
 
-			skipTraversal( c, renderer );
+			}
 
 		}