From 9de48030fc01bca2f266ac1ad0a85e11b8db4fdb Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sun, 14 Jun 2026 15:28:38 +0900 Subject: [PATCH] Update engine.ts --- packages/frontend-misskey-world-engine/src/room/engine.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend-misskey-world-engine/src/room/engine.ts b/packages/frontend-misskey-world-engine/src/room/engine.ts index c3c51865fd..2d8f4fa128 100644 --- a/packages/frontend-misskey-world-engine/src/room/engine.ts +++ b/packages/frontend-misskey-world-engine/src/room/engine.ts @@ -886,7 +886,7 @@ export class RoomEngine extends EngineBase<{ grabbing.mesh.position = newPos; grabbing.mesh.rotation = newRotation; - this.sr.updateMesh(grabbing.mesh.getChildMeshes()); + this.sr.updateMesh(grabbing.mesh.getChildMeshes().filter(m => m.isEnabled())); // disabledなmeshを除外しておかないと、後々unbakeMeshのsetEnabled(true)が呼ばれたときにエンジンがクラッシュする } // 浮動小数点数のわずかな誤差が出るため0.01cm以下の変動は無視する @@ -1059,7 +1059,7 @@ export class RoomEngine extends EngineBase<{ selectedFuniture.animations.push(placement === 'side' || placement === 'wall' ? this.putAnimH : this.putAnimV); const animating = Promise.withResolvers(); const animationObserver = this.scene.onAfterAnimationsObservable.add(() => { - this.sr.updateMesh(selectedFuniture.getChildMeshes(), true); + this.sr.updateMesh(selectedFuniture.getChildMeshes().filter(m => m.isEnabled()), true); }); this.scene.beginAnimation(selectedFuniture, 0, 60, false, 3, () => { animating.resolve(); }); @@ -1300,7 +1300,7 @@ export class RoomEngine extends EngineBase<{ // put animation container.root.animations.push(def.placement === 'side' || def.placement === 'wall' ? this.putAnimH : this.putAnimV); const animationObserver = this.scene.onAfterAnimationsObservable.add(() => { - this.sr.updateMesh(container.root.getChildMeshes(), true); + this.sr.updateMesh(container.root.getChildMeshes().filter(m => m.isEnabled()), true); // disabledなmeshを除外しておかないと、後々unbakeMeshのsetEnabled(true)が呼ばれたときにエンジンがクラッシュする }); this.scene.beginAnimation(container.root, 0, 60, false, 3, () => { this.scene.onAfterAnimationsObservable.remove(animationObserver);