diff --git a/model/_engine/src/CelestialView.cs b/model/_engine/src/CelestialView.cs index fc37e42..2b5f30d 100644 --- a/model/_engine/src/CelestialView.cs +++ b/model/_engine/src/CelestialView.cs @@ -679,7 +679,11 @@ public class CelestialView : Control, IDisposable private Vector3 RotationLight(Matrix4x4 cam, double tiltDeg) { var axisCam = Vector3.TransformNormal(AxisWorld(tiltDeg), cam); - var forwardRight = Vector3.Normalize(new Vector3(0.86f, 0f, 0.50f)); + // 特写模式:光从正右方水平射来,晨昏线竖直居中、正对观察者, + // 便于课堂直观看昼夜半球;主画布仍用斜向光体现立体感。 + var forwardRight = InsetMode + ? new Vector3(1f, 0f, 0f) + : Vector3.Normalize(new Vector3(0.86f, 0f, 0.50f)); var u = forwardRight - axisCam * Vector3.Dot(forwardRight, axisCam); if (u.Length() < 0.001f) u = new Vector3(1, 0, 0); u = Vector3.Normalize(u); diff --git a/model/_engine/src/EarthModelView.cs b/model/_engine/src/EarthModelView.cs index 9f39809..dadb2ca 100644 --- a/model/_engine/src/EarthModelView.cs +++ b/model/_engine/src/EarthModelView.cs @@ -216,8 +216,7 @@ public sealed class EarthModelView : UserControl, IDisposable // ---------------------------------------------------------------- 顶部主工具栏 private Control BuildTopBar() { - var close = MakeButton(_texts["close"], () => _context.RequestClose()); - + // 关闭按钮统一放在窗口右上角的自建标题栏,这里不再重复放左上角 var title = new StackPanel { Spacing = 1, VerticalAlignment = VerticalAlignment.Center }; title.Children.Add(new TextBlock { @@ -268,14 +267,13 @@ public sealed class EarthModelView : UserControl, IDisposable actions.Children.Add(MakeButton(_texts["classroom"], () => SetLessonsVisible(!_showLessons))); actions.Children.Add(MakeButton("⛶", ToggleFullScreen, large: true)); - var grid = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto,Auto,*,Auto") }; - grid.Children.Add(close); - Grid.SetColumn(title, 1); + var grid = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,Auto,*,Auto") }; + Grid.SetColumn(title, 0); title.Margin = new Thickness(14, 0, 0, 0); grid.Children.Add(title); - Grid.SetColumn(_viewSwitch, 2); + Grid.SetColumn(_viewSwitch, 1); grid.Children.Add(_viewSwitch); - Grid.SetColumn(actions, 4); + Grid.SetColumn(actions, 3); grid.Children.Add(actions); return new Border { Background = PanelBg, Padding = new Thickness(16, 9), Child = grid }; @@ -716,10 +714,23 @@ public sealed class EarthModelView : UserControl, IDisposable ? _texts.Pick(season.TeachingI18n, _texts["orbitTeach"]) : _texts["orbitTeach"]; - if (_showCloseup && (double.IsNaN(_lastDeclination) || Math.Abs(_lastDeclination - decl) > 0.04)) + // 特写的直射纬度用缓动逼近目标,而不是瞬间跳变: + // 公转时拖动/改变轨道角,晨昏线会平滑地移过去(每次 timer 步进一帧)。 + if (_showCloseup) { - _closeup.DeclinationDeg = decl; - _lastDeclination = decl; + var target = decl; + var current = _closeup.DeclinationDeg; + var diff = target - current; + if (Math.Abs(diff) < 0.02) + { + _closeup.DeclinationDeg = target; + } + else + { + // 每 140ms 走剩余距离的 ~18%,形成自然的 ease-out 动画 + _closeup.DeclinationDeg = current + diff * 0.18; + } + _lastDeclination = target; } } diff --git a/src/main/dotnet/EarthModelStudio/Styles/AppTheme.axaml b/src/main/dotnet/EarthModelStudio/Styles/AppTheme.axaml index 1b20554..5f22364 100644 --- a/src/main/dotnet/EarthModelStudio/Styles/AppTheme.axaml +++ b/src/main/dotnet/EarthModelStudio/Styles/AppTheme.axaml @@ -252,28 +252,40 @@ - + +