From 59d8620516f8a1db38eb2c1bf785e681aee986d9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 15 Jul 2026 05:16:23 +0100 Subject: [PATCH] Publish native planar camera composition --- Aetheria.State.Smoke/Program.cs | 45 +++++++++++++++++++ Aetheria.Unity/Packages/manifest.json | 2 +- Aetheria.Unity/Packages/packages-lock.json | 4 +- ...AetheriaRuntimeDaemonGameSurfaceBuilder.cs | 11 ++++- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/Aetheria.State.Smoke/Program.cs b/Aetheria.State.Smoke/Program.cs index 83eaa4da7..a232758aa 100644 --- a/Aetheria.State.Smoke/Program.cs +++ b/Aetheria.State.Smoke/Program.cs @@ -153,6 +153,28 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s daemonFrame, daemonHealth, daemonCommandBoundary); + var playableWorld = daemonGameSurface.Surface.Root.Children.Single(component => + component.Id == "aetheria.daemon.game.world"); + var expectedPlayableWorldProps = new Dictionary(StringComparer.Ordinal) + { + ["cameraRig"] = "planar.top-down-follow.v1", + ["cameraTargetEntityId"] = entityKey.ToString(), + ["cameraDistance"] = "150", + ["cameraVerticalFieldOfViewDegrees"] = "60", + ["cameraTargetScreenX"] = "0.9", + ["cameraTargetScreenY"] = "0.55", + ["cameraPositionDamping"] = "5", + ["cameraNearClipPlane"] = "0.3", + ["cameraFarClipPlane"] = "4096", + ["ambientLightColor"] = "0.2,0.2,0.2", + ["ambientLightIntensity"] = "1" + }; + if (expectedPlayableWorldProps.Any(expected => + !playableWorld.Props.TryGetValue(expected.Key, out var actual) || + !string.Equals(actual, expected.Value, StringComparison.Ordinal))) + { + throw new InvalidOperationException("Playable world did not publish the native camera and environment contract."); + } await node.MutableDocument(AetheriaRuntimeVerseRecordKeys.DaemonProviderAdvertisement) .ReplaceAsync(daemonProvider); await node.MutableDocument(AetheriaRuntimeVerseRecordKeys.DaemonHealth) @@ -771,6 +793,29 @@ await using (var reopened = await AetheriaStateNode.OpenAsync(statePath, "aether throw new InvalidOperationException("Daemon Verse API documents did not survive flush/reopen as typed CultCache records."); } + var reopenedPlayableWorld = daemonGameSurface.Surface.Root.Children.Single(component => + component.Id == "aetheria.daemon.game.world"); + var expectedReopenedPlayableWorldProps = new Dictionary(StringComparer.Ordinal) + { + ["cameraRig"] = "planar.top-down-follow.v1", + ["cameraTargetEntityId"] = entityKey.ToString(), + ["cameraDistance"] = "150", + ["cameraVerticalFieldOfViewDegrees"] = "60", + ["cameraTargetScreenX"] = "0.9", + ["cameraTargetScreenY"] = "0.55", + ["cameraPositionDamping"] = "5", + ["cameraNearClipPlane"] = "0.3", + ["cameraFarClipPlane"] = "4096", + ["ambientLightColor"] = "0.2,0.2,0.2", + ["ambientLightIntensity"] = "1" + }; + if (expectedReopenedPlayableWorldProps.Any(expected => + !reopenedPlayableWorld.Props.TryGetValue(expected.Key, out var actual) || + !string.Equals(actual, expected.Value, StringComparison.Ordinal))) + { + throw new InvalidOperationException("Playable world camera and environment contract did not survive flush/reopen."); + } + if (runtimeSession?.RuntimeId != "smoke-runtime" || runtimeSession.Role != "state-smoke" || runtimeSession.Status != "running") diff --git a/Aetheria.Unity/Packages/manifest.json b/Aetheria.Unity/Packages/manifest.json index cc7728641..85b53cece 100644 --- a/Aetheria.Unity/Packages/manifest.json +++ b/Aetheria.Unity/Packages/manifest.json @@ -9,6 +9,6 @@ "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.13", "org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1", "org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1", - "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.21" + "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.23" } } diff --git a/Aetheria.Unity/Packages/packages-lock.json b/Aetheria.Unity/Packages/packages-lock.json index 2562b8ca5..882821080 100644 --- a/Aetheria.Unity/Packages/packages-lock.json +++ b/Aetheria.Unity/Packages/packages-lock.json @@ -142,7 +142,7 @@ "hash": "d0aa50d31f3b6da96bffc194fdc3aa358f37e332" }, "org.gamecult.eve.unity-scene": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.21", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.23", "depth": 0, "source": "git", "dependencies": { @@ -151,7 +151,7 @@ "org.gamecult.eve.surface": "0.2.1", "com.unity.mathematics": "1.3.2" }, - "hash": "c662f11618e4dbb2bf36b02c54c2932bba360a4b" + "hash": "e43f2d74557dcbf2cc408893c7b7d7ac708a44a8" }, "com.unity.modules.assetbundle": { "version": "1.0.0", diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs index b559abc7d..38829e55d 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs @@ -590,7 +590,16 @@ namespace GameCult.Aetheria.State.Verse ["assetManifest"] = AetheriaRuntimeVerseRecordKeys.EveAssetCatalog.ToString(), ["inputCapability"] = AetheriaRuntimeVerseRecordKeys.PilotInputCapability.ToString(), ["inputProfile"] = "arpg.pointer-keyboard.v1", - ["cameraRig"] = "arpg.orbital-follow.v1", + ["cameraRig"] = "planar.top-down-follow.v1", + ["cameraDistance"] = "150", + ["cameraVerticalFieldOfViewDegrees"] = "60", + ["cameraTargetScreenX"] = "0.9", + ["cameraTargetScreenY"] = "0.55", + ["cameraPositionDamping"] = "5", + ["cameraNearClipPlane"] = "0.3", + ["cameraFarClipPlane"] = "4096", + ["ambientLightColor"] = "0.2,0.2,0.2", + ["ambientLightIntensity"] = "1", ["viewId"] = "pilot", ["excludedRenderChannels"] = "map", ["playerEntityId"] = playerEntityId,