@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +44 -44
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1721 -367
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +1 -1
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +1 -1
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -2
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +1 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +6 -6
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +23 -23
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EDITOR_COMMAND_ID, } from '@fps-games/editor-protocol';
|
|
2
|
+
import { createLocalEditorCommandFailure } from '../diagnostics.js';
|
|
3
|
+
import { cloneEditorCommandSelection, getEditorCommandSafeSceneHierarchy, getEditorCommandSafeSceneSelection, hasEditorCommandSafeSceneScope, isEditorCommandHierarchyObjectSelectable, } from '../shared.js';
|
|
4
|
+
export function createLocalEditorCommandSelectionSource(state, options, operations) {
|
|
5
|
+
return {
|
|
6
|
+
getSelection() {
|
|
7
|
+
return cloneEditorCommandSelection(getEditorCommandSafeSceneSelection(operations));
|
|
8
|
+
},
|
|
9
|
+
setSelection(input) {
|
|
10
|
+
if (!hasEditorCommandSafeSceneScope(operations)) {
|
|
11
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SELECTION_SET, 'Scene selection is unavailable outside the Scene Hierarchy scope.', { code: 'selection.sceneScopeRequired' });
|
|
12
|
+
}
|
|
13
|
+
const objectIds = normalizeEditorCommandSelectionInput(input);
|
|
14
|
+
if (!objectIds) {
|
|
15
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SELECTION_SET, 'selection.set requires objectId or objectIds.', { code: 'selection.invalidInput' });
|
|
16
|
+
}
|
|
17
|
+
const activeId = input.activeId && objectIds.includes(input.activeId)
|
|
18
|
+
? input.activeId
|
|
19
|
+
: objectIds[objectIds.length - 1] ?? null;
|
|
20
|
+
if (objectIds.length > 0) {
|
|
21
|
+
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
22
|
+
const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];
|
|
23
|
+
const invalidId = objectIds.find(id => !document || !isEditorCommandHierarchyObjectSelectable(options, document, id, hierarchy));
|
|
24
|
+
if (invalidId) {
|
|
25
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SELECTION_SET, `Object is not selectable: ${invalidId}`, { code: 'selection.notSelectable', objectId: invalidId });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const command = objectIds.length > 0
|
|
29
|
+
? {
|
|
30
|
+
type: 'selection.replace',
|
|
31
|
+
selectedIds: objectIds,
|
|
32
|
+
activeId,
|
|
33
|
+
label: 'Agent Selection',
|
|
34
|
+
}
|
|
35
|
+
: { type: 'selection.clear', label: 'Agent Selection' };
|
|
36
|
+
operations.dispatchSelectionCommand(command, true);
|
|
37
|
+
return {
|
|
38
|
+
selection: cloneEditorCommandSelection(getEditorCommandSafeSceneSelection(operations)),
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function normalizeEditorCommandSelectionInput(input) {
|
|
44
|
+
const ids = Array.isArray(input.objectIds) ? input.objectIds : input.objectId ? [input.objectId] : null;
|
|
45
|
+
if (!ids)
|
|
46
|
+
return null;
|
|
47
|
+
const normalized = [];
|
|
48
|
+
const seen = new Set();
|
|
49
|
+
for (const id of ids) {
|
|
50
|
+
if (typeof id !== 'string')
|
|
51
|
+
continue;
|
|
52
|
+
const trimmed = id.trim();
|
|
53
|
+
if (!trimmed || seen.has(trimmed))
|
|
54
|
+
continue;
|
|
55
|
+
seen.add(trimmed);
|
|
56
|
+
normalized.push(trimmed);
|
|
57
|
+
}
|
|
58
|
+
return normalized;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.js","sourceRoot":"","sources":["../../../src/editor-commands/capabilities/selection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,GAElB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,8BAA8B,EAC9B,wCAAwC,GAGzC,MAAM,cAAc,CAAC;AAGtB,MAAM,UAAU,uCAAuC,CACrD,KAAwD,EACxD,OAA6D,EAC7D,UAAmE;IAEnE,OAAO;QACL,YAAY;YACV,OAAO,2BAA2B,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC,CAAC;QACrF,CAAC;QACD,YAAY,CAAC,KAAK;YAChB,IAAI,CAAC,8BAA8B,CAAC,UAAU,CAAC,EAAE,CAAC;gBAChD,OAAO,+BAA+B,CACpC,iBAAiB,CAAC,aAAa,EAC/B,mEAAmE,EACnE,EAAE,IAAI,EAAE,8BAA8B,EAAE,CACzC,CAAC;YACJ,CAAC;YACD,MAAM,SAAS,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;YAC9D,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,+BAA+B,CACpC,iBAAiB,CAAC,aAAa,EAC/B,+CAA+C,EAC/C,EAAE,IAAI,EAAE,wBAAwB,EAAE,CACnC,CAAC;YACJ,CAAC;YACD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;gBACnE,CAAC,CAAC,KAAK,CAAC,QAAQ;gBAChB,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;YAC5C,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACzB,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC,eAAe,IAAI,IAAI,CAAC;gBAC5F,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjF,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAC9B,EAAE,CAAC,EAAE,CAAC,CAAC,QAAQ,IAAI,CAAC,wCAAwC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,CAC/F,CAAC;gBACF,IAAI,SAAS,EAAE,CAAC;oBACd,OAAO,+BAA+B,CACpC,iBAAiB,CAAC,aAAa,EAC/B,6BAA6B,SAAS,EAAE,EACxC,EAAE,IAAI,EAAE,yBAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,CACzD,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,MAAM,OAAO,GAAqB,SAAS,CAAC,MAAM,GAAG,CAAC;gBACpD,CAAC,CAAC;oBACE,IAAI,EAAE,mBAAmB;oBACzB,WAAW,EAAE,SAAS;oBACtB,QAAQ;oBACR,KAAK,EAAE,iBAAiB;iBACzB;gBACH,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;YAC1D,UAAU,CAAC,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACnD,OAAO;gBACL,SAAS,EAAE,2BAA2B,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC;aACvF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,oCAAoC,CAAC,KAAqC;IACjF,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxG,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,IAAI,OAAO,EAAE,KAAK,QAAQ;YAAE,SAAS;QACrC,MAAM,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE,SAAS;QAC5C,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import {\n EDITOR_COMMAND_ID,\n type EditorCommandSelectionSetInput,\n} from '@fps-games/editor-protocol';\nimport type { SelectionCommand } from '@fps-games/editor-core';\nimport { createLocalEditorCommandFailure } from '../diagnostics.js';\nimport type { LocalEditorCommandSelectionSource } from '../source-types.js';\nimport {\n cloneEditorCommandSelection,\n getEditorCommandSafeSceneHierarchy,\n getEditorCommandSafeSceneSelection,\n hasEditorCommandSafeSceneScope,\n isEditorCommandHierarchyObjectSelectable,\n type LocalEditorCommandCapabilitySourceOperations,\n type LocalEditorCommandHarnessState,\n} from '../shared.js';\nimport type { LocalEditorHarnessOptions } from '../../local-editor-harness.js';\n\nexport function createLocalEditorCommandSelectionSource<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): LocalEditorCommandSelectionSource {\n return {\n getSelection() {\n return cloneEditorCommandSelection(getEditorCommandSafeSceneSelection(operations));\n },\n setSelection(input) {\n if (!hasEditorCommandSafeSceneScope(operations)) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.SELECTION_SET,\n 'Scene selection is unavailable outside the Scene Hierarchy scope.',\n { code: 'selection.sceneScopeRequired' },\n );\n }\n const objectIds = normalizeEditorCommandSelectionInput(input);\n if (!objectIds) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.SELECTION_SET,\n 'selection.set requires objectId or objectIds.',\n { code: 'selection.invalidInput' },\n );\n }\n const activeId = input.activeId && objectIds.includes(input.activeId)\n ? input.activeId\n : objectIds[objectIds.length - 1] ?? null;\n if (objectIds.length > 0) {\n const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;\n const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];\n const invalidId = objectIds.find(\n id => !document || !isEditorCommandHierarchyObjectSelectable(options, document, id, hierarchy),\n );\n if (invalidId) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.SELECTION_SET,\n `Object is not selectable: ${invalidId}`,\n { code: 'selection.notSelectable', objectId: invalidId },\n );\n }\n }\n const command: SelectionCommand = objectIds.length > 0\n ? {\n type: 'selection.replace',\n selectedIds: objectIds,\n activeId,\n label: 'Agent Selection',\n }\n : { type: 'selection.clear', label: 'Agent Selection' };\n operations.dispatchSelectionCommand(command, true);\n return {\n selection: cloneEditorCommandSelection(getEditorCommandSafeSceneSelection(operations)),\n };\n },\n };\n}\n\nfunction normalizeEditorCommandSelectionInput(input: EditorCommandSelectionSetInput): string[] | null {\n const ids = Array.isArray(input.objectIds) ? input.objectIds : input.objectId ? [input.objectId] : null;\n if (!ids) return null;\n const normalized: string[] = [];\n const seen = new Set<string>();\n for (const id of ids) {\n if (typeof id !== 'string') continue;\n const trimmed = id.trim();\n if (!trimmed || seen.has(trimmed)) continue;\n seen.add(trimmed);\n normalized.push(trimmed);\n }\n return normalized;\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LocalEditorCommandShadowSource } from '../source-types.js';
|
|
2
|
+
import { type LocalEditorCommandCapabilitySourceOperations, type LocalEditorCommandHarnessState } from '../shared.js';
|
|
3
|
+
import type { LocalEditorHarnessOptions } from '../../local-editor-harness.js';
|
|
4
|
+
export declare function createLocalEditorCommandShadowSource<TDocument, TPatch, TAsset>(state: LocalEditorCommandHarnessState<TDocument, TPatch>, options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>, renderUi: () => void, operations: LocalEditorCommandCapabilitySourceOperations<TDocument>): LocalEditorCommandShadowSource;
|
|
5
|
+
//# sourceMappingURL=shadows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/editor-commands/capabilities/shadows.ts"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAOL,KAAK,4CAA4C,EACjD,KAAK,8BAA8B,EAKpC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAwF/E,wBAAgB,oCAAoC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAC5E,KAAK,EAAE,8BAA8B,CAAC,SAAS,EAAE,MAAM,CAAC,EACxD,OAAO,EAAE,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAC7D,QAAQ,EAAE,MAAM,IAAI,EACpB,UAAU,EAAE,4CAA4C,CAAC,SAAS,CAAC,GAClE,8BAA8B,CA2fhC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { collectEditorShadowReceiverCandidates, detectEditorSceneDirectionalLightOrientationDrift, findEditorSceneModelRenderer, findEditorScenePrefabAsset, findEditorScenePrefabNode, findEditorSceneTransform, normalizeEditorSceneLightDirectionVector, readEditorScenePrefabNodes, readEditorScenePrefabRootNodeId, resolveEditorSceneGameObjectShadowSettings, resolveEditorSceneGameObjectRuntimeEntityIds, resolveEditorScenePrefabInstanceRelation, resolveEditorShadowPlan, } from '@fps-games/editor-playable-sdk';
|
|
2
2
|
import { assertEditorShadowSettingsContract, assertShadowMapExperimentConfig, createShadowMapExperimentPlanSnapshot, createShadowMapExperimentPlanFingerprint, mergeEditorShadowSettings, readEditorShadowSettings, resolveEditorShadowParams, } from '@fps-games/playable-rendering';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { EDITOR_COMMAND_ID, } from '@fps-games/editor-protocol';
|
|
4
|
+
import { createLocalEditorCommandFailure, editorTransformSnapshotToAgentTransform, } from '../diagnostics.js';
|
|
5
|
+
import { createEditorCommandSafePrefabReadModel, getEditorCommandSafeSceneSelection, hasEditorCommandSafeSceneScope, isEditorCommandSafeSceneObjectId, normalizeEditorCommandIdList, normalizeEditorCommandString, } from '../shared.js';
|
|
6
6
|
const SHADOW_POLICY_FIELDS = [
|
|
7
7
|
'shadow.cast',
|
|
8
8
|
'shadow.receive',
|
|
@@ -20,35 +20,35 @@ const SHADOW_POLICY_FIELDS = [
|
|
|
20
20
|
'shadow.params.bakeSamples',
|
|
21
21
|
'shadow.params.blurKernel',
|
|
22
22
|
];
|
|
23
|
-
export function
|
|
23
|
+
export function createLocalEditorCommandShadowSource(state, options, renderUi, operations) {
|
|
24
24
|
return {
|
|
25
25
|
getShadowMapExperimentConfig() {
|
|
26
|
-
const config = readShadowMapExperimentConfig(options,
|
|
26
|
+
const config = readShadowMapExperimentConfig(options, EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_CONFIG_GET);
|
|
27
27
|
if (!config.ok)
|
|
28
28
|
return config.result;
|
|
29
29
|
return createShadowMapExperimentConfigOutput(config.config);
|
|
30
30
|
},
|
|
31
31
|
getShadowMapExperimentPolicy(input) {
|
|
32
|
-
const config = readShadowMapExperimentConfig(options,
|
|
32
|
+
const config = readShadowMapExperimentConfig(options, EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_GET);
|
|
33
33
|
if (!config.ok)
|
|
34
34
|
return config.result;
|
|
35
|
-
const resolved = resolveShadowMapExperimentTarget(
|
|
35
|
+
const resolved = resolveShadowMapExperimentTarget(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_GET, state, input, operations);
|
|
36
36
|
if (!resolved.ok)
|
|
37
37
|
return resolved.result;
|
|
38
38
|
return createShadowMapExperimentPolicyOutput(resolved.target, config.config, readShadowMapExperimentPlan(options, resolved.target.rawDocument));
|
|
39
39
|
},
|
|
40
40
|
setShadowMapExperimentPolicy(input) {
|
|
41
|
-
const config = readShadowMapExperimentConfig(options,
|
|
41
|
+
const config = readShadowMapExperimentConfig(options, EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET);
|
|
42
42
|
if (!config.ok)
|
|
43
43
|
return config.result;
|
|
44
44
|
if (!config.config) {
|
|
45
|
-
return
|
|
45
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, 'Shadow Map experiment config is not available.', { code: 'shadowMapExperiment.configMissing' });
|
|
46
46
|
}
|
|
47
47
|
const validation = validateShadowMapExperimentPolicySetInput(input, config.config);
|
|
48
48
|
if (!validation.ok) {
|
|
49
|
-
return
|
|
49
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, validation.message, { code: 'shadowMapExperiment.invalidInput', details: { scope: input.scope } });
|
|
50
50
|
}
|
|
51
|
-
const resolved = resolveShadowMapExperimentTarget(
|
|
51
|
+
const resolved = resolveShadowMapExperimentTarget(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, state, input, operations);
|
|
52
52
|
if (!resolved.ok)
|
|
53
53
|
return resolved.result;
|
|
54
54
|
return setShadowMapExperimentPolicy(state, options, renderUi, operations, resolved.target, input, config.config);
|
|
@@ -56,7 +56,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
56
56
|
previewShadowMapExperimentPlan() {
|
|
57
57
|
const rawDocument = state.session?.getState({ cloneDocuments: false }).workingDocument;
|
|
58
58
|
if (state.mode !== 'editor' || !rawDocument) {
|
|
59
|
-
return
|
|
59
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_PLAN_PREVIEW, 'Editor is not in edit mode.', { code: 'editor.notReady' });
|
|
60
60
|
}
|
|
61
61
|
const plan = readShadowMapExperimentPlan(options, rawDocument);
|
|
62
62
|
return { plan: plan ? structuredClone(plan) : null };
|
|
@@ -64,7 +64,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
64
64
|
snapshotShadowMapExperimentRuntime() {
|
|
65
65
|
const rawDocument = state.session?.getState({ cloneDocuments: false }).workingDocument;
|
|
66
66
|
if (state.mode !== 'editor' || !rawDocument) {
|
|
67
|
-
return
|
|
67
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_RUNTIME_SNAPSHOT, 'Editor is not in edit mode.', { code: 'editor.notReady' });
|
|
68
68
|
}
|
|
69
69
|
const evidence = operations.getShadowPreviewDebugInfo?.()?.shadowMapExperiment ?? null;
|
|
70
70
|
const sourcePlan = readShadowMapExperimentPlan(options, rawDocument);
|
|
@@ -87,7 +87,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
87
87
|
};
|
|
88
88
|
},
|
|
89
89
|
getPolicy(input) {
|
|
90
|
-
const resolved = resolveShadowTarget(
|
|
90
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_POLICY_GET, state, input, operations);
|
|
91
91
|
if (!resolved.ok)
|
|
92
92
|
return resolved.result;
|
|
93
93
|
return createShadowPolicyGetOutput(resolved.target, resolveCanonicalShadowMapExperimentPlan(options, resolved.target, operations));
|
|
@@ -95,9 +95,9 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
95
95
|
setPolicy(input) {
|
|
96
96
|
const policy = normalizeShadowPolicy(input.policy);
|
|
97
97
|
if (!policy.ok) {
|
|
98
|
-
return
|
|
98
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_POLICY_SET, policy.message, { code: 'shadow.invalidInput', details: { hasPolicy: input.policy != null } });
|
|
99
99
|
}
|
|
100
|
-
const resolved = resolveShadowTarget(
|
|
100
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_POLICY_SET, state, input, operations);
|
|
101
101
|
if (!resolved.ok)
|
|
102
102
|
return resolved.result;
|
|
103
103
|
if (resolved.target.kind === 'scene') {
|
|
@@ -106,7 +106,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
106
106
|
return setPrefabStageShadowPolicy(renderUi, operations, resolved.target, policy.settings);
|
|
107
107
|
},
|
|
108
108
|
listReceivers(input) {
|
|
109
|
-
const resolved = resolveShadowTarget(
|
|
109
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_RECEIVERS_LIST, state, input, operations);
|
|
110
110
|
if (!resolved.ok)
|
|
111
111
|
return resolved.result;
|
|
112
112
|
const casterId = getResolvedTargetCasterId(resolved.target);
|
|
@@ -127,12 +127,12 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
127
127
|
resolvePreview(input) {
|
|
128
128
|
const policy = input.policy === undefined ? { ok: true, settings: undefined } : normalizeShadowPolicy(input.policy);
|
|
129
129
|
if (!policy.ok) {
|
|
130
|
-
return
|
|
130
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_RESOLVE_PREVIEW, policy.message, { code: 'shadow.invalidInput', details: { hasPolicy: input.policy != null } });
|
|
131
131
|
}
|
|
132
|
-
const resolved = resolveShadowTarget(
|
|
132
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_RESOLVE_PREVIEW, state, input, operations);
|
|
133
133
|
if (!resolved.ok)
|
|
134
134
|
return resolved.result;
|
|
135
|
-
const receiverIds =
|
|
135
|
+
const receiverIds = normalizeEditorCommandIdList(input.receiverIds ?? []);
|
|
136
136
|
const casterId = getResolvedTargetCasterId(resolved.target);
|
|
137
137
|
const planInput = {
|
|
138
138
|
document: resolved.target.document,
|
|
@@ -179,7 +179,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
179
179
|
};
|
|
180
180
|
},
|
|
181
181
|
inspectDebug(input) {
|
|
182
|
-
const resolved = resolveShadowTarget(
|
|
182
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_DEBUG_INSPECT, state, input, operations);
|
|
183
183
|
if (!resolved.ok)
|
|
184
184
|
return resolved.result;
|
|
185
185
|
return createShadowDebugInspectOutput(resolved.target, state, {
|
|
@@ -190,7 +190,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
190
190
|
});
|
|
191
191
|
},
|
|
192
192
|
enterDebugContext(input) {
|
|
193
|
-
const resolved = resolveShadowTarget(
|
|
193
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_DEBUG_CONTEXT_ENTER, state, input, operations);
|
|
194
194
|
if (!resolved.ok)
|
|
195
195
|
return resolved.result;
|
|
196
196
|
return enterShadowDebugContext(state, renderUi, operations, resolved.target, input, resolveCanonicalShadowMapExperimentPlan(options, resolved.target, operations));
|
|
@@ -199,7 +199,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
199
199
|
return clearShadowDebugContext(state, renderUi, operations);
|
|
200
200
|
},
|
|
201
201
|
setDebugOverlay(input) {
|
|
202
|
-
const resolved = resolveShadowTarget(
|
|
202
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_DEBUG_OVERLAY_SET, state, input, operations);
|
|
203
203
|
if (!resolved.ok)
|
|
204
204
|
return resolved.result;
|
|
205
205
|
const inspect = createShadowDebugInspectOutput(resolved.target, state, {
|
|
@@ -241,7 +241,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
241
241
|
};
|
|
242
242
|
},
|
|
243
243
|
measureVisibility(input) {
|
|
244
|
-
const resolved = resolveShadowTarget(
|
|
244
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_DEBUG_VISIBILITY_MEASURE, state, input, operations);
|
|
245
245
|
if (!resolved.ok)
|
|
246
246
|
return resolved.result;
|
|
247
247
|
const inspect = createShadowDebugInspectOutput(resolved.target, state, {
|
|
@@ -253,10 +253,10 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
253
253
|
return createShadowDebugVisibilityMeasureOutput(inspect, input);
|
|
254
254
|
},
|
|
255
255
|
async bakeStatic(input) {
|
|
256
|
-
const resolved = resolveShadowTarget(
|
|
256
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_STATIC_BAKE, state, input, operations);
|
|
257
257
|
if (!resolved.ok)
|
|
258
258
|
return resolved.result;
|
|
259
|
-
const receiverIds =
|
|
259
|
+
const receiverIds = normalizeEditorCommandIdList(input.receiverIds ?? []);
|
|
260
260
|
const casterId = getResolvedTargetCasterId(resolved.target);
|
|
261
261
|
const quality = input.quality && input.quality !== 'inherit' ? input.quality : undefined;
|
|
262
262
|
const effectivePolicy = getResolvedTargetShadowPolicy(resolved.target);
|
|
@@ -324,7 +324,7 @@ export function createLocalEditorAgentBridgeShadowSource(state, options, renderU
|
|
|
324
324
|
};
|
|
325
325
|
},
|
|
326
326
|
invalidateStatic(input) {
|
|
327
|
-
const resolved = resolveShadowTarget(
|
|
327
|
+
const resolved = resolveShadowTarget(EDITOR_COMMAND_ID.SHADOW_STATIC_INVALIDATE, state, input, operations);
|
|
328
328
|
if (!resolved.ok)
|
|
329
329
|
return resolved.result;
|
|
330
330
|
const targetDiagnostics = createShadowTargetDiagnostics(resolved.target);
|
|
@@ -413,7 +413,7 @@ function readShadowMapExperimentConfig(options, capabilityId) {
|
|
|
413
413
|
catch (error) {
|
|
414
414
|
return {
|
|
415
415
|
ok: false,
|
|
416
|
-
result:
|
|
416
|
+
result: createLocalEditorCommandFailure(capabilityId, error instanceof Error ? error.message : String(error), { code: 'shadowMapExperiment.invalidConfig' }),
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
419
|
}
|
|
@@ -624,7 +624,7 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
624
624
|
if (state.mode !== 'editor' || !state.session) {
|
|
625
625
|
return {
|
|
626
626
|
ok: false,
|
|
627
|
-
result:
|
|
627
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Editor is not in edit mode.', { code: 'editor.notReady' }),
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
630
|
const sessionState = state.session.getState({ cloneDocuments: false });
|
|
@@ -632,16 +632,16 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
632
632
|
if (!document) {
|
|
633
633
|
return {
|
|
634
634
|
ok: false,
|
|
635
|
-
result:
|
|
635
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Shadow Map profiles require an editor scene document.', {
|
|
636
636
|
code: 'shadowMapExperiment.unsupportedDocument',
|
|
637
637
|
}),
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
640
|
if (input.scope === 'scene') {
|
|
641
|
-
if (!
|
|
641
|
+
if (!hasEditorCommandSafeSceneScope(operations)) {
|
|
642
642
|
return {
|
|
643
643
|
ok: false,
|
|
644
|
-
result:
|
|
644
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Scene Shadow Map profiles require the active Scene Hierarchy scope.', {
|
|
645
645
|
code: 'shadowMapExperiment.scopeMismatch',
|
|
646
646
|
}),
|
|
647
647
|
};
|
|
@@ -657,14 +657,14 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
659
|
if (input.scope === 'object') {
|
|
660
|
-
const objectId =
|
|
661
|
-
const gameObject = objectId &&
|
|
660
|
+
const objectId = normalizeEditorCommandString(input.objectId);
|
|
661
|
+
const gameObject = objectId && isEditorCommandSafeSceneObjectId(operations, objectId)
|
|
662
662
|
? findShadowGameObject(document, objectId)
|
|
663
663
|
: null;
|
|
664
664
|
if (!gameObject) {
|
|
665
665
|
return {
|
|
666
666
|
ok: false,
|
|
667
|
-
result:
|
|
667
|
+
result: createLocalEditorCommandFailure(capabilityId, objectId
|
|
668
668
|
? `Shadow Map target object not found: ${objectId}`
|
|
669
669
|
: 'objectId is required for object scope.', {
|
|
670
670
|
code: objectId ? 'shadowMapExperiment.targetNotFound' : 'shadowMapExperiment.targetRequired',
|
|
@@ -687,7 +687,7 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
687
687
|
if (input.scope !== 'prefab-node') {
|
|
688
688
|
return {
|
|
689
689
|
ok: false,
|
|
690
|
-
result:
|
|
690
|
+
result: createLocalEditorCommandFailure(capabilityId, `Unsupported Shadow Map target scope: ${String(input.scope)}`, {
|
|
691
691
|
code: 'shadowMapExperiment.invalidScope',
|
|
692
692
|
}),
|
|
693
693
|
};
|
|
@@ -696,16 +696,16 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
696
696
|
if (!details) {
|
|
697
697
|
return {
|
|
698
698
|
ok: false,
|
|
699
|
-
result:
|
|
699
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Open the target Prefab stage before editing a prefab-node profile.', {
|
|
700
700
|
code: 'prefab.stageNotOpen',
|
|
701
701
|
}),
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
const requestedAssetId =
|
|
704
|
+
const requestedAssetId = normalizeEditorCommandString(input.prefabAssetId);
|
|
705
705
|
if (requestedAssetId && requestedAssetId !== details.stage.assetId && requestedAssetId !== details.stage.browserAssetId) {
|
|
706
706
|
return {
|
|
707
707
|
ok: false,
|
|
708
|
-
result:
|
|
708
|
+
result: createLocalEditorCommandFailure(capabilityId, `Open Prefab stage does not match ${requestedAssetId}.`, {
|
|
709
709
|
code: 'prefab.stageAssetMismatch',
|
|
710
710
|
details: { requestedAssetId, openAssetId: details.stage.assetId },
|
|
711
711
|
}),
|
|
@@ -714,7 +714,7 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
714
714
|
if (!hasActivePrefabHierarchyScope(operations, details)) {
|
|
715
715
|
return {
|
|
716
716
|
ok: false,
|
|
717
|
-
result:
|
|
717
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Open Prefab stage does not own the active Hierarchy authority.', {
|
|
718
718
|
code: 'shadowMapExperiment.scopeMismatch',
|
|
719
719
|
details: { prefabAssetId: details.stage.assetId },
|
|
720
720
|
}),
|
|
@@ -722,13 +722,13 @@ function resolveShadowMapExperimentTarget(capabilityId, state, input, operations
|
|
|
722
722
|
}
|
|
723
723
|
const prefabAsset = findEditorScenePrefabAsset(document, details.stage.assetId);
|
|
724
724
|
const rootNodeId = readEditorScenePrefabRootNodeId(prefabAsset);
|
|
725
|
-
const safeModel =
|
|
725
|
+
const safeModel = createEditorCommandSafePrefabReadModel(operations.getHierarchyReadModel(), details.nodeDetails);
|
|
726
726
|
const nodeId = resolveSafePrefabNodeAuthoredId(safeModel, normalizePrefabNodeId(input.nodeId));
|
|
727
727
|
const node = prefabAsset && nodeId ? findEditorScenePrefabNode(prefabAsset, nodeId) : null;
|
|
728
728
|
if (!prefabAsset || !rootNodeId || !nodeId || !node) {
|
|
729
729
|
return {
|
|
730
730
|
ok: false,
|
|
731
|
-
result:
|
|
731
|
+
result: createLocalEditorCommandFailure(capabilityId, `Prefab node not found: ${nodeId ?? '(none)'}`, {
|
|
732
732
|
code: 'prefab.nodeNotFound',
|
|
733
733
|
details: { prefabAssetId: details.stage.assetId, nodeId },
|
|
734
734
|
}),
|
|
@@ -875,11 +875,11 @@ function resolveEffectiveShadowMapExperimentBehaviorProfile(resolved, config, pl
|
|
|
875
875
|
function readAssetShadowMapExperimentBehaviorProfile(asset) {
|
|
876
876
|
if (!isRecord(asset) || !isRecord(asset.defaults) || !isRecord(asset.defaults.shadowMapExperiment))
|
|
877
877
|
return null;
|
|
878
|
-
return
|
|
878
|
+
return normalizeEditorCommandString(asset.defaults.shadowMapExperiment.behaviorProfile) || null;
|
|
879
879
|
}
|
|
880
880
|
function setShadowMapExperimentPolicy(state, options, renderUi, operations, resolved, input, config) {
|
|
881
881
|
if (!state.session) {
|
|
882
|
-
return
|
|
882
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, 'Editor is not in edit mode.', { code: 'editor.notReady' });
|
|
883
883
|
}
|
|
884
884
|
const authored = readAuthoredShadowMapExperimentProfiles(resolved);
|
|
885
885
|
const hasQualityProfile = Object.prototype.hasOwnProperty.call(input, 'qualityProfile');
|
|
@@ -900,7 +900,7 @@ function setShadowMapExperimentPolicy(state, options, renderUi, operations, reso
|
|
|
900
900
|
...(hasBehaviorProfile ? { behaviorProfile: input.behaviorProfile ?? null } : {}),
|
|
901
901
|
});
|
|
902
902
|
if (!patch) {
|
|
903
|
-
return
|
|
903
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, 'The project rendering capability does not expose a scene Shadow Map profile patch.', { code: 'shadowMapExperiment.scenePatchUnavailable' });
|
|
904
904
|
}
|
|
905
905
|
const result = state.session.dispatch({
|
|
906
906
|
type: 'document.patch',
|
|
@@ -922,7 +922,7 @@ function setShadowMapExperimentPolicy(state, options, renderUi, operations, reso
|
|
|
922
922
|
source: 'custom',
|
|
923
923
|
});
|
|
924
924
|
if (!patch) {
|
|
925
|
-
return
|
|
925
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, `Unable to create Shadow Map profile patch for ${resolved.objectId}.`, { code: 'shadowMapExperiment.objectPatchUnavailable', objectId: resolved.objectId });
|
|
926
926
|
}
|
|
927
927
|
const result = state.session.dispatch({
|
|
928
928
|
type: 'document.patch',
|
|
@@ -941,7 +941,7 @@ function setShadowMapExperimentPolicy(state, options, renderUi, operations, reso
|
|
|
941
941
|
value: input.behaviorProfile == null ? null : { behaviorProfile: input.behaviorProfile },
|
|
942
942
|
});
|
|
943
943
|
if (!changed) {
|
|
944
|
-
return
|
|
944
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_SET, `Shadow Map profile action did not change prefab node: ${resolved.nodeId}`, { code: 'shadowMapExperiment.prefabPatchUnavailable', details: { prefabAssetId: resolved.prefabAssetId, nodeId: resolved.nodeId } });
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
if (changed) {
|
|
@@ -951,7 +951,7 @@ function setShadowMapExperimentPolicy(state, options, renderUi, operations, reso
|
|
|
951
951
|
operations.refreshShadowPreview?.();
|
|
952
952
|
renderUi();
|
|
953
953
|
}
|
|
954
|
-
const nextResolved = resolveShadowMapExperimentTarget(
|
|
954
|
+
const nextResolved = resolveShadowMapExperimentTarget(EDITOR_COMMAND_ID.SHADOW_MAP_EXPERIMENT_POLICY_GET, state, resolved.target, operations);
|
|
955
955
|
if (!nextResolved.ok)
|
|
956
956
|
return nextResolved.result;
|
|
957
957
|
return {
|
|
@@ -992,7 +992,7 @@ function createShadowDebugInspectOutput(resolved, state, options = {}, extraOpti
|
|
|
992
992
|
const casterId = getResolvedTargetCasterId(resolved);
|
|
993
993
|
const projectionContext = options.projectionContext ?? createIdentityShadowProjectionContext();
|
|
994
994
|
const effectivePolicy = getResolvedTargetShadowPolicy(resolved);
|
|
995
|
-
const receiverIds =
|
|
995
|
+
const receiverIds = normalizeEditorCommandIdList(options.receiverIds ?? []);
|
|
996
996
|
const planInput = {
|
|
997
997
|
document: resolved.document,
|
|
998
998
|
casterId,
|
|
@@ -1038,7 +1038,7 @@ function createShadowDebugInspectOutput(resolved, state, options = {}, extraOpti
|
|
|
1038
1038
|
}
|
|
1039
1039
|
function enterShadowDebugContext(state, renderUi, operations, resolved, input, canonicalPlan = null) {
|
|
1040
1040
|
const projectionContext = createShadowProjectionContext(resolved, operations);
|
|
1041
|
-
const receiverIds =
|
|
1041
|
+
const receiverIds = normalizeEditorCommandIdList(input.receiverIds ?? []);
|
|
1042
1042
|
const initialInspect = createShadowDebugInspectOutput(resolved, state, {
|
|
1043
1043
|
receiverIds,
|
|
1044
1044
|
projectionContext,
|
|
@@ -1070,7 +1070,7 @@ function enterShadowDebugContext(state, renderUi, operations, resolved, input, c
|
|
|
1070
1070
|
}
|
|
1071
1071
|
const objectIds = state.projection?.getProjectedNodeIds?.() ?? [...projectionKeepIds];
|
|
1072
1072
|
if (objectIds.length === 0) {
|
|
1073
|
-
return
|
|
1073
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_DEBUG_CONTEXT_ENTER, 'Viewport projection is unavailable or has no projected objects for Shadow Debug Context.', { code: 'viewport.projectionUnavailable' });
|
|
1074
1074
|
}
|
|
1075
1075
|
const nextOverrides = {};
|
|
1076
1076
|
for (const objectId of objectIds)
|
|
@@ -1086,7 +1086,7 @@ function enterShadowDebugContext(state, renderUi, operations, resolved, input, c
|
|
|
1086
1086
|
id,
|
|
1087
1087
|
projectionContext.resolveProjectionId(id),
|
|
1088
1088
|
])])];
|
|
1089
|
-
state.previewVisibility.reason =
|
|
1089
|
+
state.previewVisibility.reason = normalizeEditorCommandString(input.reason)
|
|
1090
1090
|
|| `Shadow Debug Context for ${targetId}`;
|
|
1091
1091
|
state.projection?.clearPreviewVisibilityOverrides?.();
|
|
1092
1092
|
const entries = state.projection?.setPreviewVisibilityOverrides?.(nextOverrides) ?? [];
|
|
@@ -1245,7 +1245,7 @@ function collectShadowDebugAmbientLightIds(document, shadowLightId) {
|
|
|
1245
1245
|
function createShadowDebugOverlayItems(inspect, input) {
|
|
1246
1246
|
const items = [];
|
|
1247
1247
|
const flags = readShadowDebugOverlayFlags(input);
|
|
1248
|
-
const receiverIds = new Set(
|
|
1248
|
+
const receiverIds = new Set(normalizeEditorCommandIdList(input.receiverIds ?? []));
|
|
1249
1249
|
const targetId = inspect.caster?.objectId ?? inspect.caster?.nodeId ?? 'target';
|
|
1250
1250
|
const casterBounds = createOverlayBounds(inspect.caster?.bounds);
|
|
1251
1251
|
if (flags.showCasterBounds && casterBounds) {
|
|
@@ -1322,10 +1322,10 @@ function createShadowDebugVisibilityMeasureOutput(inspect, input) {
|
|
|
1322
1322
|
severity: 'info',
|
|
1323
1323
|
source: 'editor',
|
|
1324
1324
|
code: 'shadow.pixelReadbackUnavailable',
|
|
1325
|
-
message: 'Pixel readback is not available in this
|
|
1325
|
+
message: 'Pixel readback is not available in this renderer attachment, so shadow visibility is measured structurally from policy, receivers, footprint, and runtime evidence.',
|
|
1326
1326
|
},
|
|
1327
1327
|
];
|
|
1328
|
-
const requestedReceiverIds =
|
|
1328
|
+
const requestedReceiverIds = normalizeEditorCommandIdList(input.receiverIds ?? []);
|
|
1329
1329
|
const renderableCount = inspect.runtimeEvidence.renderableShadowPrimitiveCount ?? 0;
|
|
1330
1330
|
let visibleScore = 0;
|
|
1331
1331
|
let coverage = 0;
|
|
@@ -1534,7 +1534,7 @@ function createOverlayBoundsFromCenterSize(center, size) {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
function setSceneShadowPolicy(state, options, renderUi, operations, resolved, policy) {
|
|
1536
1536
|
if (!state.session) {
|
|
1537
|
-
return
|
|
1537
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_POLICY_SET, 'Editor is not in edit mode.', { code: 'editor.notReady', objectId: resolved.objectId });
|
|
1538
1538
|
}
|
|
1539
1539
|
let changed = false;
|
|
1540
1540
|
let workingDocument = resolved.rawDocument;
|
|
@@ -1579,7 +1579,7 @@ function setSceneShadowPolicy(state, options, renderUi, operations, resolved, po
|
|
|
1579
1579
|
const nextDocument = asEditorSceneDocument(workingDocument);
|
|
1580
1580
|
const nextObject = nextDocument ? findShadowGameObject(nextDocument, resolved.objectId) : null;
|
|
1581
1581
|
if (!nextDocument || !nextObject) {
|
|
1582
|
-
return
|
|
1582
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_POLICY_SET, `Shadow target disappeared after patch: ${resolved.objectId}`, { code: 'shadow.targetMissing', objectId: resolved.objectId });
|
|
1583
1583
|
}
|
|
1584
1584
|
const output = createShadowPolicyGetOutput({
|
|
1585
1585
|
kind: 'scene',
|
|
@@ -1608,7 +1608,7 @@ function setPrefabStageShadowPolicy(renderUi, operations, resolved, policy) {
|
|
|
1608
1608
|
value: policy ?? null,
|
|
1609
1609
|
});
|
|
1610
1610
|
if (!changed) {
|
|
1611
|
-
return
|
|
1611
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.SHADOW_POLICY_SET, `Shadow policy action did not change prefab node: ${resolved.nodeId}`, { code: 'shadow.policyUnchanged', details: { assetId: resolved.details.stage.assetId, nodeId: resolved.nodeId } });
|
|
1612
1612
|
}
|
|
1613
1613
|
renderUi();
|
|
1614
1614
|
const nextDetails = operations.getPrefabStageDetails() ?? resolved.details;
|
|
@@ -1659,26 +1659,26 @@ function resolveShadowTarget(capabilityId, state, input, operations) {
|
|
|
1659
1659
|
if (state.mode !== 'editor' || !state.session) {
|
|
1660
1660
|
return {
|
|
1661
1661
|
ok: false,
|
|
1662
|
-
result:
|
|
1662
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Editor is not in edit mode.', { code: 'editor.notReady' }),
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
1665
|
const sessionState = state.session.getState({ cloneDocuments: false });
|
|
1666
1666
|
const document = asEditorSceneDocument(sessionState.workingDocument);
|
|
1667
|
-
const objectId =
|
|
1667
|
+
const objectId = normalizeEditorCommandString(input.objectId);
|
|
1668
1668
|
if (objectId) {
|
|
1669
1669
|
if (!document) {
|
|
1670
1670
|
return {
|
|
1671
1671
|
ok: false,
|
|
1672
|
-
result:
|
|
1672
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Shadow capabilities require an editor scene document.', {
|
|
1673
1673
|
code: 'shadow.unsupportedDocument',
|
|
1674
1674
|
details: { objectId },
|
|
1675
1675
|
}),
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
|
-
if (!
|
|
1678
|
+
if (!isEditorCommandSafeSceneObjectId(operations, objectId)) {
|
|
1679
1679
|
return {
|
|
1680
1680
|
ok: false,
|
|
1681
|
-
result:
|
|
1681
|
+
result: createLocalEditorCommandFailure(capabilityId, `Shadow target object is unavailable in the safe Scene Hierarchy projection: ${objectId}`, {
|
|
1682
1682
|
code: 'shadow.targetNotFound',
|
|
1683
1683
|
objectId,
|
|
1684
1684
|
}),
|
|
@@ -1688,7 +1688,7 @@ function resolveShadowTarget(capabilityId, state, input, operations) {
|
|
|
1688
1688
|
if (!gameObject) {
|
|
1689
1689
|
return {
|
|
1690
1690
|
ok: false,
|
|
1691
|
-
result:
|
|
1691
|
+
result: createLocalEditorCommandFailure(capabilityId, `Shadow target object not found: ${objectId}`, {
|
|
1692
1692
|
code: 'shadow.targetNotFound',
|
|
1693
1693
|
objectId,
|
|
1694
1694
|
}),
|
|
@@ -1711,7 +1711,7 @@ function resolveShadowTarget(capabilityId, state, input, operations) {
|
|
|
1711
1711
|
if (!hasActivePrefabHierarchyScope(operations, details)) {
|
|
1712
1712
|
return {
|
|
1713
1713
|
ok: false,
|
|
1714
|
-
result:
|
|
1714
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Open Prefab stage does not own the active Hierarchy authority.', {
|
|
1715
1715
|
code: 'shadow.scopeMismatch',
|
|
1716
1716
|
details: { prefabAssetId: details.stage.assetId },
|
|
1717
1717
|
}),
|
|
@@ -1721,7 +1721,7 @@ function resolveShadowTarget(capabilityId, state, input, operations) {
|
|
|
1721
1721
|
if (prefabTarget)
|
|
1722
1722
|
return { ok: true, target: prefabTarget };
|
|
1723
1723
|
}
|
|
1724
|
-
const activeId =
|
|
1724
|
+
const activeId = normalizeEditorCommandString(getEditorCommandSafeSceneSelection(operations).activeId);
|
|
1725
1725
|
if (activeId && document) {
|
|
1726
1726
|
const gameObject = findShadowGameObject(document, activeId);
|
|
1727
1727
|
if (gameObject) {
|
|
@@ -1740,20 +1740,20 @@ function resolveShadowTarget(capabilityId, state, input, operations) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return {
|
|
1742
1742
|
ok: false,
|
|
1743
|
-
result:
|
|
1743
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Shadow target is required. Provide objectId, or open a Prefab stage and provide nodeId/assetId.', {
|
|
1744
1744
|
code: 'shadow.targetRequired',
|
|
1745
1745
|
details: { objectId: input.objectId, nodeId: input.nodeId, assetId: 'assetId' in input ? input.assetId : undefined },
|
|
1746
1746
|
}),
|
|
1747
1747
|
};
|
|
1748
1748
|
}
|
|
1749
1749
|
function resolvePrefabShadowTargetFromDetails(details, input, operations) {
|
|
1750
|
-
const requestedAssetId = 'assetId' in input ?
|
|
1750
|
+
const requestedAssetId = 'assetId' in input ? normalizeEditorCommandString(input.assetId) : '';
|
|
1751
1751
|
if (requestedAssetId && requestedAssetId !== details.stage.assetId && requestedAssetId !== details.stage.browserAssetId)
|
|
1752
1752
|
return null;
|
|
1753
1753
|
const model = operations.getHierarchyReadModel();
|
|
1754
1754
|
if (!hasActivePrefabHierarchyScope(operations, details, model))
|
|
1755
1755
|
return null;
|
|
1756
|
-
const safeModel =
|
|
1756
|
+
const safeModel = createEditorCommandSafePrefabReadModel(model, details.nodeDetails);
|
|
1757
1757
|
const nodes = listPrefabShadowNodes(safeModel);
|
|
1758
1758
|
const nodeId = resolveSafePrefabNodeAuthoredId(safeModel, normalizePrefabNodeId(input.nodeId));
|
|
1759
1759
|
const node = nodes.find(candidate => candidate.id === nodeId) ?? null;
|
|
@@ -1919,7 +1919,7 @@ function readRenderingActionStaticBakeSourceNodeIds(result) {
|
|
|
1919
1919
|
const details = result.details;
|
|
1920
1920
|
if (!Object.prototype.hasOwnProperty.call(details, 'sourceNodeIds'))
|
|
1921
1921
|
return null;
|
|
1922
|
-
return
|
|
1922
|
+
return normalizeEditorCommandIdList(readRenderingActionStringList(details.sourceNodeIds));
|
|
1923
1923
|
}
|
|
1924
1924
|
function readRenderingActionStringList(value) {
|
|
1925
1925
|
return Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
@@ -1959,7 +1959,7 @@ function createShadowDebugRuntimeEvidence(plan, receivers, shadowPreviewDebugInf
|
|
|
1959
1959
|
severity: 'warning',
|
|
1960
1960
|
source: 'editor',
|
|
1961
1961
|
code: 'shadow.staticArtifactEvidenceUnavailable',
|
|
1962
|
-
message: 'Static-baked shadow visibility requires a baked artifact; this
|
|
1962
|
+
message: 'Static-baked shadow visibility requires a baked artifact; this renderer attachment does not expose artifact presence evidence to shadow.debug.visibilityMeasure.',
|
|
1963
1963
|
});
|
|
1964
1964
|
}
|
|
1965
1965
|
return {
|
|
@@ -2570,7 +2570,7 @@ function projectCasterBoundsToReceiver(casterBounds, receiverBounds, direction)
|
|
|
2570
2570
|
}
|
|
2571
2571
|
function readShadowProjectionBounds(state, targetId, projectionContext) {
|
|
2572
2572
|
const projectionId = projectionContext.resolveProjectionId(targetId);
|
|
2573
|
-
return
|
|
2573
|
+
return createEditorCommandBounds(state.projection?.getSelectionBounds([projectionId]) ?? null);
|
|
2574
2574
|
}
|
|
2575
2575
|
function readShadowPreviewEffectiveVisible(state, targetId, projectionContext, authoredVisible) {
|
|
2576
2576
|
const projectionId = projectionContext.resolveProjectionId(targetId);
|
|
@@ -2582,7 +2582,7 @@ function readShadowPreviewEffectiveVisible(state, targetId, projectionContext, a
|
|
|
2582
2582
|
const override = overrides[projectionId] ?? overrides[targetId];
|
|
2583
2583
|
return authoredVisible && override !== false;
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2585
|
+
function createEditorCommandBounds(bounds) {
|
|
2586
2586
|
if (!bounds)
|
|
2587
2587
|
return undefined;
|
|
2588
2588
|
const half = {
|
|
@@ -2658,7 +2658,7 @@ function findShadowGameObject(document, objectId) {
|
|
|
2658
2658
|
return document.scene.gameObjects.find(gameObject => gameObject.id === objectId) ?? null;
|
|
2659
2659
|
}
|
|
2660
2660
|
function normalizePrefabNodeId(value) {
|
|
2661
|
-
const id =
|
|
2661
|
+
const id = normalizeEditorCommandString(value);
|
|
2662
2662
|
return id.startsWith('prefab-node:') ? id.slice('prefab-node:'.length) : id;
|
|
2663
2663
|
}
|
|
2664
2664
|
function readBoolean(value, fallback) {
|