1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-23 09:54:06 +02:00

Update ceilingFanLight.ts

This commit is contained in:
syuilo
2026-04-16 10:58:12 +09:00
parent 61eea5799b
commit 007a2481ef

View File

@@ -17,7 +17,7 @@ export const ceilingFanLight = defineObject({
hasCollisions: false, hasCollisions: false,
receiveShadows: false, receiveShadows: false,
castShadows: false, castShadows: false,
createInstance: ({ scene, model }) => { createInstance: ({ room, scene, model }) => {
const rotor = model.findMesh('Rotor'); const rotor = model.findMesh('Rotor');
model.bakeExcludeMeshes = [rotor, ...rotor.getChildMeshes()]; model.bakeExcludeMeshes = [rotor, ...rotor.getChildMeshes()];
@@ -30,6 +30,9 @@ export const ceilingFanLight = defineObject({
{ frame: 100, value: Math.PI * 2 }, { frame: 100, value: Math.PI * 2 },
]); ]);
rotor.animations = [anim]; rotor.animations = [anim];
scene.onAfterAnimationsObservable.add(() => {
room?.sr.updateMesh([rotor, ...rotor.getChildMeshes()]);
});
scene.beginAnimation(rotor, 0, 100, true); scene.beginAnimation(rotor, 0, 100, true);
}, },
interactions: {}, interactions: {},