Skip to content

Commit

Permalink
chore: check if batchId is defined in picking
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Aug 8, 2024
1 parent be5ceac commit 5ab4dc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Layer/OGC3DTilesLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,12 @@ class OGC3DTilesLayer extends GeometryLayer {
/** @type{number|null} */
let batchId;
if (object.isPoints && index) {
batchId = index;
batchId = object.geometry.getAttribute('_BATCHID')?.getX(index) ?? index;
} else if (object.isMesh && face) {
batchId = object.geometry.getAttribute('_BATCHID').getX(face.a);
} else {
batchId = object.geometry.getAttribute('_BATCHID')?.getX(face.a);
}

if (batchId === undefined) {
return null;
}

Expand Down

0 comments on commit 5ab4dc6

Please sign in to comment.