@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
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cloneVec3,
|
|
3
|
-
import {
|
|
4
|
-
export function
|
|
1
|
+
import { EDITOR_COMMAND_ID, } from '@fps-games/editor-protocol';
|
|
2
|
+
import { cloneVec3, createLocalEditorCommandFailure, isLocalEditorCommandVec3, } from '../diagnostics.js';
|
|
3
|
+
import { cloneEditorCommandSelection, getEditorCommandSafeSceneHierarchy, getEditorCommandSafeSceneReadModel, hasEditorCommandSafeSceneScope, isEditorCommandHierarchyObjectSelectable, normalizeEditorCommandIdList, normalizeEditorCommandString, } from '../shared.js';
|
|
4
|
+
export function createLocalEditorCommandViewportSource(state, options, renderUi, operations) {
|
|
5
5
|
return {
|
|
6
6
|
focusObject(input) {
|
|
7
7
|
const objectId = typeof input?.objectId === 'string' ? input.objectId.trim() : '';
|
|
8
8
|
if (!objectId) {
|
|
9
|
-
return
|
|
9
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_FOCUS_OBJECT, 'viewport.focusObject requires objectId.', { code: 'viewport.invalidInput' });
|
|
10
10
|
}
|
|
11
11
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
12
|
-
const hierarchy = document ?
|
|
13
|
-
if (!document || !
|
|
14
|
-
return
|
|
12
|
+
const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];
|
|
13
|
+
if (!document || !isEditorCommandHierarchyObjectSelectable(options, document, objectId, hierarchy)) {
|
|
14
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_FOCUS_OBJECT, `Viewport object was not found: ${objectId}`, { code: 'viewport.targetNotFound', objectId });
|
|
15
15
|
}
|
|
16
16
|
const focused = operations.focusProjectionNode(objectId);
|
|
17
17
|
renderUi();
|
|
18
18
|
return { objectId, focused };
|
|
19
19
|
},
|
|
20
20
|
frameSelection() {
|
|
21
|
-
const scopedSelection =
|
|
21
|
+
const scopedSelection = getEditorCommandViewportSelection(operations);
|
|
22
22
|
const selection = scopedSelection.selection;
|
|
23
23
|
const focused = selection.activeId
|
|
24
24
|
? scopedSelection.scene
|
|
@@ -28,23 +28,23 @@ export function createLocalEditorAgentBridgeViewportSource(state, options, rende
|
|
|
28
28
|
renderUi();
|
|
29
29
|
return {
|
|
30
30
|
focused,
|
|
31
|
-
selection:
|
|
31
|
+
selection: cloneEditorCommandSelection(selection),
|
|
32
32
|
};
|
|
33
33
|
},
|
|
34
34
|
getCamera() {
|
|
35
|
-
return
|
|
35
|
+
return createEditorCommandViewportCameraState(state, operations);
|
|
36
36
|
},
|
|
37
37
|
setCameraPreset(input) {
|
|
38
|
-
return
|
|
38
|
+
return setEditorCommandViewportCameraPreset(state, options, input, renderUi, operations);
|
|
39
39
|
},
|
|
40
40
|
orbitCamera(input) {
|
|
41
|
-
return
|
|
41
|
+
return orbitEditorCommandViewportCamera(state, options, input, renderUi, operations);
|
|
42
42
|
},
|
|
43
43
|
getVisibilitySnapshot() {
|
|
44
|
-
return
|
|
44
|
+
return createEditorCommandViewportVisibilitySnapshot(state, operations);
|
|
45
45
|
},
|
|
46
46
|
setVisibility(input) {
|
|
47
|
-
const result =
|
|
47
|
+
const result = setEditorCommandViewportVisibility(state, options, input, operations);
|
|
48
48
|
if ('ok' in result && result.ok === false)
|
|
49
49
|
return result;
|
|
50
50
|
operations.refreshShadowPreview?.();
|
|
@@ -53,8 +53,8 @@ export function createLocalEditorAgentBridgeViewportSource(state, options, rende
|
|
|
53
53
|
return result;
|
|
54
54
|
},
|
|
55
55
|
clearVisibility() {
|
|
56
|
-
if (!
|
|
57
|
-
return
|
|
56
|
+
if (!hasEditorCommandSafeSceneScope(operations)) {
|
|
57
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_CLEAR, 'Scene viewport visibility is unavailable outside the Scene Hierarchy scope.', { code: 'viewport.sceneScopeRequired' });
|
|
58
58
|
}
|
|
59
59
|
const previousCount = Object.keys(state.previewVisibility.overrides).length;
|
|
60
60
|
const wasIsolated = state.previewVisibility.isolatedObjectIds.length > 0;
|
|
@@ -69,11 +69,11 @@ export function createLocalEditorAgentBridgeViewportSource(state, options, rende
|
|
|
69
69
|
renderUi();
|
|
70
70
|
return {
|
|
71
71
|
changed: previousCount > 0 || wasIsolated,
|
|
72
|
-
snapshot:
|
|
72
|
+
snapshot: createEditorCommandViewportVisibilitySnapshot(state, operations),
|
|
73
73
|
};
|
|
74
74
|
},
|
|
75
75
|
enterIsolation(input) {
|
|
76
|
-
const result =
|
|
76
|
+
const result = enterEditorCommandViewportIsolation(state, options, input, operations);
|
|
77
77
|
if ('ok' in result && result.ok === false)
|
|
78
78
|
return result;
|
|
79
79
|
operations.refreshShadowPreview?.();
|
|
@@ -83,19 +83,19 @@ export function createLocalEditorAgentBridgeViewportSource(state, options, rende
|
|
|
83
83
|
},
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
const ids =
|
|
86
|
+
function setEditorCommandViewportVisibility(state, options, input, operations) {
|
|
87
|
+
const ids = normalizeEditorCommandIdList(Array.isArray(input.objectIds) ? input.objectIds : []);
|
|
88
88
|
if (ids.length === 0) {
|
|
89
|
-
return
|
|
89
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_SET, 'viewport.visibility.set requires at least one objectId.', { code: 'viewport.visibility.invalidInput' });
|
|
90
90
|
}
|
|
91
91
|
if (typeof input.visible !== 'boolean') {
|
|
92
|
-
return
|
|
92
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_SET, 'viewport.visibility.set requires visible to be boolean.', { code: 'viewport.visibility.invalidInput' });
|
|
93
93
|
}
|
|
94
94
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
95
|
-
const hierarchy = document ?
|
|
96
|
-
const invalidId = ids.find(id => !document || !
|
|
95
|
+
const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];
|
|
96
|
+
const invalidId = ids.find(id => !document || !isEditorCommandHierarchyObjectSelectable(options, document, id, hierarchy));
|
|
97
97
|
if (invalidId) {
|
|
98
|
-
return
|
|
98
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_SET, `Viewport object was not found: ${invalidId}`, { code: 'viewport.targetNotFound', objectId: invalidId });
|
|
99
99
|
}
|
|
100
100
|
const previous = JSON.stringify(state.previewVisibility.overrides);
|
|
101
101
|
const safeIds = new Set(hierarchy.map(item => item.id));
|
|
@@ -120,7 +120,7 @@ function setAgentBridgeViewportVisibility(state, options, input, operations) {
|
|
|
120
120
|
else {
|
|
121
121
|
state.previewVisibility.isolatedObjectIds = state.previewVisibility.isolatedObjectIds.filter(id => safeIds.has(id));
|
|
122
122
|
}
|
|
123
|
-
state.previewVisibility.reason =
|
|
123
|
+
state.previewVisibility.reason = normalizeEditorCommandString(input.reason) || undefined;
|
|
124
124
|
state.projection?.clearPreviewVisibilityOverrides?.();
|
|
125
125
|
const entries = state.projection?.setPreviewVisibilityOverrides?.(nextOverrides) ?? [];
|
|
126
126
|
const diagnostics = blockedIds.length > 0
|
|
@@ -134,24 +134,24 @@ function setAgentBridgeViewportVisibility(state, options, input, operations) {
|
|
|
134
134
|
: undefined;
|
|
135
135
|
return {
|
|
136
136
|
changed: previous !== JSON.stringify(state.previewVisibility.overrides),
|
|
137
|
-
snapshot:
|
|
137
|
+
snapshot: createEditorCommandViewportVisibilitySnapshot(state, operations, entries, diagnostics),
|
|
138
138
|
...(diagnostics ? { diagnostics } : {}),
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
const targetIds =
|
|
141
|
+
function enterEditorCommandViewportIsolation(state, options, input, operations) {
|
|
142
|
+
const targetIds = normalizeEditorCommandIdList(Array.isArray(input.objectIds) ? input.objectIds : []);
|
|
143
143
|
if (targetIds.length === 0) {
|
|
144
|
-
return
|
|
144
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_ISOLATION_ENTER, 'viewport.isolation.enter requires at least one objectId.', { code: 'viewport.isolation.invalidInput' });
|
|
145
145
|
}
|
|
146
146
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
147
|
-
const hierarchy = document ?
|
|
148
|
-
const invalidId = targetIds.find(id => !document || !
|
|
147
|
+
const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];
|
|
148
|
+
const invalidId = targetIds.find(id => !document || !isEditorCommandHierarchyObjectSelectable(options, document, id, hierarchy));
|
|
149
149
|
if (invalidId) {
|
|
150
|
-
return
|
|
150
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_ISOLATION_ENTER, `Viewport object was not found: ${invalidId}`, { code: 'viewport.targetNotFound', objectId: invalidId });
|
|
151
151
|
}
|
|
152
|
-
const objectIds =
|
|
152
|
+
const objectIds = createEditorCommandViewportObjectIds(state, operations);
|
|
153
153
|
if (objectIds.length === 0) {
|
|
154
|
-
return
|
|
154
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_ISOLATION_ENTER, 'Viewport projection is unavailable or has no visible objects to isolate.', { code: 'viewport.projectionUnavailable' });
|
|
155
155
|
}
|
|
156
156
|
const keep = new Set(targetIds);
|
|
157
157
|
for (const targetId of targetIds) {
|
|
@@ -168,7 +168,7 @@ function enterAgentBridgeViewportIsolation(state, options, input, operations) {
|
|
|
168
168
|
state.previewVisibility.isolatedObjectIds = [...keep];
|
|
169
169
|
delete state.previewVisibility.protectedObjectIds;
|
|
170
170
|
delete state.previewVisibility.protectedReceiverIds;
|
|
171
|
-
state.previewVisibility.reason =
|
|
171
|
+
state.previewVisibility.reason = normalizeEditorCommandString(input.reason) || undefined;
|
|
172
172
|
state.projection?.clearPreviewVisibilityOverrides?.();
|
|
173
173
|
const entries = state.projection?.setPreviewVisibilityOverrides?.(nextOverrides) ?? [];
|
|
174
174
|
const diagnostics = input.includeShadowDependencies
|
|
@@ -181,13 +181,13 @@ function enterAgentBridgeViewportIsolation(state, options, input, operations) {
|
|
|
181
181
|
: undefined;
|
|
182
182
|
return {
|
|
183
183
|
changed: previous !== JSON.stringify(state.previewVisibility),
|
|
184
|
-
snapshot:
|
|
184
|
+
snapshot: createEditorCommandViewportVisibilitySnapshot(state, operations, entries, diagnostics),
|
|
185
185
|
...(diagnostics ? { diagnostics } : {}),
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function createEditorCommandViewportVisibilitySnapshot(state, operations, entries, diagnostics) {
|
|
189
189
|
const projectionEntries = entries ?? state.projection?.getPreviewVisibilityOverrides?.() ?? [];
|
|
190
|
-
const safeIds = new Set(
|
|
190
|
+
const safeIds = new Set(getEditorCommandSafeSceneHierarchy(operations).map(item => item.id));
|
|
191
191
|
const safeProjectionEntries = projectionEntries.filter(entry => safeIds.has(entry.nodeId));
|
|
192
192
|
const entryById = new Map(safeProjectionEntries.map(entry => [entry.nodeId, entry]));
|
|
193
193
|
const objectIds = new Set([
|
|
@@ -216,11 +216,11 @@ function createAgentBridgeViewportVisibilitySnapshot(state, operations, entries,
|
|
|
216
216
|
...(diagnostics?.length ? { diagnostics } : {}),
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function createEditorCommandViewportObjectIds(state, operations) {
|
|
220
220
|
const fromOverrides = Object.keys(state.previewVisibility.overrides);
|
|
221
221
|
const fromProjectedNodes = state.projection?.getProjectedNodeIds?.() ?? [];
|
|
222
222
|
const fromProjection = state.projection?.getPreviewVisibilityOverrides?.().map(entry => entry.nodeId) ?? [];
|
|
223
|
-
const safeScene =
|
|
223
|
+
const safeScene = getEditorCommandSafeSceneReadModel(operations);
|
|
224
224
|
const sessionIds = safeScene.selection.selectedIds;
|
|
225
225
|
const ids = new Set([...fromProjectedNodes, ...fromOverrides, ...fromProjection, ...sessionIds]);
|
|
226
226
|
const safeIds = new Set(safeScene.hierarchy.map(item => item.id));
|
|
@@ -228,9 +228,9 @@ function createAgentBridgeViewportObjectIds(state, operations) {
|
|
|
228
228
|
return [...ids].filter(id => safeIds.has(id));
|
|
229
229
|
return [];
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function createEditorCommandViewportCameraState(state, operations) {
|
|
232
232
|
const cameraState = state.sceneViewCamera?.getState();
|
|
233
|
-
const selection =
|
|
233
|
+
const selection = getEditorCommandViewportSelection(operations).selection;
|
|
234
234
|
const alpha = cameraState?.alpha;
|
|
235
235
|
const beta = cameraState?.beta;
|
|
236
236
|
const radius = cameraState?.radius;
|
|
@@ -242,29 +242,29 @@ function createAgentBridgeViewportCameraState(state, operations) {
|
|
|
242
242
|
...(typeof alpha === 'number' && Number.isFinite(alpha) ? { alpha } : {}),
|
|
243
243
|
...(typeof beta === 'number' && Number.isFinite(beta) ? { beta } : {}),
|
|
244
244
|
...(typeof radius === 'number' && Number.isFinite(radius) ? { radius } : {}),
|
|
245
|
-
selection:
|
|
245
|
+
selection: cloneEditorCommandSelection(selection),
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function setEditorCommandViewportCameraPreset(state, options, input, renderUi, operations) {
|
|
249
249
|
if (state.mode !== 'editor' || !state.session) {
|
|
250
|
-
return
|
|
250
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET, 'Editor is not in edit mode.', { code: 'editor.notReady' });
|
|
251
251
|
}
|
|
252
252
|
if (state.sceneCameraPreviewEnabled) {
|
|
253
|
-
return
|
|
253
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET, 'Viewport camera presets are unavailable during Scene Camera preview.', { code: 'viewport.camera.previewActive' });
|
|
254
254
|
}
|
|
255
255
|
if (!state.sceneViewCamera) {
|
|
256
|
-
return
|
|
256
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET, 'Viewport camera is unavailable.', { code: 'viewport.camera.unavailable' });
|
|
257
257
|
}
|
|
258
|
-
const target =
|
|
258
|
+
const target = resolveEditorCommandViewportCameraTarget(state, options, input.target, EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET, operations);
|
|
259
259
|
if (!target.ok)
|
|
260
260
|
return target.result;
|
|
261
|
-
const preset =
|
|
261
|
+
const preset = normalizeEditorCommandViewportCameraPreset(input.preset);
|
|
262
262
|
if (!preset) {
|
|
263
|
-
return
|
|
263
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET, 'viewport.camera.setPreset requires a supported preset.', { code: 'viewport.camera.invalidPreset' });
|
|
264
264
|
}
|
|
265
|
-
const radius =
|
|
266
|
-
const distanceScale =
|
|
267
|
-
const baseRadius = target.radius ??
|
|
265
|
+
const radius = normalizeEditorCommandPositiveNumber(input.radius, null);
|
|
266
|
+
const distanceScale = normalizeEditorCommandPositiveNumber(input.distanceScale, 1);
|
|
267
|
+
const baseRadius = target.radius ?? createEditorCommandViewportCameraState(state, operations).radius ?? undefined;
|
|
268
268
|
const scaledRadius = baseRadius && distanceScale ? baseRadius * distanceScale : baseRadius;
|
|
269
269
|
const changed = state.sceneViewCamera.setViewPreset(preset, {
|
|
270
270
|
target: target.target,
|
|
@@ -278,26 +278,26 @@ function setAgentBridgeViewportCameraPreset(state, options, input, renderUi, ope
|
|
|
278
278
|
if (changed)
|
|
279
279
|
operations.requestSceneFrame('agent-viewport-camera-set-preset');
|
|
280
280
|
renderUi();
|
|
281
|
-
return
|
|
281
|
+
return createEditorCommandViewportCameraMutationOutput(state, changed, operations);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function orbitEditorCommandViewportCamera(state, options, input, renderUi, operations) {
|
|
284
284
|
if (state.mode !== 'editor' || !state.session) {
|
|
285
|
-
return
|
|
285
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT, 'Editor is not in edit mode.', { code: 'editor.notReady' });
|
|
286
286
|
}
|
|
287
287
|
if (state.sceneCameraPreviewEnabled) {
|
|
288
|
-
return
|
|
288
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT, 'Viewport camera orbit is unavailable during Scene Camera preview.', { code: 'viewport.camera.previewActive' });
|
|
289
289
|
}
|
|
290
290
|
if (!state.sceneViewCamera) {
|
|
291
|
-
return
|
|
291
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT, 'Viewport camera is unavailable.', { code: 'viewport.camera.unavailable' });
|
|
292
292
|
}
|
|
293
|
-
const target =
|
|
293
|
+
const target = resolveEditorCommandViewportCameraTarget(state, options, input.target, EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT, operations);
|
|
294
294
|
if (!target.ok)
|
|
295
295
|
return target.result;
|
|
296
296
|
const changed = state.sceneViewCamera.orbit({
|
|
297
297
|
target: target.target ?? undefined,
|
|
298
|
-
yawDeltaDeg:
|
|
299
|
-
pitchDeltaDeg:
|
|
300
|
-
distanceScale:
|
|
298
|
+
yawDeltaDeg: normalizeEditorCommandFiniteNumber(input.yawDeltaDeg, 0),
|
|
299
|
+
pitchDeltaDeg: normalizeEditorCommandFiniteNumber(input.pitchDeltaDeg, 0),
|
|
300
|
+
distanceScale: normalizeEditorCommandPositiveNumber(input.distanceScale, 1) ?? undefined,
|
|
301
301
|
});
|
|
302
302
|
operations.syncViewportCameraState();
|
|
303
303
|
state.status = 'Viewport camera: orbit';
|
|
@@ -307,10 +307,10 @@ function orbitAgentBridgeViewportCamera(state, options, input, renderUi, operati
|
|
|
307
307
|
if (changed)
|
|
308
308
|
operations.requestSceneFrame('agent-viewport-camera-orbit');
|
|
309
309
|
renderUi();
|
|
310
|
-
return
|
|
310
|
+
return createEditorCommandViewportCameraMutationOutput(state, changed, operations);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
const cameraState =
|
|
312
|
+
function createEditorCommandViewportCameraMutationOutput(state, changed, operations) {
|
|
313
|
+
const cameraState = createEditorCommandViewportCameraState(state, operations);
|
|
314
314
|
return {
|
|
315
315
|
changed,
|
|
316
316
|
viewPreset: cameraState.viewPreset,
|
|
@@ -320,80 +320,80 @@ function createAgentBridgeViewportCameraMutationOutput(state, changed, operation
|
|
|
320
320
|
selection: cameraState.selection,
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
const target = input ??
|
|
323
|
+
function resolveEditorCommandViewportCameraTarget(state, options, input, capabilityId, operations) {
|
|
324
|
+
const target = input ?? createDefaultEditorCommandViewportCameraTarget(operations);
|
|
325
325
|
if (target.kind === 'point') {
|
|
326
|
-
if (!
|
|
326
|
+
if (!isLocalEditorCommandVec3(target.point)) {
|
|
327
327
|
return {
|
|
328
328
|
ok: false,
|
|
329
|
-
result:
|
|
329
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Camera point target requires a finite Vec3 point.', { code: 'viewport.camera.invalidTarget' }),
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
332
|
return { ok: true, target: cloneVec3(target.point) };
|
|
333
333
|
}
|
|
334
334
|
if (target.kind === 'scene')
|
|
335
|
-
return
|
|
335
|
+
return resolveEditorCommandSceneCameraTarget(state, options, operations);
|
|
336
336
|
if (target.kind === 'selection')
|
|
337
|
-
return
|
|
337
|
+
return resolveEditorCommandSelectionCameraTarget(state, capabilityId, operations);
|
|
338
338
|
if (target.kind === 'object') {
|
|
339
|
-
const objectId =
|
|
339
|
+
const objectId = normalizeEditorCommandString(target.objectId);
|
|
340
340
|
if (!objectId) {
|
|
341
341
|
return {
|
|
342
342
|
ok: false,
|
|
343
|
-
result:
|
|
343
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Camera object target requires objectId.', { code: 'viewport.camera.invalidTarget' }),
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
347
|
-
const hierarchy = document ?
|
|
348
|
-
if (!document || !
|
|
347
|
+
const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];
|
|
348
|
+
if (!document || !isEditorCommandHierarchyObjectSelectable(options, document, objectId, hierarchy)) {
|
|
349
349
|
return {
|
|
350
350
|
ok: false,
|
|
351
|
-
result:
|
|
351
|
+
result: createLocalEditorCommandFailure(capabilityId, `Camera target object was not found: ${objectId}`, { code: 'viewport.camera.targetNotFound', objectId }),
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
|
-
return
|
|
354
|
+
return resolveEditorCommandObjectCameraTarget(state, objectId, capabilityId);
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
357
|
ok: false,
|
|
358
|
-
result:
|
|
358
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Unsupported camera target.', { code: 'viewport.camera.invalidTarget' }),
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const selection =
|
|
361
|
+
function createDefaultEditorCommandViewportCameraTarget(operations) {
|
|
362
|
+
const selection = getEditorCommandViewportSelection(operations).selection;
|
|
363
363
|
return selection.activeId ? { kind: 'selection' } : { kind: 'scene' };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
const selection =
|
|
365
|
+
function resolveEditorCommandSelectionCameraTarget(state, capabilityId, operations) {
|
|
366
|
+
const selection = getEditorCommandViewportSelection(operations).selection;
|
|
367
367
|
const selectedIds = selection.selectedIds.length > 0
|
|
368
368
|
? selection.selectedIds
|
|
369
369
|
: selection.activeId ? [selection.activeId] : [];
|
|
370
370
|
if (selectedIds.length === 0) {
|
|
371
371
|
return {
|
|
372
372
|
ok: false,
|
|
373
|
-
result:
|
|
373
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Camera target selection is empty.', { code: 'viewport.camera.emptySelection' }),
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
const bounds = state.projection?.getSelectionBounds(selectedIds) ?? null;
|
|
377
377
|
if (!bounds) {
|
|
378
378
|
return {
|
|
379
379
|
ok: false,
|
|
380
|
-
result:
|
|
380
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Camera target selection has no projection bounds.', { code: 'viewport.camera.missingBounds', objectId: selection.activeId ?? undefined }),
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
383
|
return {
|
|
384
384
|
ok: true,
|
|
385
385
|
target: cloneVec3(bounds.center),
|
|
386
|
-
radius:
|
|
386
|
+
radius: createEditorCommandCameraRadiusFromBounds(bounds),
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function resolveEditorCommandSceneCameraTarget(state, options, operations) {
|
|
390
390
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
391
391
|
if (!document)
|
|
392
392
|
return { ok: true, target: null };
|
|
393
|
-
const hierarchy =
|
|
393
|
+
const hierarchy = getEditorCommandSafeSceneHierarchy(operations);
|
|
394
394
|
const objectIds = hierarchy
|
|
395
395
|
.map(item => item.id)
|
|
396
|
-
.filter(objectId =>
|
|
396
|
+
.filter(objectId => isEditorCommandHierarchyObjectSelectable(options, document, objectId, hierarchy));
|
|
397
397
|
if (objectIds.length === 0)
|
|
398
398
|
return { ok: true, target: null };
|
|
399
399
|
const bounds = state.projection?.getSelectionBounds(objectIds) ?? null;
|
|
@@ -402,34 +402,34 @@ function resolveAgentBridgeSceneCameraTarget(state, options, operations) {
|
|
|
402
402
|
return {
|
|
403
403
|
ok: true,
|
|
404
404
|
target: cloneVec3(bounds.center),
|
|
405
|
-
radius:
|
|
405
|
+
radius: createEditorCommandCameraRadiusFromBounds(bounds),
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
function
|
|
409
|
-
const safeScene =
|
|
408
|
+
function getEditorCommandViewportSelection(operations) {
|
|
409
|
+
const safeScene = getEditorCommandSafeSceneReadModel(operations);
|
|
410
410
|
return safeScene.scopeType === 'scene'
|
|
411
411
|
? { selection: safeScene.selection, scene: true }
|
|
412
412
|
: { selection: operations.getPreviewSelection(), scene: false };
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function resolveEditorCommandObjectCameraTarget(state, objectId, capabilityId) {
|
|
415
415
|
const bounds = state.projection?.getSelectionBounds([objectId]) ?? null;
|
|
416
416
|
if (!bounds) {
|
|
417
417
|
return {
|
|
418
418
|
ok: false,
|
|
419
|
-
result:
|
|
419
|
+
result: createLocalEditorCommandFailure(capabilityId, `Camera target object has no projection bounds: ${objectId}`, { code: 'viewport.camera.missingBounds', objectId }),
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
422
|
return {
|
|
423
423
|
ok: true,
|
|
424
424
|
target: cloneVec3(bounds.center),
|
|
425
|
-
radius:
|
|
425
|
+
radius: createEditorCommandCameraRadiusFromBounds(bounds),
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function createEditorCommandCameraRadiusFromBounds(bounds) {
|
|
429
429
|
const radius = Math.hypot(bounds.size.x, bounds.size.y, bounds.size.z);
|
|
430
430
|
return Number.isFinite(radius) && radius > 0 ? Math.max(radius * 1.5, 2) : undefined;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function normalizeEditorCommandViewportCameraPreset(value) {
|
|
433
433
|
const preset = value === 'perspective'
|
|
434
434
|
|| value === 'top'
|
|
435
435
|
|| value === 'bottom'
|
|
@@ -443,10 +443,10 @@ function normalizeAgentBridgeViewportCameraPreset(value) {
|
|
|
443
443
|
: null;
|
|
444
444
|
return preset;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function normalizeEditorCommandFiniteNumber(value, fallback) {
|
|
447
447
|
return typeof value === 'number' && Number.isFinite(value) ? value : fallback;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function normalizeEditorCommandPositiveNumber(value, fallback) {
|
|
450
450
|
return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : fallback;
|
|
451
451
|
}
|
|
452
452
|
//# sourceMappingURL=viewport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../src/editor-commands/capabilities/viewport.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,GAclB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,8BAA8B,EAC9B,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,GAI7B,MAAM,cAAc,CAAC;AAGtB,MAAM,UAAU,sCAAsC,CACpD,KAAwD,EACxD,OAA6D,EAC7D,QAAoB,EACpB,UAAmE;IAEnE,OAAO;QACL,WAAW,CAAC,KAAK;YAC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C,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAChF,CAAC;AAED,SAAS,oCAAoC,CAAC,KAAc,EAAE,QAAuB;IACnF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7F,CAAC","sourcesContent":["import type { EditorSelectionState, EditorViewportViewPreset } from '@fps-games/editor-core';\nimport {\n EDITOR_COMMAND_ID,\n type EditorCommandVec3,\n type EditorCommandViewportCameraOrbitInput,\n type EditorCommandViewportCameraPreset,\n type EditorCommandViewportCameraSetPresetInput,\n type EditorCommandViewportCameraSetPresetOutput,\n type EditorCommandViewportCameraState,\n type EditorCommandViewportCameraTarget,\n type EditorCommandViewportIsolationEnterInput,\n type EditorCommandViewportIsolationEnterOutput,\n type EditorCommandViewportVisibilityEntry,\n type EditorCommandViewportVisibilityMutationOutput,\n type EditorCommandViewportVisibilitySetInput,\n type EditorCommandViewportVisibilitySnapshotOutput,\n} from '@fps-games/editor-protocol';\nimport {\n cloneVec3,\n createLocalEditorCommandFailure,\n isLocalEditorCommandVec3,\n} from '../diagnostics.js';\nimport type { LocalEditorCommandViewportSource } from '../source-types.js';\nimport {\n cloneEditorCommandSelection,\n getEditorCommandSafeSceneHierarchy,\n getEditorCommandSafeSceneReadModel,\n hasEditorCommandSafeSceneScope,\n isEditorCommandHierarchyObjectSelectable,\n normalizeEditorCommandIdList,\n normalizeEditorCommandString,\n type LocalEditorCommandPreviewVisibilityEntry,\n type LocalEditorCommandCapabilitySourceOperations,\n type LocalEditorCommandHarnessState,\n} from '../shared.js';\nimport type { LocalEditorHarnessOptions } from '../../local-editor-harness.js';\n\nexport function createLocalEditorCommandViewportSource<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n renderUi: () => void,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): LocalEditorCommandViewportSource {\n return {\n focusObject(input) {\n const objectId = typeof input?.objectId === 'string' ? input.objectId.trim() : '';\n if (!objectId) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_FOCUS_OBJECT,\n 'viewport.focusObject requires objectId.',\n { code: 'viewport.invalidInput' },\n );\n }\n const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;\n const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];\n if (!document || !isEditorCommandHierarchyObjectSelectable(options, document, objectId, hierarchy)) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_FOCUS_OBJECT,\n `Viewport object was not found: ${objectId}`,\n { code: 'viewport.targetNotFound', objectId },\n );\n }\n const focused = operations.focusProjectionNode(objectId);\n renderUi();\n return { objectId, focused };\n },\n frameSelection() {\n const scopedSelection = getEditorCommandViewportSelection(operations);\n const selection = scopedSelection.selection;\n const focused = selection.activeId\n ? scopedSelection.scene\n ? operations.focusProjectionNode(selection.activeId)\n : operations.focusPreviewSelection()\n : false;\n renderUi();\n return {\n focused,\n selection: cloneEditorCommandSelection(selection),\n };\n },\n getCamera() {\n return createEditorCommandViewportCameraState(state, operations);\n },\n setCameraPreset(input) {\n return setEditorCommandViewportCameraPreset(state, options, input, renderUi, operations);\n },\n orbitCamera(input) {\n return orbitEditorCommandViewportCamera(state, options, input, renderUi, operations);\n },\n getVisibilitySnapshot() {\n return createEditorCommandViewportVisibilitySnapshot(state, operations);\n },\n setVisibility(input) {\n const result = setEditorCommandViewportVisibility(state, options, input, operations);\n if ('ok' in result && result.ok === false) return result;\n operations.refreshShadowPreview?.();\n operations.requestSceneFrame('agent-viewport-visibility-set');\n renderUi();\n return result;\n },\n clearVisibility() {\n if (!hasEditorCommandSafeSceneScope(operations)) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_CLEAR,\n 'Scene viewport visibility is unavailable outside the Scene Hierarchy scope.',\n { code: 'viewport.sceneScopeRequired' },\n );\n }\n const previousCount = Object.keys(state.previewVisibility.overrides).length;\n const wasIsolated = state.previewVisibility.isolatedObjectIds.length > 0;\n state.previewVisibility.overrides = {};\n state.previewVisibility.isolatedObjectIds = [];\n delete state.previewVisibility.protectedObjectIds;\n delete state.previewVisibility.protectedReceiverIds;\n delete state.previewVisibility.reason;\n state.projection?.clearPreviewVisibilityOverrides?.();\n operations.refreshShadowPreview?.();\n operations.requestSceneFrame('agent-viewport-visibility-clear');\n renderUi();\n return {\n changed: previousCount > 0 || wasIsolated,\n snapshot: createEditorCommandViewportVisibilitySnapshot(state, operations),\n };\n },\n enterIsolation(input) {\n const result = enterEditorCommandViewportIsolation(state, options, input, operations);\n if ('ok' in result && result.ok === false) return result;\n operations.refreshShadowPreview?.();\n operations.requestSceneFrame('agent-viewport-isolation-enter');\n renderUi();\n return result;\n },\n };\n}\n\nfunction setEditorCommandViewportVisibility<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n input: EditorCommandViewportVisibilitySetInput,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportVisibilityMutationOutput | ReturnType<typeof createLocalEditorCommandFailure> {\n const ids = normalizeEditorCommandIdList(Array.isArray(input.objectIds) ? input.objectIds : []);\n if (ids.length === 0) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_SET,\n 'viewport.visibility.set requires at least one objectId.',\n { code: 'viewport.visibility.invalidInput' },\n );\n }\n if (typeof input.visible !== 'boolean') {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_SET,\n 'viewport.visibility.set requires visible to be boolean.',\n { code: 'viewport.visibility.invalidInput' },\n );\n }\n const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;\n const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];\n const invalidId = ids.find(id => !document || !isEditorCommandHierarchyObjectSelectable(options, document, id, hierarchy));\n if (invalidId) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_VISIBILITY_SET,\n `Viewport object was not found: ${invalidId}`,\n { code: 'viewport.targetNotFound', objectId: invalidId },\n );\n }\n const previous = JSON.stringify(state.previewVisibility.overrides);\n const safeIds = new Set(hierarchy.map(item => item.id));\n const nextOverrides = Object.fromEntries(\n Object.entries(state.previewVisibility.overrides).filter(([id]) => safeIds.has(id)),\n );\n const protectedIds = new Set([\n ...(state.previewVisibility.protectedObjectIds ?? []),\n ...(state.previewVisibility.protectedReceiverIds ?? []),\n ]);\n const blockedIds: string[] = [];\n for (const id of ids) {\n if (input.visible === false && protectedIds.has(id)) {\n nextOverrides[id] = true;\n blockedIds.push(id);\n continue;\n }\n nextOverrides[id] = input.visible;\n }\n state.previewVisibility.overrides = nextOverrides;\n if (blockedIds.length === 0) {\n state.previewVisibility.isolatedObjectIds = [];\n } else {\n state.previewVisibility.isolatedObjectIds = state.previewVisibility.isolatedObjectIds.filter(id => safeIds.has(id));\n }\n state.previewVisibility.reason = normalizeEditorCommandString(input.reason) || undefined;\n state.projection?.clearPreviewVisibilityOverrides?.();\n const entries = state.projection?.setPreviewVisibilityOverrides?.(nextOverrides) ?? [];\n const diagnostics = blockedIds.length > 0\n ? [{\n code: 'shadow.receiverProtectedInDebugContext',\n message: 'One or more objects are protected by the active Shadow Debug Context and were kept visible. Clear shadow.debug.context before hiding protected receivers.',\n source: 'editor' as const,\n severity: 'warning' as const,\n details: { objectIds: blockedIds },\n }]\n : undefined;\n return {\n changed: previous !== JSON.stringify(state.previewVisibility.overrides),\n snapshot: createEditorCommandViewportVisibilitySnapshot(state, operations, entries, diagnostics),\n ...(diagnostics ? { diagnostics } : {}),\n };\n}\n\nfunction enterEditorCommandViewportIsolation<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n input: EditorCommandViewportIsolationEnterInput,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportIsolationEnterOutput | ReturnType<typeof createLocalEditorCommandFailure> {\n const targetIds = normalizeEditorCommandIdList(Array.isArray(input.objectIds) ? input.objectIds : []);\n if (targetIds.length === 0) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_ISOLATION_ENTER,\n 'viewport.isolation.enter requires at least one objectId.',\n { code: 'viewport.isolation.invalidInput' },\n );\n }\n const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;\n const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];\n const invalidId = targetIds.find(id => !document || !isEditorCommandHierarchyObjectSelectable(options, document, id, hierarchy));\n if (invalidId) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_ISOLATION_ENTER,\n `Viewport object was not found: ${invalidId}`,\n { code: 'viewport.targetNotFound', objectId: invalidId },\n );\n }\n const objectIds = createEditorCommandViewportObjectIds(state, operations);\n if (objectIds.length === 0) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_ISOLATION_ENTER,\n 'Viewport projection is unavailable or has no visible objects to isolate.',\n { code: 'viewport.projectionUnavailable' },\n );\n }\n const keep = new Set(targetIds);\n for (const targetId of targetIds) {\n for (const parentId of state.projection?.getProjectionParentIds?.(targetId) ?? []) {\n if (hierarchy.some(item => item.id === parentId)) keep.add(parentId);\n }\n }\n const nextOverrides: Record<string, boolean> = {};\n for (const id of objectIds) nextOverrides[id] = keep.has(id);\n const previous = JSON.stringify(state.previewVisibility);\n state.previewVisibility.overrides = nextOverrides;\n state.previewVisibility.isolatedObjectIds = [...keep];\n delete state.previewVisibility.protectedObjectIds;\n delete state.previewVisibility.protectedReceiverIds;\n state.previewVisibility.reason = normalizeEditorCommandString(input.reason) || undefined;\n state.projection?.clearPreviewVisibilityOverrides?.();\n const entries = state.projection?.setPreviewVisibilityOverrides?.(nextOverrides) ?? [];\n const diagnostics = input.includeShadowDependencies\n ? [{\n code: 'viewport.isolation.shadowDependenciesPending',\n message: 'Shadow dependency expansion will be resolved by shadow debug capabilities; this isolation kept the requested objectIds and required transform ancestors.',\n source: 'editor' as const,\n severity: 'info' as const,\n }]\n : undefined;\n return {\n changed: previous !== JSON.stringify(state.previewVisibility),\n snapshot: createEditorCommandViewportVisibilitySnapshot(state, operations, entries, diagnostics),\n ...(diagnostics ? { diagnostics } : {}),\n };\n}\n\nfunction createEditorCommandViewportVisibilitySnapshot<TDocument, TPatch>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n entries?: readonly LocalEditorCommandPreviewVisibilityEntry[],\n diagnostics?: EditorCommandViewportVisibilityEntry['diagnostics'],\n): EditorCommandViewportVisibilitySnapshotOutput {\n const projectionEntries = entries ?? state.projection?.getPreviewVisibilityOverrides?.() ?? [];\n const safeIds = new Set(getEditorCommandSafeSceneHierarchy(operations).map(item => item.id));\n const safeProjectionEntries = projectionEntries.filter(entry => safeIds.has(entry.nodeId));\n const entryById = new Map(safeProjectionEntries.map(entry => [entry.nodeId, entry]));\n const objectIds = new Set<string>([\n ...Object.keys(state.previewVisibility.overrides).filter(id => safeIds.has(id)),\n ...safeProjectionEntries.map(entry => entry.nodeId),\n ...state.previewVisibility.isolatedObjectIds.filter(id => safeIds.has(id)),\n ]);\n const isolatedIds = new Set(state.previewVisibility.isolatedObjectIds.filter(id => safeIds.has(id)));\n const normalizedEntries = [...objectIds].sort().map((objectId): EditorCommandViewportVisibilityEntry => {\n const projectionEntry = entryById.get(objectId);\n const overrideVisible = state.previewVisibility.overrides[objectId];\n const authoredVisible = projectionEntry?.authoredActive ?? true;\n return {\n objectId,\n authoredVisible,\n previewVisible: projectionEntry?.effectiveVisible ?? (authoredVisible && overrideVisible !== false),\n ...(typeof overrideVisible === 'boolean' ? { overrideVisible } : {}),\n isolated: isolatedIds.has(objectId),\n };\n });\n return {\n isolated: isolatedIds.size > 0,\n isolatedObjectIds: [...isolatedIds],\n entries: normalizedEntries,\n ...(state.previewVisibility.reason ? { reason: state.previewVisibility.reason } : {}),\n ...(diagnostics?.length ? { diagnostics } : {}),\n };\n}\n\nfunction createEditorCommandViewportObjectIds<TDocument, TPatch>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): string[] {\n const fromOverrides = Object.keys(state.previewVisibility.overrides);\n const fromProjectedNodes = state.projection?.getProjectedNodeIds?.() ?? [];\n const fromProjection = state.projection?.getPreviewVisibilityOverrides?.().map(entry => entry.nodeId) ?? [];\n const safeScene = getEditorCommandSafeSceneReadModel(operations);\n const sessionIds = safeScene.selection.selectedIds;\n const ids = new Set([...fromProjectedNodes, ...fromOverrides, ...fromProjection, ...sessionIds]);\n const safeIds = new Set(safeScene.hierarchy.map(item => item.id));\n if (ids.size > 0) return [...ids].filter(id => safeIds.has(id));\n return [];\n}\n\nfunction createEditorCommandViewportCameraState<TDocument, TPatch>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportCameraState {\n const cameraState = state.sceneViewCamera?.getState();\n const selection = getEditorCommandViewportSelection(operations).selection;\n const alpha = cameraState?.alpha;\n const beta = cameraState?.beta;\n const radius = cameraState?.radius;\n return {\n viewPreset: (cameraState?.viewPreset ?? state.viewportTools.viewPreset) as EditorCommandViewportCameraPreset,\n projectionMode: cameraState?.projectionMode ?? state.viewportTools.projectionMode,\n ...(cameraState?.target ? { target: cloneVec3(cameraState.target) } : {}),\n ...(cameraState?.position ? { position: cloneVec3(cameraState.position) } : {}),\n ...(typeof alpha === 'number' && Number.isFinite(alpha) ? { alpha } : {}),\n ...(typeof beta === 'number' && Number.isFinite(beta) ? { beta } : {}),\n ...(typeof radius === 'number' && Number.isFinite(radius) ? { radius } : {}),\n selection: cloneEditorCommandSelection(selection),\n };\n}\n\nfunction setEditorCommandViewportCameraPreset<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n input: EditorCommandViewportCameraSetPresetInput,\n renderUi: () => void,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportCameraSetPresetOutput | ReturnType<typeof createLocalEditorCommandFailure> {\n if (state.mode !== 'editor' || !state.session) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET,\n 'Editor is not in edit mode.',\n { code: 'editor.notReady' },\n );\n }\n if (state.sceneCameraPreviewEnabled) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET,\n 'Viewport camera presets are unavailable during Scene Camera preview.',\n { code: 'viewport.camera.previewActive' },\n );\n }\n if (!state.sceneViewCamera) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET,\n 'Viewport camera is unavailable.',\n { code: 'viewport.camera.unavailable' },\n );\n }\n const target = resolveEditorCommandViewportCameraTarget(\n state,\n options,\n input.target,\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET,\n operations,\n );\n if (!target.ok) return target.result;\n const preset = normalizeEditorCommandViewportCameraPreset(input.preset);\n if (!preset) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_SET_PRESET,\n 'viewport.camera.setPreset requires a supported preset.',\n { code: 'viewport.camera.invalidPreset' },\n );\n }\n const radius = normalizeEditorCommandPositiveNumber(input.radius, null);\n const distanceScale = normalizeEditorCommandPositiveNumber(input.distanceScale, 1);\n const baseRadius = target.radius ?? createEditorCommandViewportCameraState(state, operations).radius ?? undefined;\n const scaledRadius = baseRadius && distanceScale ? baseRadius * distanceScale : baseRadius;\n const changed = state.sceneViewCamera.setViewPreset(preset, {\n target: target.target,\n radius: radius ?? scaledRadius,\n });\n operations.syncViewportCameraState();\n state.status = `Viewport camera: ${preset}`;\n state.statusTone = 'default';\n state.statusToneStatus = state.status;\n state.statusDetails = '';\n if (changed) operations.requestSceneFrame('agent-viewport-camera-set-preset');\n renderUi();\n return createEditorCommandViewportCameraMutationOutput(state, changed, operations);\n}\n\nfunction orbitEditorCommandViewportCamera<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n input: EditorCommandViewportCameraOrbitInput,\n renderUi: () => void,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportCameraSetPresetOutput | ReturnType<typeof createLocalEditorCommandFailure> {\n if (state.mode !== 'editor' || !state.session) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT,\n 'Editor is not in edit mode.',\n { code: 'editor.notReady' },\n );\n }\n if (state.sceneCameraPreviewEnabled) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT,\n 'Viewport camera orbit is unavailable during Scene Camera preview.',\n { code: 'viewport.camera.previewActive' },\n );\n }\n if (!state.sceneViewCamera) {\n return createLocalEditorCommandFailure(\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT,\n 'Viewport camera is unavailable.',\n { code: 'viewport.camera.unavailable' },\n );\n }\n const target = resolveEditorCommandViewportCameraTarget(\n state,\n options,\n input.target,\n EDITOR_COMMAND_ID.VIEWPORT_CAMERA_ORBIT,\n operations,\n );\n if (!target.ok) return target.result;\n const changed = state.sceneViewCamera.orbit({\n target: target.target ?? undefined,\n yawDeltaDeg: normalizeEditorCommandFiniteNumber(input.yawDeltaDeg, 0),\n pitchDeltaDeg: normalizeEditorCommandFiniteNumber(input.pitchDeltaDeg, 0),\n distanceScale: normalizeEditorCommandPositiveNumber(input.distanceScale, 1) ?? undefined,\n });\n operations.syncViewportCameraState();\n state.status = 'Viewport camera: orbit';\n state.statusTone = 'default';\n state.statusToneStatus = state.status;\n state.statusDetails = '';\n if (changed) operations.requestSceneFrame('agent-viewport-camera-orbit');\n renderUi();\n return createEditorCommandViewportCameraMutationOutput(state, changed, operations);\n}\n\nfunction createEditorCommandViewportCameraMutationOutput<TDocument, TPatch>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n changed: boolean,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportCameraSetPresetOutput {\n const cameraState = createEditorCommandViewportCameraState(state, operations);\n return {\n changed,\n viewPreset: cameraState.viewPreset,\n projectionMode: cameraState.projectionMode,\n ...(cameraState.target ? { target: cameraState.target } : {}),\n ...(cameraState.radius !== undefined ? { radius: cameraState.radius } : {}),\n selection: cameraState.selection,\n };\n}\n\nfunction resolveEditorCommandViewportCameraTarget<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n input: EditorCommandViewportCameraTarget | undefined,\n capabilityId: string,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): { ok: true; target: EditorCommandVec3 | null; radius?: number } | { ok: false; result: ReturnType<typeof createLocalEditorCommandFailure> } {\n const target = input ?? createDefaultEditorCommandViewportCameraTarget(operations);\n if (target.kind === 'point') {\n if (!isLocalEditorCommandVec3(target.point)) {\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n 'Camera point target requires a finite Vec3 point.',\n { code: 'viewport.camera.invalidTarget' },\n ),\n };\n }\n return { ok: true, target: cloneVec3(target.point) };\n }\n if (target.kind === 'scene') return resolveEditorCommandSceneCameraTarget(state, options, operations);\n if (target.kind === 'selection') return resolveEditorCommandSelectionCameraTarget(state, capabilityId, operations);\n if (target.kind === 'object') {\n const objectId = normalizeEditorCommandString(target.objectId);\n if (!objectId) {\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n 'Camera object target requires objectId.',\n { code: 'viewport.camera.invalidTarget' },\n ),\n };\n }\n const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;\n const hierarchy = document ? getEditorCommandSafeSceneHierarchy(operations) : [];\n if (!document || !isEditorCommandHierarchyObjectSelectable(options, document, objectId, hierarchy)) {\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n `Camera target object was not found: ${objectId}`,\n { code: 'viewport.camera.targetNotFound', objectId },\n ),\n };\n }\n return resolveEditorCommandObjectCameraTarget(state, objectId, capabilityId);\n }\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n 'Unsupported camera target.',\n { code: 'viewport.camera.invalidTarget' },\n ),\n };\n}\n\nfunction createDefaultEditorCommandViewportCameraTarget<TDocument>(\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): EditorCommandViewportCameraTarget {\n const selection = getEditorCommandViewportSelection(operations).selection;\n return selection.activeId ? { kind: 'selection' } : { kind: 'scene' };\n}\n\nfunction resolveEditorCommandSelectionCameraTarget<TDocument, TPatch>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n capabilityId: string,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): { ok: true; target: EditorCommandVec3 | null; radius?: number } | { ok: false; result: ReturnType<typeof createLocalEditorCommandFailure> } {\n const selection = getEditorCommandViewportSelection(operations).selection;\n const selectedIds = selection.selectedIds.length > 0\n ? selection.selectedIds\n : selection.activeId ? [selection.activeId] : [];\n if (selectedIds.length === 0) {\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n 'Camera target selection is empty.',\n { code: 'viewport.camera.emptySelection' },\n ),\n };\n }\n const bounds = state.projection?.getSelectionBounds(selectedIds) ?? null;\n if (!bounds) {\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n 'Camera target selection has no projection bounds.',\n { code: 'viewport.camera.missingBounds', objectId: selection.activeId ?? undefined },\n ),\n };\n }\n return {\n ok: true,\n target: cloneVec3(bounds.center),\n radius: createEditorCommandCameraRadiusFromBounds(bounds),\n };\n}\n\nfunction resolveEditorCommandSceneCameraTarget<TDocument, TPatch, TAsset>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>,\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): { ok: true; target: EditorCommandVec3 | null; radius?: number } {\n const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;\n if (!document) return { ok: true, target: null };\n const hierarchy = getEditorCommandSafeSceneHierarchy(operations);\n const objectIds = hierarchy\n .map(item => item.id)\n .filter(objectId => isEditorCommandHierarchyObjectSelectable(options, document, objectId, hierarchy));\n if (objectIds.length === 0) return { ok: true, target: null };\n const bounds = state.projection?.getSelectionBounds(objectIds) ?? null;\n if (!bounds) return { ok: true, target: null };\n return {\n ok: true,\n target: cloneVec3(bounds.center),\n radius: createEditorCommandCameraRadiusFromBounds(bounds),\n };\n}\n\nfunction getEditorCommandViewportSelection<TDocument>(\n operations: LocalEditorCommandCapabilitySourceOperations<TDocument>,\n): { selection: EditorSelectionState; scene: boolean } {\n const safeScene = getEditorCommandSafeSceneReadModel(operations);\n return safeScene.scopeType === 'scene'\n ? { selection: safeScene.selection, scene: true }\n : { selection: operations.getPreviewSelection(), scene: false };\n}\n\nfunction resolveEditorCommandObjectCameraTarget<TDocument, TPatch>(\n state: LocalEditorCommandHarnessState<TDocument, TPatch>,\n objectId: string,\n capabilityId: string,\n): { ok: true; target: EditorCommandVec3 | null; radius?: number } | { ok: false; result: ReturnType<typeof createLocalEditorCommandFailure> } {\n const bounds = state.projection?.getSelectionBounds([objectId]) ?? null;\n if (!bounds) {\n return {\n ok: false,\n result: createLocalEditorCommandFailure(\n capabilityId,\n `Camera target object has no projection bounds: ${objectId}`,\n { code: 'viewport.camera.missingBounds', objectId },\n ),\n };\n }\n return {\n ok: true,\n target: cloneVec3(bounds.center),\n radius: createEditorCommandCameraRadiusFromBounds(bounds),\n };\n}\n\nfunction createEditorCommandCameraRadiusFromBounds(bounds: { size: EditorCommandVec3 }): number | undefined {\n const radius = Math.hypot(bounds.size.x, bounds.size.y, bounds.size.z);\n return Number.isFinite(radius) && radius > 0 ? Math.max(radius * 1.5, 2) : undefined;\n}\n\nfunction normalizeEditorCommandViewportCameraPreset(value: unknown): EditorViewportViewPreset | null {\n const preset = value === 'perspective'\n || value === 'top'\n || value === 'bottom'\n || value === 'front'\n || value === 'back'\n || value === 'left'\n || value === 'right'\n || value === 'iso'\n || value === 'threeQuarterTop'\n ? value\n : null;\n return preset as EditorViewportViewPreset | null;\n}\n\nfunction normalizeEditorCommandFiniteNumber(value: unknown, fallback: number): number {\n return typeof value === 'number' && Number.isFinite(value) ? value : fallback;\n}\n\nfunction normalizeEditorCommandPositiveNumber(value: unknown, fallback: number | null): number | null {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : fallback;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LocalEditorHarnessOptions } from '../local-editor-harness.js';
|
|
2
|
+
import type { EditorCommandCallContext } from '@fps-games/editor-core';
|
|
3
|
+
import type { LocalEditorCommandCapabilitySources } from './source-types.js';
|
|
4
|
+
import type { LocalEditorCommandCapabilitySourceOperations, LocalEditorCommandHarnessState } from './shared.js';
|
|
5
|
+
export * from './shared.js';
|
|
6
|
+
export declare function createLocalEditorCommandCapabilitySources<TDocument, TPatch, TAsset>(state: LocalEditorCommandHarnessState<TDocument, TPatch>, options: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>, renderUi: () => void, enterEditor: (context?: EditorCommandCallContext) => Promise<void>, saveAndRun: (context?: EditorCommandCallContext) => Promise<boolean>, discardAndRun: (context?: EditorCommandCallContext) => Promise<boolean>, operations: LocalEditorCommandCapabilitySourceOperations<TDocument>): LocalEditorCommandCapabilitySources;
|
|
7
|
+
//# sourceMappingURL=command-sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-sources.d.ts","sourceRoot":"","sources":["../../src/editor-commands/command-sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAYvE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EACV,4CAA4C,EAC5C,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAErB,cAAc,aAAa,CAAC;AAE5B,wBAAgB,yCAAyC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EACjF,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,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,EAClE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,OAAO,CAAC,EACpE,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,OAAO,CAAC,EACvE,UAAU,EAAE,4CAA4C,CAAC,SAAS,CAAC,GAClE,mCAAmC,CAoBrC"}
|