Skip to content

Commit

Permalink
feat(geo-layers): Tile3DLayers-async tileset traversal (visgl#6856)
Browse files Browse the repository at this point in the history
  • Loading branch information
belom88 authored Apr 26, 2022
1 parent 6ec93fc commit 51aba01
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/geo-layers/src/tile-3d-layer/tile-3d-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ export default class Tile3DLayer extends CompositeLayer {
if (!timeline || !viewportsNumber || !tileset3d) {
return;
}
const frameNumber = tileset3d.update(Object.values(viewports));
const tilesetChanged = this.state.frameNumber !== frameNumber;
if (tilesetChanged) {
this.setState({frameNumber});
}
tileset3d.selectTiles(Object.values(viewports)).then(frameNumber => {
const tilesetChanged = this.state.frameNumber !== frameNumber;
if (tilesetChanged) {
this.setState({frameNumber});
}
});
}

_getSubLayer(tileHeader, oldLayer) {
Expand Down

0 comments on commit 51aba01

Please sign in to comment.