1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-19 10:05:38 +02:00
This commit is contained in:
syuilo
2026-04-03 13:45:43 +09:00
parent e8d8242c09
commit f367bc37f8
4 changed files with 45 additions and 45 deletions

View File

@@ -16,10 +16,10 @@ export const ceilingFanLight = defineObject({
placement: 'ceiling',
receiveShadows: false,
castShadows: false,
createInstance: ({ scene, root }) => {
createInstance: ({ scene, model }) => {
return {
onInited: () => {
const rotor = root.getChildMeshes().find(m => m.name === 'Rotor') as BABYLON.Mesh;
const rotor = model.findMesh('Rotor');
rotor.rotation = rotor.rotationQuaternion != null ? rotor.rotationQuaternion.toEulerAngles() : rotor.rotation;
const anim = new BABYLON.Animation('', 'rotation.y', 60, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE);
anim.setKeys([