From e64b3090450e2dce079d6c9bcc5cf546c3100bd5 Mon Sep 17 00:00:00 2001 From: AlexandruPopovici Date: Sat, 18 Oct 2025 10:51:37 +0300 Subject: [PATCH] fix(viewer-lib): Handles WEB-4509: Isolating without ghosting on instanced objects --- .../viewer/src/modules/batching/InstancedMeshBatch.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/viewer/src/modules/batching/InstancedMeshBatch.ts b/packages/viewer/src/modules/batching/InstancedMeshBatch.ts index 40b777cc4..78c8ab561 100644 --- a/packages/viewer/src/modules/batching/InstancedMeshBatch.ts +++ b/packages/viewer/src/modules/batching/InstancedMeshBatch.ts @@ -380,13 +380,9 @@ export class InstancedMeshBatch implements Batch { } private shuffleDrawGroups(): void { - const groups = this.groups - .sort((a, b) => { - return a.start - b.start - }) - .slice() + const groups = this.groups.slice() - this.groups.sort((a, b) => { + groups.sort((a, b) => { const materialA: Material = this.materials[a.materialIndex] const materialB: Material = this.materials[b.materialIndex] const visibleOrder =