Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ggetz committed Dec 14, 2023
1 parent 05df912 commit 7a563de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/engine/Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -3471,6 +3471,10 @@ const scratchPickIntersection = new Cartesian3();
* @private
*/
Cesium3DTileset.prototype.pick = function (ray, frameState, result) {
if (!frameState.context.webgl2 && !this._enablePick) {
return;
}

const selectedTiles = this._selectedTiles;
const selectedLength = selectedTiles.length;

Expand Down
2 changes: 2 additions & 0 deletions packages/engine/Source/Scene/Cesium3DTilesetTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Cesium3DTilesetTraversal.selectTile = function (tile, frameState) {
return;
}

tile._wasSelectedLastFrame = true;
const { content, tileset } = tile;
if (content.featurePropertiesDirty) {
// A feature's property in this tile changed, the tile needs to be re-styled.
Expand All @@ -88,6 +89,7 @@ Cesium3DTilesetTraversal.selectTile = function (tile, frameState) {
} else if (tile._selectedFrame < frameState.frameNumber - 1) {
// Tile is newly selected; it is selected this frame, but was not selected last frame.
tileset._selectedTilesToStyle.push(tile);
tile._wasSelectedLastFrame = false;
}
tile._selectedFrame = frameState.frameNumber;
tileset._selectedTiles.push(tile);
Expand Down

0 comments on commit 7a563de

Please sign in to comment.