添加部分功能,以及等高线模型

This commit is contained in:
2509_92447106 committed 2026-11-14 12:42:19 +08:00
1 parent 663efa5c75
commit 512b1814e1
108 files changed
+239 -240

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@
```
model/
version.json # 版本清单(与仓库根 version.json 相同,自动生成)
_sdk/EarthModelStudio.ModelSdk/ # 模型契约(启动器与模型唯一的共享代码)
_sdk/GC.ModelSdk/ # 模型契约(启动器与模型唯一的共享代码)
_engine/ # 共享引擎源码
src/ # CelestialView / PlanetTexture / EarthModelView / SphereRaster…
PreviewGen/ # 用模型渲染器生成封面的小工具
@@ -81,7 +81,7 @@ model/
## 模型契约(model/_sdk)
模型只依赖一个极小的契约程序集 `EarthModelStudio.ModelSdk`(源码在 `model/_sdk/`):
模型只依赖一个极小的契约程序集 `GC.ModelSdk`(源码在 `model/_sdk/`):
```csharp
public interface IModelFactory
+1 -1
View File
@@ -23,7 +23,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\_sdk\EarthModelStudio.ModelSdk\EarthModelStudio.ModelSdk.csproj" />
<ProjectReference Include="..\..\_sdk\GC.ModelSdk\GC.ModelSdk.csproj" />
</ItemGroup>
</Project>
+2 -2
View File
@@ -9,7 +9,7 @@ using Avalonia.Controls;
using Avalonia.Headless;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
using NeoRF.EarthModels;
namespace NeoRF.EarthModels.Preview;
@@ -210,7 +210,7 @@ internal static class Program
// 契约与 Avalonia 一律回到默认上下文,与启动器 ModelLoadContext 一致
if (name.Name is null) return null;
if (name.Name.StartsWith("System", StringComparison.OrdinalIgnoreCase)) return null;
var shared = new[] { "EarthModelStudio.ModelSdk", "Avalonia", "Avalonia.Base",
var shared = new[] { "GC.ModelSdk", "Avalonia", "Avalonia.Base",
"Avalonia.Controls", "Avalonia.Skia", "Avalonia.Themes.Fluent", "SkiaSharp", "HarfBuzzSharp" };
if (shared.Contains(name.Name, StringComparer.OrdinalIgnoreCase)) return null;
var candidate = Path.Combine(dataDir, name.Name + ".dll");
+1 -1
View File
@@ -403,7 +403,7 @@ public class CelestialView : Control, IDisposable
_sphere?.Dispose();
_sphere = null;
_sphereSize = 0;
GC.SuppressFinalize(this);
System.GC.SuppressFinalize(this);
}
private void OnTick(object? sender, EventArgs e)
+2 -2
View File
@@ -9,7 +9,7 @@ using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Threading;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.EarthModels;
@@ -187,7 +187,7 @@ public sealed class EarthModelView : UserControl, IDisposable
}
_canvas.Dispose();
_closeup.Dispose();
GC.SuppressFinalize(this);
System.GC.SuppressFinalize(this);
}
private string CurrentView { get; set; } = "rotation";
+2 -2
View File
@@ -1,6 +1,6 @@
using System;
using Avalonia.Controls;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.EarthModels;
@@ -40,6 +40,6 @@ public sealed class EarthModelRuntime : IModelRuntime
public void Dispose()
{
_scene = null;
GC.SuppressFinalize(this);
System.GC.SuppressFinalize(this);
}
}
@@ -4,8 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<RootNamespace>EarthModelStudio.ModelSdk</RootNamespace>
<AssemblyName>EarthModelStudio.ModelSdk</AssemblyName>
<RootNamespace>GC.ModelSdk</RootNamespace>
<AssemblyName>GC.ModelSdk</AssemblyName>
<IsPackable>false</IsPackable>
<Description>Earth Model 模型契约:启动器与模型之间唯一的编译期依赖。</Description>
</PropertyGroup>
@@ -1,7 +1,7 @@
using System;
using Avalonia.Controls;
namespace EarthModelStudio.ModelSdk;
namespace GC.ModelSdk;
/// <summary>
/// 模型入口契约。模型程序集里必须有一个公开、无参构造的 <see cref="IModelFactory"/> 实现,
+2 -2
View File
@@ -25,6 +25,6 @@
"button": "#9FB4D4",
"frame": "#0A1524"
},
"updatedAt": "2026-11-14T02:48:20Z",
"build": "4d5485eed8"
"updatedAt": "2026-11-14T04:41:38Z",
"build": "e4299c5c99"
}
+1 -1
View File
@@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\_sdk\EarthModelStudio.ModelSdk\EarthModelStudio.ModelSdk.csproj">
<ProjectReference Include="..\..\_sdk\GC.ModelSdk\GC.ModelSdk.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
+2 -2
View File
@@ -4,7 +4,7 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.ContourMap;
@@ -49,7 +49,7 @@ public sealed class ContourMapRuntime : IModelRuntime
{
_field = null;
_texts = null;
GC.SuppressFinalize(this);
System.GC.SuppressFinalize(this);
}
private static Dictionary<string, string> LoadTexts(string dataDir, string language)
+2 -2
View File
@@ -18,7 +18,7 @@
],
"dataDir": "earth-geography.model",
"version": "1.8",
"updatedAt": "2026-11-14T02:48:20Z",
"updatedAt": "2026-11-14T04:41:38Z",
"chrome": {
"titleBar": "#0C1828",
"titleBorder": "#1B2740",
@@ -26,5 +26,5 @@
"button": "#9FB4D4",
"frame": "#0A1524"
},
"build": "ede9f2fdd0"
"build": "64b985e484"
}
@@ -21,7 +21,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\_sdk\EarthModelStudio.ModelSdk\EarthModelStudio.ModelSdk.csproj">
<ProjectReference Include="..\..\_sdk\GC.ModelSdk\GC.ModelSdk.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
@@ -5,7 +5,7 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.EarthModels;
@@ -258,7 +258,7 @@ public sealed class GeographyRuntime : IModelRuntime
_disposables.Clear();
_view?.StopAnimation();
_view = null;
GC.SuppressFinalize(this);
System.GC.SuppressFinalize(this);
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Media;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.EarthModels;
+2 -2
View File
@@ -24,7 +24,7 @@
"preview": "preview.png",
"apiVersion": 1,
"version": "1.6",
"updatedAt": "2026-11-14T02:48:20Z",
"updatedAt": "2026-11-14T04:41:38Z",
"chrome": {
"titleBar": "#0C1828",
"titleBorder": "#1B2740",
@@ -32,5 +32,5 @@
"button": "#9FB4D4",
"frame": "#0A1524"
},
"build": "bbd2908c17"
"build": "7fda246d48"
}
@@ -20,7 +20,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\_sdk\EarthModelStudio.ModelSdk\EarthModelStudio.ModelSdk.csproj">
<ProjectReference Include="..\..\_sdk\GC.ModelSdk\GC.ModelSdk.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
@@ -1,4 +1,4 @@
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.EarthModels;
+2 -2
View File
@@ -24,7 +24,7 @@
"preview": "preview.png",
"apiVersion": 1,
"version": "1.6",
"updatedAt": "2026-11-14T02:48:20Z",
"updatedAt": "2026-11-14T04:41:38Z",
"chrome": {
"titleBar": "#0C1828",
"titleBorder": "#1B2740",
@@ -32,5 +32,5 @@
"button": "#9FB4D4",
"frame": "#0A1524"
},
"build": "b54f691efe"
"build": "446633f2b9"
}
@@ -20,7 +20,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\_sdk\EarthModelStudio.ModelSdk\EarthModelStudio.ModelSdk.csproj">
<ProjectReference Include="..\..\_sdk\GC.ModelSdk\GC.ModelSdk.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
@@ -1,4 +1,4 @@
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.EarthModels;
+2 -2
View File
@@ -25,7 +25,7 @@
"preview": "preview.png",
"apiVersion": 1,
"version": "1.5",
"updatedAt": "2026-11-14T02:48:20Z",
"updatedAt": "2026-11-14T04:41:38Z",
"chrome": {
"titleBar": "#FFFFFF",
"titleBorder": "#E3E8F3",
@@ -33,5 +33,5 @@
"button": "#5B6A86",
"frame": "#F4F6FB"
},
"build": "f95a08e72a"
"build": "f7913ac484"
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 56 KiB

