Publish native planar camera composition
This commit is contained in:
parent
2f0abe6f52
commit
59d8620516
4 changed files with 58 additions and 4 deletions
|
|
@ -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<string, string>(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<AetheriaRuntimeDaemonProviderAdvertisementDocument>(AetheriaRuntimeVerseRecordKeys.DaemonProviderAdvertisement)
|
||||
.ReplaceAsync(daemonProvider);
|
||||
await node.MutableDocument<AetheriaRuntimeDaemonHealthDocument>(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<string, string>(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")
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue