Browse Source

Add test tileset, make it work

Garrett Johnson 5 years ago
parent
commit
1c4bce35f5
2 changed files with 6 additions and 2 deletions
  1. 1 0
      example/data/tileset-add.json
  2. 5 2
      src/base/traverseFunctions.js

File diff suppressed because it is too large
+ 1 - 0
example/data/tileset-add.json


+ 5 - 2
src/base/traverseFunctions.js

@@ -284,7 +284,7 @@ export function skipTraversal( tile, renderer ) {
 	const meetsSSE = tile.__error <= errorRequirement;
 	const meetsSSE = tile.__error <= errorRequirement;
 	const includeTile = meetsSSE || tile.refine === 'ADD';
 	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 ) && hasContent;
 	const childrenWereVisible = tile.__childrenWereVisible;
 	const childrenWereVisible = tile.__childrenWereVisible;
 	const children = tile.children;
 	const children = tile.children;
 	let allChildrenHaveContent = tile.__allChildrenLoaded;
 	let allChildrenHaveContent = tile.__allChildrenLoaded;
@@ -310,7 +310,10 @@ 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 ( includeTile && ! allChildrenHaveContent && ! childrenWereVisible && hasContent && loadedContent ) {
+	if (
+			( meetsSSE && ! allChildrenHaveContent && ! childrenWereVisible && loadedContent )
+			|| ( tile.refine === 'ADD' && loadedContent )
+	) {
 
 
 		if ( tile.__inFrustum ) {
 		if ( tile.__inFrustum ) {