Skip to content

Changed isReady to contentReady property #3513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions Source/Scene/Cesium3DTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,21 +342,24 @@ define([
get : function() {
return this._requestServer;
}
},

/**
* Determines if the tile is ready to render. <code>true</code> if the tile
* is ready to render; otherwise, <code>false</code>.
*
* @memberof Cesium3DTile.prototype
*
* @type {boolean}
* @readonly
*/
contentReady : {
get : function() {
return this._content.state === Cesium3DTileContentState.READY;
}
}
});

/**
* Determines if the tile is ready to render.
*
* @returns {Boolean} <code>true</code> if the tile is ready to render; otherwise, <code>false</code>.
*
* @private
*/
Cesium3DTile.prototype.isReady = function() {
return this._content.state === Cesium3DTileContentState.READY;
};


/**
* Determines if the tile's content has not be requested.
*
Expand Down
4 changes: 2 additions & 2 deletions Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ define([
function selectTile(selectedTiles, tile, fullyVisible, frameState) {
// There may also be a tight box around just the tile's contents, e.g., for a city, we may be
// zoomed into a neighborhood and can cull the skyscrapers in the root node.
if (tile.isReady() && (fullyVisible || (tile.contentsVisibility(frameState.cullingVolume) !== Intersect.OUTSIDE))) {
if (tile.contentReady && (fullyVisible || (tile.contentsVisibility(frameState.cullingVolume) !== Intersect.OUTSIDE))) {
selectedTiles.push(tile);
tile.selected = true;
}
Expand Down Expand Up @@ -624,7 +624,7 @@ define([
// If tile has tileset content, skip it and process its child instead (the tileset root)
// No need to check visibility or sse of the child because its bounding volume
// and geometric error are equal to its parent.
if (t.isReady()) {
if (t.contentReady) {
child = t.children[0];
child.parentPlaneMask = t.parentPlaneMask;
child.distanceToCamera = t.distanceToCamera;
Expand Down