Skip to content

Commit

Permalink
Moving loading code around
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Aug 29, 2017
1 parent e073006 commit 7abdc73
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Source/Scene/Cesium3DTilesetTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,12 @@ define([
}

if (!tile.hasTilesetContent) {
if (hasAdditiveContent(tile)) {
tileset._desiredTiles.push(tile);
if (tile.refine === Cesium3DTileRefine.ADD) {
// Always load additive tiles
loadTile(tileset, tile, this.frameState);
if (hasAdditiveContent(tile)) {
tileset._desiredTiles.push(tile);
}
}

// stop traversal when we've attained the desired level of error
Expand Down Expand Up @@ -540,12 +544,7 @@ define([
var children = tile.children;
var childrenLength = children.length;
for (var i = 0; i < childrenLength; ++i) {
var child = children[i];
if (child.refine === Cesium3DTileRefine.ADD) {
// Additive refinement tiles are always loaded when they are reached
loadTile(tileset, child, this.frameState, true);
}
touch(tileset, child, this.outOfCore);
touch(tileset, children[i], this.outOfCore);
}
return children;
}
Expand Down

0 comments on commit 7abdc73

Please sign in to comment.