From 10926e5525f6f0262d53bd45039d72fd5bc4bb11 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:37:26 +0900 Subject: [PATCH] Update utility.ts --- packages/frontend/src/world/room/utility.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/world/room/utility.ts b/packages/frontend/src/world/room/utility.ts index 5d0d5c6497..04944be992 100644 --- a/packages/frontend/src/world/room/utility.ts +++ b/packages/frontend/src/world/room/utility.ts @@ -278,8 +278,9 @@ export class ModelManager { if (newMesh.morphTargetManager != null && newMesh.morphTargetManager.numTargets > 0) { hasMorphTarget = true; applyMorphTargetsToMesh(newMesh); - newMesh.morphTargetManager?.dispose(); - newMesh.morphTargetManager = null; + // 消すと選択解除した後に再度選択した時にエンジンがクラッシュする + //newMesh.morphTargetManager?.dispose(); + //newMesh.morphTargetManager = null; } if (newMesh.parent === this.root) { newMesh.parent = null; @@ -313,8 +314,9 @@ export class ModelManager { const merged = BABYLON.Mesh.MergeMeshes(toMerge, true, false, undefined, false, true); merged.parent = this.root; - merged.morphTargetManager?.dispose(); - merged.morphTargetManager = null; + // 消すと選択解除した後に再度選択した時にエンジンがクラッシュする + //merged.morphTargetManager?.dispose(); + //merged.morphTargetManager = null; if (!hasMorphTarget) { // https://forum.babylonjs.com/t/is-it-intentional-that-morph-targets-do-not-work-on-meshes-with-frozen-materials/63252 merged.material.freeze();