diff --git a/src/DatabaseServices/Lights/DirectionalLight.ts b/src/DatabaseServices/Lights/DirectionalLight.ts index fc119f624..237ba87cd 100644 --- a/src/DatabaseServices/Lights/DirectionalLight.ts +++ b/src/DatabaseServices/Lights/DirectionalLight.ts @@ -1,4 +1,4 @@ -import { DirectionalLight as TDirectionalLight, Group, MathUtils, Matrix3, Matrix4, Object3D, Vector2, Vector3 } from "three"; +import { Group, MathUtils, Matrix3, Matrix4, Object3D, DirectionalLight as TDirectionalLight, Vector2, Vector3 } from "three"; import { UpdateDraw } from "../../Common/Status"; import { equaln, equalv3 } from "../../Geometry/GeUtils"; import { RenderType } from "../../GraphicsSystem/RenderType"; @@ -16,7 +16,7 @@ export class DirectionalLight extends Light { protected _Intensity: number = 50; //强度 //光源源角度 0-50 - @AutoRecord LightSourceAngle = 0.5357; + @AutoRecord LightSourceAngle = 0.5; //源软角度角度 @AutoRecord LightSourceSoftAngle = 0; diff --git a/src/UI/Components/RightPanel/RightPanel.less b/src/UI/Components/RightPanel/RightPanel.less index 968565ca2..cb63b24a5 100644 --- a/src/UI/Components/RightPanel/RightPanel.less +++ b/src/UI/Components/RightPanel/RightPanel.less @@ -208,7 +208,11 @@ margin-left: auto; } - :nth-child(2) { + > :nth-child(1) { + margin: 0; + } + + > :nth-child(2) { margin: 0; } } diff --git a/src/UI/Components/RightPanel/SunLightGui.tsx b/src/UI/Components/RightPanel/SunLightGui.tsx index 4a6191eb0..cff12f78b 100644 --- a/src/UI/Components/RightPanel/SunLightGui.tsx +++ b/src/UI/Components/RightPanel/SunLightGui.tsx @@ -416,7 +416,12 @@ export default class SunLightGui extends Component
- + + + { - let v = parseFloat(FixedNotZero(val, 4)); + let v = parseFloat(FixedNotZero(val, 1)); await this.SetSunLightSourceAngle(v); app.Viewer.UpdateRender(); }} @@ -465,7 +470,7 @@ export default class SunLightGui extends Component icon='redo' onClick={async () => { - await this.SetSunLightSourceAngle(0.5357); + await this.SetSunLightSourceAngle(0.5); app.Viewer.UpdateRender(); const KEY = '修改太阳光源角度'; if (CommandState.CommandIng && app.Database.hm.UndoData.CommandName === KEY) diff --git a/src/UI/Components/RightPanel/SunLightStore.ts b/src/UI/Components/RightPanel/SunLightStore.ts index 83de5605b..0e781e674 100644 --- a/src/UI/Components/RightPanel/SunLightStore.ts +++ b/src/UI/Components/RightPanel/SunLightStore.ts @@ -71,6 +71,7 @@ export class SunLightStore this.sunLightIndirectLightingIntensity = light.IndirectLightingIntensity; this.sunLightColorTemperature = light.Temperature; this.sunLightColor = `#${light.Color.getHexString()}`; + this.sunLightSourceAngle = light.LightSourceAngle; let rotateV = light.Position.sub(light.Target).normalize(); let theta = Math.atan2(rotateV.y, rotateV.x) * MathUtils.RAD2DEG;//旋转