diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index b5b4cf8c46..a227fd0dc8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -3700,6 +3700,7 @@ _miRoom: ceilingFanLight: "シーリングファンライト" _ceilingFanLight: shadeMat: "シェードの素材" + bodyMat: "本体の素材" chair: "椅子" _chair: primaryMat: "メインの素材" diff --git a/packages/frontend-misskey-world-engine/src/room/furnitures/ceilingFanLight.ts b/packages/frontend-misskey-world-engine/src/room/furnitures/ceilingFanLight.ts index 16dee5503f..c041cf3acb 100644 --- a/packages/frontend-misskey-world-engine/src/room/furnitures/ceilingFanLight.ts +++ b/packages/frontend-misskey-world-engine/src/room/furnitures/ceilingFanLight.ts @@ -4,8 +4,8 @@ */ import * as BABYLON from '@babylonjs/core/pure.js'; -import { defineFuniture } from '../furniture.js'; import { ceilingFanLight_schema } from 'misskey-world/src/room/furnitures/ceilingFanLight.schema.js'; +import { defineFuniture } from '../furniture.js'; export const ceilingFanLight = defineFuniture(ceilingFanLight_schema, { createInstance: ({ options, sr, scene, model }) => { @@ -19,7 +19,17 @@ export const ceilingFanLight = defineFuniture(ceilingFanLight_schema, { applyShadeMat(); - const rotor = model.findMesh('Rotor'); + const bodyMaterial = model.findMaterial('__X_BODY__'); + + const applyBodyMat = () => { + bodyMaterial.albedoColor = new BABYLON.Color3(options.bodyMat.color[0], options.bodyMat.color[1], options.bodyMat.color[2]); + bodyMaterial.roughness = options.bodyMat.roughness; + bodyMaterial.metallic = options.bodyMat.metallic; + }; + + applyBodyMat(); + + const rotor = model.findMesh('__X_ROTOR__'); model.bakeExcludeMeshes = [rotor, ...rotor.getChildMeshes()]; let animationObserver: BABYLON.Observer; @@ -41,6 +51,7 @@ export const ceilingFanLight = defineFuniture(ceilingFanLight_schema, { onOptionsUpdated: ([k, v]) => { switch (k) { case 'shadeMat': applyShadeMat(); break; + case 'bodyMat': applyBodyMat(); break; } }, interactions: {}, diff --git a/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.blend b/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.blend index a6cd8649b3..68e4012ac7 100644 Binary files a/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.blend and b/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.blend differ diff --git a/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.glb b/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.glb index b22e4d75c8..b45e104811 100644 Binary files a/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.glb and b/packages/frontend/assets/world/objects/ceiling-fan-light/ceiling-fan-light.glb differ diff --git a/packages/frontend/src/world/room/furnitures/ceilingFanLight.ui.ts b/packages/frontend/src/world/room/furnitures/ceilingFanLight.ui.ts index 1437bfacc3..2424462a7d 100644 --- a/packages/frontend/src/world/room/furnitures/ceilingFanLight.ui.ts +++ b/packages/frontend/src/world/room/furnitures/ceilingFanLight.ui.ts @@ -13,5 +13,8 @@ export const ceilingFanLight_ui = defineFurnitureUi