Skip to content

Commit d94a2f3

Browse files
committed
prioritize downloading tiles in frame before those out of frame
1 parent 9c3671e commit d94a2f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/base/TilesRendererBase.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ const priorityCallback = ( a, b ) => {
1919
// the lastFrameVisited tracks the last frame where a tile was used
2020
return a.__lastFrameVisited - b.__lastFrameVisited;
2121

22+
} else if ( a.__inFrustum !== b.__inFrustum ) {
23+
24+
// prioritize loading whatever is in the frame
25+
return a.__inFrustum ? 1 : - 1;
26+
2227
} else if ( a.__error !== b.__error ) {
2328

2429
// tiles which have greater error next

0 commit comments

Comments
 (0)