Skip to content

Commit

Permalink
Merge pull request #706 from agargaro/getVisibleAtReplace
Browse files Browse the repository at this point in the history
AcceleratedBatchedMeshRaycast: use `getVisibleAt` instead of `drawInfo` object
  • Loading branch information
gkjohnson authored Sep 9, 2024
2 parents be976e6 + fd7ce46 commit b98edd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/ExtensionUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ function acceleratedBatchedMeshRaycast( raycaster, intersects ) {

}

// TODO: provide new method to get instances count instead of 'drawInfo.length'
for ( let i = 0, l = drawInfo.length; i < l; i ++ ) {

if ( ! drawInfo[ i ].visible || ! drawInfo[ i ].active ) {
if ( ! this.getVisibleAt( i ) ) {

continue;

}

// TODO: use getGeometryIndex
const geometryId = drawInfo[ i ].geometryIndex;

_mesh.geometry.boundsTree = boundsTrees[ geometryId ];
Expand Down

0 comments on commit b98edd1

Please sign in to comment.