diff --git a/packages/frontend/src/world/room/objects/ductRailSpotLights.ts b/packages/frontend/src/world/room/objects/ductRailSpotLights.ts index 32b776ed11..21da2b53df 100644 --- a/packages/frontend/src/world/room/objects/ductRailSpotLights.ts +++ b/packages/frontend/src/world/room/objects/ductRailSpotLights.ts @@ -88,12 +88,12 @@ export const ductRailSpotLights = defineObject({ const applyLightBrightness = () => { for (const light of lights) { - light.intensity = 2 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE; + light.intensity = 3 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE; light.range = cm(300) * getLightRangeFactorByGraphicsQuality(graphicsQuality); } for (const lamp of lamps) { const emissive = lamp.material as BABYLON.PBRMaterial; - emissive.emissiveIntensity = options.lightBrightness * 20; + emissive.emissiveIntensity = options.lightBrightness * 100; } }; diff --git a/packages/frontend/src/world/room/objects/hangingDuctRail.ts b/packages/frontend/src/world/room/objects/hangingDuctRail.ts index 56912479bb..72356bb2c3 100644 --- a/packages/frontend/src/world/room/objects/hangingDuctRail.ts +++ b/packages/frontend/src/world/room/objects/hangingDuctRail.ts @@ -40,11 +40,16 @@ export const hangingDuctRail = defineObject({ hasCollisions: false, createInstance: async ({ options, model }) => { const bodyMaterial = model.findMaterial('__X_BODY__'); - const bodyMesh = model.findMesh('__X_BODY__'); const applySize = () => { - bodyMesh.morphTargetManager!.getTargetByName('W')!.influence = options.width; - bodyMesh.morphTargetManager!.getTargetByName('H')!.influence = options.height; + for (const mesh of model.root.getChildMeshes()) { + if (mesh.morphTargetManager != null && mesh.morphTargetManager.getTargetByName('W') != null) { + mesh.morphTargetManager.getTargetByName('W').influence = options.width; + } + if (mesh.morphTargetManager != null && mesh.morphTargetManager.getTargetByName('H') != null) { + mesh.morphTargetManager.getTargetByName('H').influence = options.height; + } + } model.updated(); }; diff --git a/packages/frontend/src/world/room/objects/spotLight.ts b/packages/frontend/src/world/room/objects/spotLight.ts index 70da0d8fe1..0494d1828b 100644 --- a/packages/frontend/src/world/room/objects/spotLight.ts +++ b/packages/frontend/src/world/room/objects/spotLight.ts @@ -79,10 +79,10 @@ export const spotLight = defineObject({ applyLightColor(); const applyLightBrightness = () => { - light.intensity = 2 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE; + light.intensity = 3 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE; light.range = cm(300) * getLightRangeFactorByGraphicsQuality(graphicsQuality); const emissive = lamp.material as BABYLON.PBRMaterial; - emissive.emissiveIntensity = options.lightBrightness * 20; + emissive.emissiveIntensity = options.lightBrightness * 100; }; applyLightBrightness(); diff --git a/packages/frontend/src/world/room/utility.ts b/packages/frontend/src/world/room/utility.ts index a5dcec5e56..3c48aa7e6c 100644 --- a/packages/frontend/src/world/room/utility.ts +++ b/packages/frontend/src/world/room/utility.ts @@ -22,7 +22,7 @@ export function getLightRangeFactorByGraphicsQuality(quality: number) { } } -export const SYSTEM_MESH_NAMES = ['__TOP__', '__SIDE__', '__PICK__', '__COLLISION__']; +export const SYSTEM_MESH_NAMES = ['__TOP__', '__SIDE__', '__BOTTOM__', '__PICK__', '__COLLISION__']; export const SYSTEM_HEYA_MESH_NAMES = ['__ROOM_WALL__', '__ROOM_SIDE__', '__ROOM_FLOOR__', '__ROOM_CEILING__', '__ROOM_TOP__', '__ROOM_BOTTOM__', '__COLLISION__']; export function yuge(scene: BABYLON.Scene, mesh: BABYLON.Mesh, offset: BABYLON.Vector3) {