Skip to content

Commit

Permalink
geo: tile-3d viewport filter (visgl#5866)
Browse files Browse the repository at this point in the history
  • Loading branch information
belom88 authored Jun 11, 2021
1 parent 2c5be3e commit bace44e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/geo-layers/src/tile-3d-layer/tile-3d-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ export default class Tile3DLayer extends CompositeLayer {
return info;
}

filterSubLayer({layer, viewport}) {
const {tile} = layer.props;
const {id: viewportId} = viewport;
return tile.viewportIds.includes(viewportId);
}

_updateAutoHighlight(info) {
if (info.sourceLayer) {
info.sourceLayer.updateAutoHighlight(info);
Expand Down Expand Up @@ -213,6 +219,7 @@ export default class Tile3DLayer extends CompositeLayer {
}),
{
id: `${this.id}-pointcloud-${tileHeader.id}`,
tile: tileHeader,
data,
coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,
coordinateOrigin: cartographicOrigin,
Expand All @@ -237,6 +244,7 @@ export default class Tile3DLayer extends CompositeLayer {
}),
{
id: `${this.id}-scenegraph-${tileHeader.id}`,
tile: tileHeader,
data: instances || SINGLE_DATA,
scenegraph: gltf,

Expand Down Expand Up @@ -270,6 +278,7 @@ export default class Tile3DLayer extends CompositeLayer {
}),
{
id: `${this.id}-mesh-${tileHeader.id}`,
tile: tileHeader,
mesh: geometry,
data: SINGLE_DATA,
getColor: _getMeshColor(tileHeader),
Expand Down

0 comments on commit bace44e

Please sign in to comment.