From 007a2481ef34f2cc82603ec984f95a6685674d2e Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 16 Apr 2026 10:58:12 +0900 Subject: [PATCH] Update ceilingFanLight.ts --- .../frontend/src/utility/room/objects/ceilingFanLight.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/utility/room/objects/ceilingFanLight.ts b/packages/frontend/src/utility/room/objects/ceilingFanLight.ts index aa7631cf4a..ed178a187f 100644 --- a/packages/frontend/src/utility/room/objects/ceilingFanLight.ts +++ b/packages/frontend/src/utility/room/objects/ceilingFanLight.ts @@ -17,7 +17,7 @@ export const ceilingFanLight = defineObject({ hasCollisions: false, receiveShadows: false, castShadows: false, - createInstance: ({ scene, model }) => { + createInstance: ({ room, scene, model }) => { const rotor = model.findMesh('Rotor'); model.bakeExcludeMeshes = [rotor, ...rotor.getChildMeshes()]; @@ -30,6 +30,9 @@ export const ceilingFanLight = defineObject({ { frame: 100, value: Math.PI * 2 }, ]); rotor.animations = [anim]; + scene.onAfterAnimationsObservable.add(() => { + room?.sr.updateMesh([rotor, ...rotor.getChildMeshes()]); + }); scene.beginAnimation(rotor, 0, 100, true); }, interactions: {},