Skip to content

Commit

Permalink
Check if instance active. (#30304)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanzopes authored Jan 13, 2025
1 parent 541d7a9 commit 6dd8854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objects/BatchedMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ class BatchedMesh extends Mesh {
const instanceInfo = this._instanceInfo;
for ( let i = 0, l = instanceInfo.length; i < l; i ++ ) {

if ( instanceInfo[ i ].geometryIndex === geometryId ) {
if ( instanceInfo[ i ].active && instanceInfo[ i ].geometryIndex === geometryId ) {

this.deleteInstance( i );

Expand Down

0 comments on commit 6dd8854

Please sign in to comment.