@@ -1,4 +1,4 @@
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.ScaleCalculator;
@@ -16,7 +16,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\_sdk\EarthModelStudio.ModelSdk\EarthModelStudio.ModelSdk.csproj">
<ProjectReference Include="..\..\_sdk\GC.ModelSdk\GC.ModelSdk.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Text.Json;
using Avalonia.Controls;
using EarthModelStudio.ModelSdk;
using GC.ModelSdk;
namespace NeoRF.ScaleCalculator;
@@ -43,7 +43,7 @@ public sealed class ScaleCalculatorRuntime : IModelRuntime
{
_data = null;
_texts = null;
GC.SuppressFinalize(this);
System.GC.SuppressFinalize(this);
}
private static Dictionary<string, string> LoadTexts(string dataDir, string language)
@@ -17,7 +17,7 @@ namespace NeoRF.ScaleCalculator;
/// </summary>
public sealed partial class ScaleCalculatorView : UserControl
{
// 调色(与 src/main/dotnet/EarthModelStudio/Styles/AppTheme.axaml 一致)
// 调色(与 GC-BOOT/Styles/AppTheme.axaml 一致)
internal static readonly Color CAppBg = Color.Parse("#F4F6FB");
internal static readonly Color CSurface = Color.Parse("#FFFFFF");
internal static readonly Color CSurfaceAlt = Color.Parse("#F7F9FE");
+7 -7
View File
@@ -1,12 +1,12 @@
{
"schema": 1,
"generated": "2026-11-14T02:48:20Z",
"generated": "2026-11-14T04:41:38Z",
"repository": "https://gitcode.com/2509_92447106/GC",
"branch": "main",
"modelDir": "model",
"launcher": {
"version": "1.0.7",
"revision": "79af318215",
"revision": "",
"packages": {
"win-x64": {
"path": "dist/GC-win-x64.zip",
@@ -34,31 +34,31 @@
{
"id": "contour-map",
"version": "1.0",
"build": "4d5485eed8",
"build": "e4299c5c99",
"dir": "model/contour-map"
},
{
"id": "earth-geography",
"version": "1.8",
"build": "ede9f2fdd0",
"build": "64b985e484",
"dir": "model/earth-geography"
},
{
"id": "earth-revolution",
"version": "1.6",
"build": "bbd2908c17",
"build": "7fda246d48",
"dir": "model/earth-revolution"
},
{
"id": "earth-rotation",
"version": "1.6",
"build": "b54f691efe",
"build": "446633f2b9",
"dir": "model/earth-rotation"
},
{
"id": "scale-calculator",
"version": "1.5",
"build": "f95a08e72a",
"build": "f7913ac484",
"dir": "model/scale-calculator"
}
]