@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
|
@@ -5,6 +5,7 @@ export * from './project-host-services';
|
|
|
5
5
|
export * from './standard-asset-actions';
|
|
6
6
|
export * from './scene-session';
|
|
7
7
|
export * from './standard-scene-assembly';
|
|
8
|
+
export * from './standard-authoring-commands';
|
|
8
9
|
export * from './asset-manager';
|
|
9
10
|
export * from './scene-source';
|
|
10
11
|
export type FpsGameEditorMaybePromise<T> = T | Promise<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,8BAA8B,CAAC;AAE1F,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,i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CAAC,CAAC,GAAG,IAAI,CAAC;IACxE,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,WAAW,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED,MAAM,MAAM,uBAAuB,CAAC,KAAK,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,OAAO,GACxF,OAAO,GACP,IAAI,CAAC;AAET,eAAO,MAAM,uCAAuC,gBAAgB,CAAC;AAErE,MAAM,WAAW,mCAAmC,CAAC,aAAa,GAAG,OAAO;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,SAAS,oBAAoB,GAAG,oBAAoB,EAE5D,MAAM,EAAE,0BAA0B,CAAC,QAAQ,CAAC,GAC3C,8BAA8B,CAAC,QAAQ,CAAC,CAyB1C;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,SAAS,oBAAoB,EAErC,OAAO,EAAE,QAAQ,GAChB,QAAQ,CAKV;AAED,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,qCAAqC,EACtF,MAAM,EAAE,OAAO,GACd,oBAAoB,CAAC,OAAO,EAAE,yBAAyB,EAAE,mCAAmC,CAAC,CAO/F;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,SAAS,8BAA8B,EAC/C,aAAa,SAAS,yBAAyB,EAE/C,OAAO,EAAE,QAAQ,EACjB,YAAY,EAAE,aAAa,GAC1B,oBAAoB,CAAC,QAAQ,EAAE,aAAa,CAAC,CA2C/C"}
|
|
@@ -4,6 +4,7 @@ export * from './project-host-services.js';
|
|
|
4
4
|
export * from './standard-asset-actions.js';
|
|
5
5
|
export * from './scene-session.js';
|
|
6
6
|
export * from './standard-scene-assembly.js';
|
|
7
|
+
export * from './standard-authoring-commands.js';
|
|
7
8
|
export * from './asset-manager.js';
|
|
8
9
|
export * from './scene-source.js';
|
|
9
10
|
export const FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID = 'groundDecal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/product/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAuG/B,MAAM,CAAC,MAAM,uCAAuC,GAAG,aAAa,CAAC;AAOrE,MAAM,UAAU,0BAA0B,CAGxC,MAA4C;IAE5C,oBAAoB,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACpD,oBAAoB,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACxD,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACvE,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAC;IACzE,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;QACpC,oBAAoB,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IACpE,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;QAClC,oBAAoB,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAChE,CAAC;IACD,oBAAoB,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACvE,oBAAoB,CAAC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EAAE,EAAE,CAAC;YACjC,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAc,EAAE,IAAY;IACxD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,4BAA4B,CAAC,CAAC;IAC3F,CAAC;AACH,CAAC","sourcesContent":["import type { FpsGameEditorGroundDecalFeatureConfig } from './ground-decal-scene-feature';\n\nexport * from './ground-decal';\nexport * from './ground-decal-scene-feature';\nexport * from './project-host-services';\nexport * from './standard-asset-actions';\nexport * from './scene-session';\nexport * from './standard-scene-assembly';\nexport * from './asset-manager';\nexport * from './scene-source';\n\nexport type FpsGameEditorMaybePromise<T> = T | Promise<T>;\n\nexport interface FpsGameEditorProjectSourceConfig {\n editorScene: string;\n runtimeScene: string;\n rendering?: string;\n shadows?: string;\n}\n\nexport interface FpsGameEditorProjectAssetsConfig {\n importedDir: string;\n generatedDir: string;\n publicBase: string;\n}\n\nexport interface FpsGameEditorFeatureRuntimeContribution {\n dispose?(): FpsGameEditorMaybePromise<void>;\n [key: string]: unknown;\n}\n\nexport interface FpsGameEditorFeatureRuntimeContext<\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n> {\n project: FpsGameEditorProjectDefinition;\n runtimeHooks: TRuntimeHooks;\n getFeature<TConfig = unknown>(id: string): FpsGameEditorFeature<TConfig> | null;\n}\n\nexport interface FpsGameEditorFeature<\n TConfig = unknown,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n TSceneContribution = unknown,\n> {\n id: string;\n label?: string;\n config: TConfig;\n scene?: TSceneContribution;\n setup?(\n context: FpsGameEditorFeatureRuntimeContext<TRuntimeHooks>,\n ): FpsGameEditorFeatureRuntimeContribution | void;\n}\n\nexport interface FpsGameEditorProjectConfig<\n TFeature extends FpsGameEditorFeature = FpsGameEditorFeature,\n> {\n projectId: string;\n projectName: string;\n source: FpsGameEditorProjectSourceConfig;\n assets: FpsGameEditorProjectAssetsConfig;\n features?: readonly TFeature[];\n metadata?: Readonly<Record<string, unknown>>;\n}\n\nexport interface FpsGameEditorProjectDefinition<\n TFeature extends FpsGameEditorFeature = FpsGameEditorFeature,\n> extends Omit<FpsGameEditorProjectConfig<TFeature>, 'features'> {\n features: readonly TFeature[];\n}\n\nexport interface FpsGameEditorRuntimeHooks<TGame = unknown, TCanvas = unknown> {\n getGame?: () => TGame | null;\n getCanvas?: () => TCanvas | null;\n disposeGameWorld?: () => FpsGameEditorMaybePromise<void>;\n restartGame?: (context?: FpsGameEditorRestartContext) => FpsGameEditorMaybePromise<void>;\n [key: string]: unknown;\n}\n\nexport interface FpsGameEditorRestartContext {\n reason?: string;\n}\n\nexport interface FpsGameEditorRuntimeContext<\n TProject extends FpsGameEditorProjectDefinition = FpsGameEditorProjectDefinition,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n> {\n project: TProject;\n runtimeHooks: TRuntimeHooks;\n features: TProject['features'];\n}\n\nexport interface FpsGameEditorAdapter<\n TProject extends FpsGameEditorProjectDefinition = FpsGameEditorProjectDefinition,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n> {\n project: TProject;\n runtimeHooks: TRuntimeHooks;\n features: TProject['features'];\n getProjectConfig(): TProject;\n getRuntimeContext(): FpsGameEditorRuntimeContext<TProject, TRuntimeHooks>;\n getFeature<TConfig = unknown>(id: string): FpsGameEditorFeature<TConfig> | null;\n getGame(): FpsGameEditorHookReturn<TRuntimeHooks['getGame']> | null;\n getCanvas(): FpsGameEditorHookReturn<TRuntimeHooks['getCanvas']> | null;\n disposeGameWorld(): Promise<void>;\n restartGame(context?: FpsGameEditorRestartContext): Promise<void>;\n dispose(): Promise<void>;\n}\n\nexport type FpsGameEditorHookReturn<THook> = THook extends (...args: any[]) => infer TResult\n ? TResult\n : null;\n\nexport const FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID = 'groundDecal';\n\nexport interface FpsGameEditorFeatureSceneDescriptor<TContribution = unknown> {\n kind: string;\n contribution?: TContribution;\n}\n\nexport function defineFpsGameEditorProject<\n TFeature extends FpsGameEditorFeature = FpsGameEditorFeature,\n>(\n config: FpsGameEditorProjectConfig<TFeature>,\n): FpsGameEditorProjectDefinition<TFeature> {\n assertNonEmptyString(config.projectId, 'projectId');\n assertNonEmptyString(config.projectName, 'projectName');\n assertNonEmptyString(config.source?.editorScene, 'source.editorScene');\n assertNonEmptyString(config.source?.runtimeScene, 'source.runtimeScene');\n if (config.source.rendering != null) {\n assertNonEmptyString(config.source.rendering, 'source.rendering');\n }\n if (config.source.shadows != null) {\n assertNonEmptyString(config.source.shadows, 'source.shadows');\n }\n assertNonEmptyString(config.assets?.importedDir, 'assets.importedDir');\n assertNonEmptyString(config.assets?.generatedDir, 'assets.generatedDir');\n assertNonEmptyString(config.assets?.publicBase, 'assets.publicBase');\n if (config.features != null && !Array.isArray(config.features)) {\n throw new Error('defineFpsGameEditorProject expected features to be an array.');\n }\n\n return {\n ...config,\n source: { ...config.source },\n assets: { ...config.assets },\n ...(config.metadata ? { metadata: { ...config.metadata } } : {}),\n features: [...(config.features ?? [])],\n };\n}\n\nexport function defineFpsGameEditorFeature<\n TFeature extends FpsGameEditorFeature,\n>(\n feature: TFeature,\n): TFeature {\n assertNonEmptyString(feature.id, 'feature.id');\n return {\n ...feature,\n };\n}\n\nexport function groundDecalFeature<TConfig extends FpsGameEditorGroundDecalFeatureConfig>(\n config: TConfig,\n): FpsGameEditorFeature<TConfig, FpsGameEditorRuntimeHooks, FpsGameEditorFeatureSceneDescriptor> {\n return defineFpsGameEditorFeature({\n id: FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID,\n label: 'Ground Decal',\n config,\n scene: { kind: FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID },\n });\n}\n\nexport function createFpsGameEditorAdapter<\n TProject extends FpsGameEditorProjectDefinition,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks,\n>(\n project: TProject,\n runtimeHooks: TRuntimeHooks,\n): FpsGameEditorAdapter<TProject, TRuntimeHooks> {\n const features = [...project.features] as unknown as TProject['features'];\n const contributions: FpsGameEditorFeatureRuntimeContribution[] = [];\n const getFeature = <TConfig = unknown>(id: string): FpsGameEditorFeature<TConfig> | null => (\n ([...features] as readonly FpsGameEditorFeature[]).find(feature => feature.id === id) as FpsGameEditorFeature<TConfig> | undefined\n ) ?? null;\n const runtimeContext: FpsGameEditorRuntimeContext<TProject, TRuntimeHooks> = {\n project,\n runtimeHooks,\n features,\n };\n const featureRuntimeContext: FpsGameEditorFeatureRuntimeContext<TRuntimeHooks> = {\n project,\n runtimeHooks,\n getFeature,\n };\n\n for (const feature of features as readonly FpsGameEditorFeature[]) {\n const contribution = feature.setup?.(featureRuntimeContext);\n if (contribution) contributions.push(contribution);\n }\n\n return {\n project,\n runtimeHooks,\n features,\n getProjectConfig: () => project,\n getRuntimeContext: () => runtimeContext,\n getFeature,\n getGame: () => (runtimeHooks.getGame?.() ?? null) as FpsGameEditorHookReturn<TRuntimeHooks['getGame']> | null,\n getCanvas: () => (runtimeHooks.getCanvas?.() ?? null) as FpsGameEditorHookReturn<TRuntimeHooks['getCanvas']> | null,\n disposeGameWorld: async () => {\n await runtimeHooks.disposeGameWorld?.();\n },\n restartGame: async (context?: FpsGameEditorRestartContext) => {\n await runtimeHooks.restartGame?.(context);\n },\n dispose: async () => {\n for (const contribution of [...contributions].reverse()) {\n await contribution.dispose?.();\n }\n },\n };\n}\n\nfunction assertNonEmptyString(value: unknown, path: string): asserts value is string {\n if (typeof value !== 'string' || value.trim().length === 0) {\n throw new Error(`defineFpsGameEditorProject expected ${path} to be a non-empty string.`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/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KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,4BAA4B,CAAC,CAAC;IAC3F,CAAC;AACH,CAAC","sourcesContent":["import type { FpsGameEditorGroundDecalFeatureConfig } from './ground-decal-scene-feature';\n\nexport * from './ground-decal';\nexport * from './ground-decal-scene-feature';\nexport * from './project-host-services';\nexport * from './standard-asset-actions';\nexport * from './scene-session';\nexport * from './standard-scene-assembly';\nexport * from './standard-authoring-commands';\nexport * from './asset-manager';\nexport * from './scene-source';\n\nexport type FpsGameEditorMaybePromise<T> = T | Promise<T>;\n\nexport interface FpsGameEditorProjectSourceConfig {\n editorScene: string;\n runtimeScene: string;\n rendering?: string;\n shadows?: string;\n}\n\nexport interface FpsGameEditorProjectAssetsConfig {\n importedDir: string;\n generatedDir: string;\n publicBase: string;\n}\n\nexport interface FpsGameEditorFeatureRuntimeContribution {\n dispose?(): FpsGameEditorMaybePromise<void>;\n [key: string]: unknown;\n}\n\nexport interface FpsGameEditorFeatureRuntimeContext<\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n> {\n project: FpsGameEditorProjectDefinition;\n runtimeHooks: TRuntimeHooks;\n getFeature<TConfig = unknown>(id: string): FpsGameEditorFeature<TConfig> | null;\n}\n\nexport interface FpsGameEditorFeature<\n TConfig = unknown,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n TSceneContribution = unknown,\n> {\n id: string;\n label?: string;\n config: TConfig;\n scene?: TSceneContribution;\n setup?(\n context: FpsGameEditorFeatureRuntimeContext<TRuntimeHooks>,\n ): FpsGameEditorFeatureRuntimeContribution | void;\n}\n\nexport interface FpsGameEditorProjectConfig<\n TFeature extends FpsGameEditorFeature = FpsGameEditorFeature,\n> {\n projectId: string;\n projectName: string;\n source: FpsGameEditorProjectSourceConfig;\n assets: FpsGameEditorProjectAssetsConfig;\n features?: readonly TFeature[];\n metadata?: Readonly<Record<string, unknown>>;\n}\n\nexport interface FpsGameEditorProjectDefinition<\n TFeature extends FpsGameEditorFeature = FpsGameEditorFeature,\n> extends Omit<FpsGameEditorProjectConfig<TFeature>, 'features'> {\n features: readonly TFeature[];\n}\n\nexport interface FpsGameEditorRuntimeHooks<TGame = unknown, TCanvas = unknown> {\n getGame?: () => TGame | null;\n getCanvas?: () => TCanvas | null;\n disposeGameWorld?: () => FpsGameEditorMaybePromise<void>;\n restartGame?: (context?: FpsGameEditorRestartContext) => FpsGameEditorMaybePromise<void>;\n [key: string]: unknown;\n}\n\nexport interface FpsGameEditorRestartContext {\n reason?: string;\n}\n\nexport interface FpsGameEditorRuntimeContext<\n TProject extends FpsGameEditorProjectDefinition = FpsGameEditorProjectDefinition,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n> {\n project: TProject;\n runtimeHooks: TRuntimeHooks;\n features: TProject['features'];\n}\n\nexport interface FpsGameEditorAdapter<\n TProject extends FpsGameEditorProjectDefinition = FpsGameEditorProjectDefinition,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks = FpsGameEditorRuntimeHooks,\n> {\n project: TProject;\n runtimeHooks: TRuntimeHooks;\n features: TProject['features'];\n getProjectConfig(): TProject;\n getRuntimeContext(): FpsGameEditorRuntimeContext<TProject, TRuntimeHooks>;\n getFeature<TConfig = unknown>(id: string): FpsGameEditorFeature<TConfig> | null;\n getGame(): FpsGameEditorHookReturn<TRuntimeHooks['getGame']> | null;\n getCanvas(): FpsGameEditorHookReturn<TRuntimeHooks['getCanvas']> | null;\n disposeGameWorld(): Promise<void>;\n restartGame(context?: FpsGameEditorRestartContext): Promise<void>;\n dispose(): Promise<void>;\n}\n\nexport type FpsGameEditorHookReturn<THook> = THook extends (...args: any[]) => infer TResult\n ? TResult\n : null;\n\nexport const FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID = 'groundDecal';\n\nexport interface FpsGameEditorFeatureSceneDescriptor<TContribution = unknown> {\n kind: string;\n contribution?: TContribution;\n}\n\nexport function defineFpsGameEditorProject<\n TFeature extends FpsGameEditorFeature = FpsGameEditorFeature,\n>(\n config: FpsGameEditorProjectConfig<TFeature>,\n): FpsGameEditorProjectDefinition<TFeature> {\n assertNonEmptyString(config.projectId, 'projectId');\n assertNonEmptyString(config.projectName, 'projectName');\n assertNonEmptyString(config.source?.editorScene, 'source.editorScene');\n assertNonEmptyString(config.source?.runtimeScene, 'source.runtimeScene');\n if (config.source.rendering != null) {\n assertNonEmptyString(config.source.rendering, 'source.rendering');\n }\n if (config.source.shadows != null) {\n assertNonEmptyString(config.source.shadows, 'source.shadows');\n }\n assertNonEmptyString(config.assets?.importedDir, 'assets.importedDir');\n assertNonEmptyString(config.assets?.generatedDir, 'assets.generatedDir');\n assertNonEmptyString(config.assets?.publicBase, 'assets.publicBase');\n if (config.features != null && !Array.isArray(config.features)) {\n throw new Error('defineFpsGameEditorProject expected features to be an array.');\n }\n\n return {\n ...config,\n source: { ...config.source },\n assets: { ...config.assets },\n ...(config.metadata ? { metadata: { ...config.metadata } } : {}),\n features: [...(config.features ?? [])],\n };\n}\n\nexport function defineFpsGameEditorFeature<\n TFeature extends FpsGameEditorFeature,\n>(\n feature: TFeature,\n): TFeature {\n assertNonEmptyString(feature.id, 'feature.id');\n return {\n ...feature,\n };\n}\n\nexport function groundDecalFeature<TConfig extends FpsGameEditorGroundDecalFeatureConfig>(\n config: TConfig,\n): FpsGameEditorFeature<TConfig, FpsGameEditorRuntimeHooks, FpsGameEditorFeatureSceneDescriptor> {\n return defineFpsGameEditorFeature({\n id: FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID,\n label: 'Ground Decal',\n config,\n scene: { kind: FPS_GAME_EDITOR_GROUND_DECAL_FEATURE_ID },\n });\n}\n\nexport function createFpsGameEditorAdapter<\n TProject extends FpsGameEditorProjectDefinition,\n TRuntimeHooks extends FpsGameEditorRuntimeHooks,\n>(\n project: TProject,\n runtimeHooks: TRuntimeHooks,\n): FpsGameEditorAdapter<TProject, TRuntimeHooks> {\n const features = [...project.features] as unknown as TProject['features'];\n const contributions: FpsGameEditorFeatureRuntimeContribution[] = [];\n const getFeature = <TConfig = unknown>(id: string): FpsGameEditorFeature<TConfig> | null => (\n ([...features] as readonly FpsGameEditorFeature[]).find(feature => feature.id === id) as FpsGameEditorFeature<TConfig> | undefined\n ) ?? null;\n const runtimeContext: FpsGameEditorRuntimeContext<TProject, TRuntimeHooks> = {\n project,\n runtimeHooks,\n features,\n };\n const featureRuntimeContext: FpsGameEditorFeatureRuntimeContext<TRuntimeHooks> = {\n project,\n runtimeHooks,\n getFeature,\n };\n\n for (const feature of features as readonly FpsGameEditorFeature[]) {\n const contribution = feature.setup?.(featureRuntimeContext);\n if (contribution) contributions.push(contribution);\n }\n\n return {\n project,\n runtimeHooks,\n features,\n getProjectConfig: () => project,\n getRuntimeContext: () => runtimeContext,\n getFeature,\n getGame: () => (runtimeHooks.getGame?.() ?? null) as FpsGameEditorHookReturn<TRuntimeHooks['getGame']> | null,\n getCanvas: () => (runtimeHooks.getCanvas?.() ?? null) as FpsGameEditorHookReturn<TRuntimeHooks['getCanvas']> | null,\n disposeGameWorld: async () => {\n await runtimeHooks.disposeGameWorld?.();\n },\n restartGame: async (context?: FpsGameEditorRestartContext) => {\n await runtimeHooks.restartGame?.(context);\n },\n dispose: async () => {\n for (const contribution of [...contributions].reverse()) {\n await contribution.dispose?.();\n }\n },\n };\n}\n\nfunction assertNonEmptyString(value: unknown, path: string): asserts value is string {\n if (typeof value !== 'string' || value.trim().length === 0) {\n throw new Error(`defineFpsGameEditorProject expected ${path} to be a non-empty string.`);\n }\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { EditorServiceDocumentExportArtifact } from '@fps-games/editor-protocol';
|
|
2
2
|
import { type PlayablePlatformAssetDropPoint, type PlayablePlatformAssetExternal } from '../asset-bridge/index';
|
|
3
3
|
import type { PlayableLocalEditorHostBridgeContext, PlayableLocalEditorHostHarness } from '../local-harness/host-controller';
|
|
4
4
|
import type { PlayableForgePlaySaveState } from '../local-harness/forge-play-types';
|
|
5
5
|
import type { PlayableLocalEditorDocumentOperationExecutor } from '../local-harness/types';
|
|
6
6
|
type ProductHarness<TDocument> = PlayableLocalEditorHostHarness & {
|
|
7
7
|
getWorkingDocument(): TDocument | null;
|
|
8
|
+
prepareProjectServiceDocumentExport?(): Promise<EditorServiceDocumentExportArtifact<TDocument> | null>;
|
|
8
9
|
getDocumentRevision(): number;
|
|
9
10
|
validateOperationSettledForCurrentDocument(phase: 'save' | 'run' | 'export'): Promise<boolean>;
|
|
10
11
|
runExclusiveDocumentOperation<TResult>(operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>): Promise<TResult>;
|
|
@@ -14,19 +15,14 @@ type ProductHarness<TDocument> = PlayableLocalEditorHostHarness & {
|
|
|
14
15
|
[key: string]: unknown;
|
|
15
16
|
}>;
|
|
16
17
|
};
|
|
17
|
-
export interface FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject extends
|
|
18
|
-
|
|
18
|
+
export interface FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject extends {
|
|
19
|
+
id: string;
|
|
20
|
+
}, TAsset> {
|
|
19
21
|
sceneSource: {
|
|
20
22
|
save(document: TDocument, options: any): Promise<any>;
|
|
21
23
|
loadAssets(): Promise<TAsset[]>;
|
|
22
24
|
};
|
|
23
25
|
enrichDocument?(document: TDocument, assets: TAsset[]): TDocument;
|
|
24
|
-
findObject?(document: TDocument, id: string): TGameObject | null;
|
|
25
|
-
findObjects?(document: TDocument, ids: readonly string[]): TGameObject[];
|
|
26
|
-
readNodeKind?(object: TGameObject): string;
|
|
27
|
-
findAsset?(document: TDocument, object: TGameObject): TAsset | null;
|
|
28
|
-
hasModelRenderer?(object: TGameObject): boolean;
|
|
29
|
-
resolveDomainRole?(object: TGameObject): string | null;
|
|
30
26
|
findExistingAsset(payload: Record<string, unknown>): Promise<{
|
|
31
27
|
guid?: string;
|
|
32
28
|
assetId: string;
|
|
@@ -39,83 +35,22 @@ export interface FpsGameEditorProductProjectHostServicesOptions<TDocument, TGame
|
|
|
39
35
|
} | null;
|
|
40
36
|
registerCommandName?: string;
|
|
41
37
|
}
|
|
42
|
-
export declare function createFpsGameEditorProductProjectHostServices<TDocument, TGameObject extends
|
|
38
|
+
export declare function createFpsGameEditorProductProjectHostServices<TDocument, TGameObject extends {
|
|
39
|
+
id: string;
|
|
40
|
+
}, TAsset>(options: FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject, TAsset>): {
|
|
43
41
|
hydrateDocumentAssets: (document: TDocument, assets: TAsset[]) => TDocument;
|
|
44
|
-
agentContext: {
|
|
45
|
-
describeSceneObject: ({ document, objectId }: any) => {
|
|
46
|
-
domainKind: string;
|
|
47
|
-
domainRole: string;
|
|
48
|
-
functionLabel: string;
|
|
49
|
-
functionDescription: string;
|
|
50
|
-
domainHints: string[];
|
|
51
|
-
bindingCandidates: {
|
|
52
|
-
kind: string;
|
|
53
|
-
id: string;
|
|
54
|
-
label: string;
|
|
55
|
-
path: string;
|
|
56
|
-
}[];
|
|
57
|
-
sourceRefs: {
|
|
58
|
-
kind: string;
|
|
59
|
-
path: string;
|
|
60
|
-
label: string;
|
|
61
|
-
}[];
|
|
62
|
-
metadata: {
|
|
63
|
-
prefab?: import("..").PlayableEditorAgentJsonObject | undefined;
|
|
64
|
-
assetId?: string | undefined;
|
|
65
|
-
assetDisplayName?: string | undefined;
|
|
66
|
-
nodeKind: string;
|
|
67
|
-
};
|
|
68
|
-
} | null;
|
|
69
|
-
describeSceneObjectSet: ({ document, objectIds }: any) => {
|
|
70
|
-
domainKind: string;
|
|
71
|
-
domainRole: string;
|
|
72
|
-
functionLabel: string;
|
|
73
|
-
functionDescription: string;
|
|
74
|
-
domainHints: string[];
|
|
75
|
-
relationshipHints: {
|
|
76
|
-
type: string;
|
|
77
|
-
description: string;
|
|
78
|
-
primaryObjectId: string;
|
|
79
|
-
supportingObjectIds: string[];
|
|
80
|
-
}[];
|
|
81
|
-
sourceRefs: {
|
|
82
|
-
kind: string;
|
|
83
|
-
path: string;
|
|
84
|
-
label: string;
|
|
85
|
-
}[];
|
|
86
|
-
metadata: {
|
|
87
|
-
prefabs?: import("..").PlayableEditorAgentJsonObject[] | undefined;
|
|
88
|
-
objectCount: number;
|
|
89
|
-
nodeKinds: string[];
|
|
90
|
-
};
|
|
91
|
-
} | null;
|
|
92
|
-
describeRegionBinding: ({ document, objectIds }: any) => {
|
|
93
|
-
domainKind: string;
|
|
94
|
-
domainRole: string;
|
|
95
|
-
functionLabel: string;
|
|
96
|
-
functionDescription: string;
|
|
97
|
-
domainHints: string[];
|
|
98
|
-
relationshipHints: {
|
|
99
|
-
type: string;
|
|
100
|
-
description: string;
|
|
101
|
-
primaryObjectId: string;
|
|
102
|
-
supportingObjectIds: string[];
|
|
103
|
-
}[];
|
|
104
|
-
sourceRefs: {
|
|
105
|
-
kind: string;
|
|
106
|
-
path: string;
|
|
107
|
-
label: string;
|
|
108
|
-
}[];
|
|
109
|
-
metadata: {
|
|
110
|
-
objectCount: number;
|
|
111
|
-
objectIds: string[];
|
|
112
|
-
};
|
|
113
|
-
} | null;
|
|
114
|
-
};
|
|
115
42
|
summarize: (document: any) => string;
|
|
116
43
|
handleProjectAssetCommand: (context: PlayableLocalEditorHostBridgeContext<any>) => Promise<void>;
|
|
117
|
-
exportDocument(harness: ProductHarness<TDocument>, payload: Record<string, unknown>, saveState: PlayableForgePlaySaveState): Promise<{
|
|
44
|
+
exportDocument(harness: ProductHarness<TDocument>, payload: Record<string, unknown>, saveState: PlayableForgePlaySaveState, postEvent?: (name: string, payload?: Record<string, unknown>) => void): Promise<{
|
|
45
|
+
expectedVersion?: any;
|
|
118
46
|
documentFingerprint: string | null;
|
|
47
|
+
documentRevision: number;
|
|
48
|
+
preparedAuthoringSource: {
|
|
49
|
+
serviceTransactionId?: string | undefined;
|
|
50
|
+
serviceDocumentRevision?: number | undefined;
|
|
51
|
+
source?: any;
|
|
52
|
+
document: any;
|
|
53
|
+
};
|
|
119
54
|
}>;
|
|
120
55
|
};
|
|
121
56
|
export declare function readFpsGameEditorPlatformAssetLookup(payload: Record<string, unknown>): {
|
package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-host-services.d.ts","sourceRoot":"","sources":["../../src/product/project-host-services.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-host-services.d.ts","sourceRoot":"","sources":["../../src/product/project-host-services.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAgG,KAAK,8BAA8B,EAAE,KAAK,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAI9M,OAAO,KAAK,EAAE,oCAAoC,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAE7H,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,wBAAwB,CAAC;AAE3F,KAAK,cAAc,CAAC,SAAS,IAAI,8BAA8B,GAAG;IAChE,kBAAkB,IAAI,SAAS,GAAG,IAAI,CAAC;IACvC,mCAAmC,CAAC,IAAI,OAAO,CAAC,mCAAmC,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;IACvG,mBAAmB,IAAI,MAAM,CAAC;IAC9B,0CAA0C,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/F,6BAA6B,CAAC,OAAO,EACnC,SAAS,EAAE,CAAC,QAAQ,EAAE,4CAA4C,KAAK,OAAO,CAAC,OAAO,CAAC,GACtF,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,YAAY,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,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E,OAAO,CAAC,aACrB,0BAA0B,cAC1B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;;;;;;;;;;;EA0DzE;AAwFD,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAOA"}
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
import { createEditorScenePrefabAgentSummary, findEditorSceneModelRenderer, readEditorSceneNodeKind, } from '../document/helpers.js';
|
|
2
1
|
import { enrichEditorSceneDocumentAssets } from '../asset-library/document.js';
|
|
3
|
-
import { describePlayableEditorAgentObject, describePlayableEditorAgentObjectSet, describePlayableEditorAgentRegionBinding } from '../local-harness/agent-descriptions.js';
|
|
4
2
|
import { readPlayablePlatformAssetKind, readPlayablePlatformAssetPath, readPlayablePlatformRawAssetId } from '../asset-bridge/index.js';
|
|
5
3
|
import { registerPlayablePlatformAsset, registerPlayablePlatformAssetIfNeeded } from '../asset-registration/workflow.js';
|
|
6
4
|
import { runPlayableAuthoringCommand, writePlayableAuthoringFile } from '../authoring-client/client.js';
|
|
7
5
|
import { createPlayableForgePlayDocumentFingerprint, createPlayableProjectAssetCommandHandler, postPlayableForgePlayEvent } from '../local-harness/index.js';
|
|
8
6
|
import { PLAYABLE_FORGE_PLAY_EVENT, readPlayableForgePlayRequestId } from '../local-harness/forge-play.js';
|
|
9
7
|
export function createFpsGameEditorProductProjectHostServices(options) {
|
|
8
|
+
let authoringSourceRevisionCursor = null;
|
|
10
9
|
const standardServices = createStandardDocumentServices();
|
|
11
10
|
const enrichDocument = options.enrichDocument ?? standardServices.enrichDocument;
|
|
12
|
-
const descriptions = {
|
|
13
|
-
domainPrefix: options.domainPrefix,
|
|
14
|
-
findGameObject: options.findObject ?? standardServices.findObject,
|
|
15
|
-
findGameObjects: options.findObjects ?? standardServices.findObjects,
|
|
16
|
-
readNodeKind: options.readNodeKind ?? standardServices.readNodeKind,
|
|
17
|
-
findAsset: options.findAsset ?? standardServices.findAsset,
|
|
18
|
-
createPrefabSummary: (document, id) => createEditorScenePrefabAgentSummary(document, id),
|
|
19
|
-
hasModelRenderer: options.hasModelRenderer ?? standardServices.hasModelRenderer,
|
|
20
|
-
resolveDomainRole: options.resolveDomainRole,
|
|
21
|
-
};
|
|
22
11
|
const findAssetId = async (payload) => {
|
|
23
12
|
const explicit = readString(payload.projectAssetId);
|
|
24
13
|
if (explicit)
|
|
@@ -37,14 +26,11 @@ export function createFpsGameEditorProductProjectHostServices(options) {
|
|
|
37
26
|
});
|
|
38
27
|
return {
|
|
39
28
|
hydrateDocumentAssets: enrichDocument,
|
|
40
|
-
agentContext: {
|
|
41
|
-
describeSceneObject: ({ document, objectId }) => describePlayableEditorAgentObject(document, objectId, descriptions),
|
|
42
|
-
describeSceneObjectSet: ({ document, objectIds }) => describePlayableEditorAgentObjectSet(document, objectIds, descriptions),
|
|
43
|
-
describeRegionBinding: ({ document, objectIds }) => describePlayableEditorAgentRegionBinding(document, objectIds, descriptions),
|
|
44
|
-
},
|
|
45
29
|
summarize: (document) => `editorScene assets=${document.assets?.length ?? 0}, gameObjects=${document.scene?.gameObjects?.length ?? 0}`,
|
|
46
30
|
handleProjectAssetCommand: (context) => handleCommand(context),
|
|
47
|
-
async exportDocument(harness, payload, saveState) {
|
|
31
|
+
async exportDocument(harness, payload, saveState, postEvent = (name, eventPayload) => {
|
|
32
|
+
postPlayableForgePlayEvent(window, name, eventPayload);
|
|
33
|
+
}) {
|
|
48
34
|
return harness.runExclusiveDocumentOperation(async () => {
|
|
49
35
|
const preRefreshAuthoredVersion = harness.getDocumentRevision();
|
|
50
36
|
await assertProductOperationValid(harness, 'export');
|
|
@@ -61,65 +47,75 @@ export function createFpsGameEditorProductProjectHostServices(options) {
|
|
|
61
47
|
const document = harness.getWorkingDocument();
|
|
62
48
|
if (!document)
|
|
63
49
|
throw new Error('editor_document_unavailable');
|
|
64
|
-
const
|
|
50
|
+
const servicePrepared = await harness.prepareProjectServiceDocumentExport?.() ?? null;
|
|
51
|
+
const prepared = servicePrepared ?? await prepareProductDocumentExport(document, options.sceneSource, authoringSourceRevisionCursor);
|
|
52
|
+
if (!servicePrepared) {
|
|
53
|
+
const preparedAuthoringRevision = readProductAuthoringSourceRevision(prepared.document);
|
|
54
|
+
if (preparedAuthoringRevision !== null) {
|
|
55
|
+
authoringSourceRevisionCursor = preparedAuthoringRevision;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
65
58
|
assertProductDocumentRevision(harness, expectedAuthoredVersion, 'export');
|
|
66
59
|
const sceneJsonText = typeof prepared.sceneJsonText === 'string' && prepared.sceneJsonText.trim()
|
|
67
60
|
? prepared.sceneJsonText
|
|
68
61
|
: `${JSON.stringify(prepared.compiledArtifact?.data ?? prepared.document, null, 2)}\n`;
|
|
69
62
|
saveState.preparedRevision += 1;
|
|
70
63
|
saveState.committedRevision = 0;
|
|
71
|
-
|
|
64
|
+
postEvent(PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_EXPORTED, {
|
|
72
65
|
requestId: readPlayableForgePlayRequestId(payload),
|
|
73
66
|
sceneJsonText,
|
|
74
67
|
...(typeof prepared.expectedVersion === 'number' ? { expectedVersion: prepared.expectedVersion } : {}),
|
|
75
68
|
});
|
|
76
69
|
return {
|
|
77
70
|
documentFingerprint: createPlayableForgePlayDocumentFingerprint(document),
|
|
71
|
+
documentRevision: expectedAuthoredVersion,
|
|
72
|
+
preparedAuthoringSource: {
|
|
73
|
+
document: prepared.document,
|
|
74
|
+
...(prepared.source ? { source: prepared.source } : {}),
|
|
75
|
+
...(servicePrepared ? {
|
|
76
|
+
serviceTransactionId: servicePrepared.transactionId,
|
|
77
|
+
serviceDocumentRevision: servicePrepared.documentRevision,
|
|
78
|
+
} : {}),
|
|
79
|
+
},
|
|
80
|
+
...(typeof prepared.expectedVersion === 'number' ? { expectedVersion: prepared.expectedVersion } : {}),
|
|
78
81
|
};
|
|
79
82
|
});
|
|
80
83
|
},
|
|
81
84
|
};
|
|
82
85
|
}
|
|
86
|
+
async function prepareProductDocumentExport(document, sceneSource, authoringSourceRevisionCursor) {
|
|
87
|
+
const workingAuthoringRevision = readProductAuthoringSourceRevision(document);
|
|
88
|
+
const revisionCursor = authoringSourceRevisionCursor ?? workingAuthoringRevision;
|
|
89
|
+
const outboundDocument = rebaseProductAuthoringSourceRevision(document, revisionCursor);
|
|
90
|
+
return sceneSource.save(outboundDocument, {
|
|
91
|
+
mode: 'prepare-platform-save',
|
|
92
|
+
...(revisionCursor === null
|
|
93
|
+
? {}
|
|
94
|
+
: { expectedAuthoringSourceRevision: revisionCursor }),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function readProductAuthoringSourceRevision(value) {
|
|
98
|
+
const source = readRecord(readRecord(readRecord(value)?.meta)?.authoringSource);
|
|
99
|
+
return typeof source?.revision === 'number' && Number.isFinite(source.revision)
|
|
100
|
+
? source.revision
|
|
101
|
+
: null;
|
|
102
|
+
}
|
|
103
|
+
function rebaseProductAuthoringSourceRevision(document, revision) {
|
|
104
|
+
const currentRevision = readProductAuthoringSourceRevision(document);
|
|
105
|
+
if (revision === null || currentRevision === null || currentRevision === revision)
|
|
106
|
+
return document;
|
|
107
|
+
const clone = structuredClone(document);
|
|
108
|
+
const record = readRecord(clone);
|
|
109
|
+
const meta = readRecord(record?.meta);
|
|
110
|
+
const source = readRecord(meta?.authoringSource);
|
|
111
|
+
if (!record || !meta || !source)
|
|
112
|
+
return document;
|
|
113
|
+
source.revision = revision;
|
|
114
|
+
return clone;
|
|
115
|
+
}
|
|
83
116
|
function createStandardDocumentServices() {
|
|
84
|
-
const listObjects = (document) => {
|
|
85
|
-
const scene = readRecord(readRecord(document)?.scene);
|
|
86
|
-
return Array.isArray(scene?.gameObjects) ? scene.gameObjects : [];
|
|
87
|
-
};
|
|
88
|
-
const readAssetId = (object) => {
|
|
89
|
-
const record = readRecord(object);
|
|
90
|
-
const components = Array.isArray(record?.components) ? record.components : [];
|
|
91
|
-
const renderer = components.find(component => readRecord(component)?.type === 'ModelRenderer');
|
|
92
|
-
const rendererAssetId = readString(readRecord(renderer)?.assetId);
|
|
93
|
-
if (rendererAssetId)
|
|
94
|
-
return rendererAssetId;
|
|
95
|
-
return readString(readRecord(record?.instance)?.assetId) ?? null;
|
|
96
|
-
};
|
|
97
117
|
return {
|
|
98
118
|
enrichDocument: (document, assets) => enrichEditorSceneDocumentAssets(document, assets),
|
|
99
|
-
findObject: (document, id) => (listObjects(document).find(entry => entry.id === id) ?? null),
|
|
100
|
-
findObjects: (document, ids) => {
|
|
101
|
-
const selected = new Set(ids);
|
|
102
|
-
return listObjects(document).filter(entry => selected.has(entry.id));
|
|
103
|
-
},
|
|
104
|
-
readNodeKind: (object) => readEditorSceneNodeKind(object),
|
|
105
|
-
findAsset: (document, object) => {
|
|
106
|
-
const assetId = readAssetId(object);
|
|
107
|
-
if (!assetId)
|
|
108
|
-
return null;
|
|
109
|
-
const assets = readRecord(document)?.assets;
|
|
110
|
-
if (!Array.isArray(assets))
|
|
111
|
-
return null;
|
|
112
|
-
return assets.find((asset) => {
|
|
113
|
-
const record = readRecord(asset);
|
|
114
|
-
return readString(record?.id) === assetId || readString(record?.assetId) === assetId;
|
|
115
|
-
}) ?? null;
|
|
116
|
-
},
|
|
117
|
-
hasModelRenderer: (object) => {
|
|
118
|
-
const record = readRecord(object);
|
|
119
|
-
if (!Array.isArray(record?.components))
|
|
120
|
-
return false;
|
|
121
|
-
return !!findEditorSceneModelRenderer(object);
|
|
122
|
-
},
|
|
123
119
|
};
|
|
124
120
|
}
|
|
125
121
|
async function assertProductOperationValid(harness, phase) {
|
package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-host-services.js","sourceRoot":"","sources":["../../src/product/project-host-services.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAM5E,OAAO,EAAE,iCAAiC,EAAE,oCAAoC,EAAE,wCAAwC,EAAgI,MAAM,qCAAqC,CAAC;AACtS,OAAO,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,8BAA8B,EAA2E,MAAM,uBAAuB,CAAC;AAC9M,OAAO,EAAE,6BAA6B,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAE,0CAA0C,EAAE,wCAAwC,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAE1J,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AA6BxG,MAAM,UAAU,6CAA6C,CAAgH,OAAuF;IAClQ,MAAM,gBAAgB,GAAG,8BAA8B,EAAkC,CAAC;IAC1F,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,gBAAgB,CAAC,cAAc,CAAC;IACjF,MAAM,YAAY,GAAyE;QACzF,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,cAAc,EAAE,OAAO,CAAC,UAAU,IAAI,gBAAgB,CAAC,UAAU;QACjE,eAAe,EAAE,OAAO,CAAC,WAAW,IAAI,gBAAgB,CAAC,WAAW;QACpE,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,gBAAgB,CAAC,YAAY;QACnE,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,gBAAgB,CAAC,SAAS;QAC1D,mBAAmB,EAAE,CAAC,QAAmB,EAAE,EAAU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;AACxI,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAA4B,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3G,CAAC;AACD,MAAM,UAAU,oCAAoC,CAAC,OAAgC;IAMnF,OAAO;QACL,cAAc,EAAE,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC;QAClD,eAAe,EAAE,8BAA8B,CAAC,OAAO,CAAC,IAAI,SAAS;QACrE,IAAI,EAAE,6BAA6B,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;QAChF,SAAS,EAAE,6BAA6B,CAAC,OAAO,CAAC,IAAI,SAAS;KAC/D,CAAC;AACJ,CAAC","sourcesContent":["import {\n createEditorScenePrefabAgentSummary,\n findEditorSceneModelRenderer,\n readEditorSceneNodeKind,\n} from '../document/helpers';\nimport { enrichEditorSceneDocumentAssets } from '../asset-library/document';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n EditorSceneGameObject,\n} from '../document/types';\nimport { describePlayableEditorAgentObject, describePlayableEditorAgentObjectSet, describePlayableEditorAgentRegionBinding, type PlayableEditorAgentAssetLike, type PlayableEditorAgentGameObjectLike, type PlayableEditorAgentObjectDescriptionServices } from '../local-harness/agent-descriptions';\nimport { readPlayablePlatformAssetKind, readPlayablePlatformAssetPath, readPlayablePlatformRawAssetId, type PlayablePlatformAssetDropPoint, type PlayablePlatformAssetExternal } from '../asset-bridge/index';\nimport { registerPlayablePlatformAsset, registerPlayablePlatformAssetIfNeeded } from '../asset-registration/workflow';\nimport { runPlayableAuthoringCommand, writePlayableAuthoringFile } from '../authoring-client/client';\nimport { createPlayableForgePlayDocumentFingerprint, createPlayableProjectAssetCommandHandler, postPlayableForgePlayEvent } from '../local-harness/index';\nimport type { PlayableLocalEditorHostBridgeContext, PlayableLocalEditorHostHarness } from '../local-harness/host-controller';\nimport { PLAYABLE_FORGE_PLAY_EVENT, readPlayableForgePlayRequestId } from '../local-harness/forge-play';\nimport type { PlayableForgePlaySaveState } from '../local-harness/forge-play-types';\nimport type { PlayableLocalEditorDocumentOperationExecutor } from '../local-harness/types';\n\ntype ProductHarness<TDocument> = PlayableLocalEditorHostHarness & {\n getWorkingDocument(): TDocument | null;\n getDocumentRevision(): number;\n validateOperationSettledForCurrentDocument(phase: 'save' | 'run' | 'export'): Promise<boolean>;\n runExclusiveDocumentOperation<TResult>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>,\n ): Promise<TResult>;\n reloadAssets(): Promise<{ ok: boolean; error?: string; [key: string]: unknown }>;\n};\n\nexport interface FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject extends PlayableEditorAgentGameObjectLike, TAsset extends PlayableEditorAgentAssetLike> {\n domainPrefix: string;\n sceneSource: { save(document: TDocument, options: any): Promise<any>; loadAssets(): Promise<TAsset[]> };\n enrichDocument?(document: TDocument, assets: TAsset[]): TDocument;\n findObject?(document: TDocument, id: string): TGameObject | null;\n findObjects?(document: TDocument, ids: readonly string[]): TGameObject[];\n readNodeKind?(object: TGameObject): string;\n findAsset?(document: TDocument, object: TGameObject): TAsset | null;\n hasModelRenderer?(object: TGameObject): boolean;\n resolveDomainRole?(object: TGameObject): string | null;\n findExistingAsset(payload: Record<string, unknown>): Promise<{ guid?: string; assetId: string; external?: PlayablePlatformAssetExternal } | null>;\n projectDropPoint?(point: PlayablePlatformAssetDropPoint | null): { x: number; y: number; z: number } | null;\n registerCommandName?: string;\n}\n\nexport function createFpsGameEditorProductProjectHostServices<TDocument, TGameObject extends PlayableEditorAgentGameObjectLike, TAsset extends PlayableEditorAgentAssetLike>(options: FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject, TAsset>) {\n const standardServices = createStandardDocumentServices<TDocument, TGameObject, TAsset>();\n const enrichDocument = options.enrichDocument ?? standardServices.enrichDocument;\n const descriptions: PlayableEditorAgentObjectDescriptionServices<TDocument, TGameObject> = {\n domainPrefix: options.domainPrefix,\n findGameObject: options.findObject ?? standardServices.findObject,\n findGameObjects: options.findObjects ?? standardServices.findObjects,\n readNodeKind: options.readNodeKind ?? standardServices.readNodeKind,\n findAsset: options.findAsset ?? standardServices.findAsset,\n createPrefabSummary: (document: TDocument, id: string) => createEditorScenePrefabAgentSummary(document as any, id),\n hasModelRenderer: options.hasModelRenderer ?? standardServices.hasModelRenderer,\n resolveDomainRole: options.resolveDomainRole,\n };\n const findAssetId = async (payload: Record<string, unknown>) => {\n const explicit = readString(payload.projectAssetId);\n if (explicit) return explicit;\n const existing = await options.findExistingAsset(payload);\n if (existing) return existing.assetId;\n throw new Error('project assetId was not found for platform asset');\n };\n const handleCommand = createPlayableProjectAssetCommandHandler<any>({\n normalizePayload: value => value,\n registerAssetIfNeeded: payload => registerPlayablePlatformAssetIfNeeded(payload, { commandName: options.registerCommandName ?? 'npm run asset:register', cwd: '.', findExistingAsset: options.findExistingAsset, writeFile: writePlayableAuthoringFile, runCommand: runPlayableAuthoringCommand }),\n registerAsset: payload => registerPlayablePlatformAsset(payload, { commandName: options.registerCommandName ?? 'npm run asset:register', cwd: '.', findExistingAsset: options.findExistingAsset, writeFile: writePlayableAuthoringFile, runCommand: runPlayableAuthoringCommand }),\n resolveAssetId: findAssetId,\n placement: { projectDropPoint: options.projectDropPoint },\n });\n return {\n hydrateDocumentAssets: enrichDocument,\n agentContext: {\n describeSceneObject: ({ document, objectId }: any) => describePlayableEditorAgentObject(document, objectId, descriptions),\n describeSceneObjectSet: ({ document, objectIds }: any) => describePlayableEditorAgentObjectSet(document, objectIds, descriptions),\n describeRegionBinding: ({ document, objectIds }: any) => describePlayableEditorAgentRegionBinding(document, objectIds, descriptions),\n },\n summarize: (document: any) => `editorScene assets=${document.assets?.length ?? 0}, gameObjects=${document.scene?.gameObjects?.length ?? 0}`,\n handleProjectAssetCommand: (context: PlayableLocalEditorHostBridgeContext<any>) => handleCommand(context),\n async exportDocument(harness: ProductHarness<TDocument>, payload: Record<string, unknown>, saveState: PlayableForgePlaySaveState) {\n return harness.runExclusiveDocumentOperation(async () => {\n const preRefreshAuthoredVersion = harness.getDocumentRevision();\n await assertProductOperationValid(harness, 'export');\n assertProductDocumentRevision(harness, preRefreshAuthoredVersion, 'export');\n const assetRefresh = await harness.reloadAssets();\n if (!assetRefresh.ok) {\n const error = new Error(assetRefresh.error ?? 'asset_freshness_check_failed');\n Object.assign(error, { code: 'asset_freshness_check_failed', details: assetRefresh });\n throw error;\n }\n const expectedAuthoredVersion = harness.getDocumentRevision();\n await assertProductOperationValid(harness, 'export');\n assertProductDocumentRevision(harness, expectedAuthoredVersion, 'export');\n const document = harness.getWorkingDocument() as TDocument | null;\n if (!document) throw new Error('editor_document_unavailable');\n const prepared = await options.sceneSource.save(\n document,\n { mode: 'prepare-platform-save' },\n );\n assertProductDocumentRevision(harness, expectedAuthoredVersion, 'export');\n const sceneJsonText = typeof prepared.sceneJsonText === 'string' && prepared.sceneJsonText.trim()\n ? prepared.sceneJsonText\n : `${JSON.stringify(prepared.compiledArtifact?.data ?? prepared.document, null, 2)}\\n`;\n saveState.preparedRevision += 1;\n saveState.committedRevision = 0;\n postPlayableForgePlayEvent(window, PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_EXPORTED, {\n requestId: readPlayableForgePlayRequestId(payload),\n sceneJsonText,\n ...(typeof prepared.expectedVersion === 'number' ? { expectedVersion: prepared.expectedVersion } : {}),\n });\n return {\n documentFingerprint: createPlayableForgePlayDocumentFingerprint(document),\n };\n });\n },\n };\n}\n\nfunction createStandardDocumentServices<\n TDocument,\n TGameObject extends PlayableEditorAgentGameObjectLike,\n TAsset extends PlayableEditorAgentAssetLike,\n>() {\n const listObjects = (document: TDocument): TGameObject[] => {\n const scene = readRecord(readRecord(document)?.scene);\n return Array.isArray(scene?.gameObjects) ? scene.gameObjects as TGameObject[] : [];\n };\n const readAssetId = (object: TGameObject): string | null => {\n const record = readRecord(object);\n const components = Array.isArray(record?.components) ? record.components : [];\n const renderer = components.find(component => readRecord(component)?.type === 'ModelRenderer');\n const rendererAssetId = readString(readRecord(renderer)?.assetId);\n if (rendererAssetId) return rendererAssetId;\n return readString(readRecord(record?.instance)?.assetId) ?? null;\n };\n return {\n enrichDocument: (document: TDocument, assets: TAsset[]): TDocument => enrichEditorSceneDocumentAssets(\n document as unknown as EditorSceneDocument,\n assets as unknown as EditorSceneAssetLibraryItem[],\n ) as unknown as TDocument,\n findObject: (document: TDocument, id: string): TGameObject | null => (\n listObjects(document).find(entry => entry.id === id) ?? null\n ),\n findObjects: (document: TDocument, ids: readonly string[]): TGameObject[] => {\n const selected = new Set(ids);\n return listObjects(document).filter(entry => selected.has(entry.id));\n },\n readNodeKind: (object: TGameObject): string => readEditorSceneNodeKind(\n object as unknown as EditorSceneGameObject,\n ),\n findAsset: (document: TDocument, object: TGameObject): TAsset | null => {\n const assetId = readAssetId(object);\n if (!assetId) return null;\n const assets = readRecord(document)?.assets;\n if (!Array.isArray(assets)) return null;\n return assets.find((asset) => {\n const record = readRecord(asset);\n return readString(record?.id) === assetId || readString(record?.assetId) === assetId;\n }) as TAsset | undefined ?? null;\n },\n hasModelRenderer: (object: TGameObject): boolean => {\n const record = readRecord(object);\n if (!Array.isArray(record?.components)) return false;\n return !!findEditorSceneModelRenderer(object as unknown as EditorSceneGameObject);\n },\n };\n}\n\nasync function assertProductOperationValid<TDocument>(\n harness: ProductHarness<TDocument>,\n phase: 'save' | 'run' | 'export',\n): Promise<void> {\n if (await harness.validateOperationSettledForCurrentDocument(phase)) return;\n const error = new Error(`${phase}_blocked_by_validation`);\n Object.assign(error, { code: 'editor_validation_failed', details: { phase } });\n throw error;\n}\n\nfunction assertProductDocumentRevision<TDocument>(\n harness: ProductHarness<TDocument>,\n expectedAuthoredVersion: number,\n phase: 'save' | 'run' | 'export',\n): void {\n const receivedAuthoredVersion = harness.getDocumentRevision();\n if (receivedAuthoredVersion === expectedAuthoredVersion) return;\n const error = new Error(`${phase}_canceled_document_changed`);\n Object.assign(error, {\n code: 'editor_validation_failed',\n details: {\n phase,\n expectedDocumentRevision: expectedAuthoredVersion,\n receivedDocumentRevision: receivedAuthoredVersion,\n },\n });\n throw error;\n}\n\nfunction readString(value: unknown): string | undefined { return typeof value === 'string' && value.trim() ? value.trim() : undefined; }\nfunction readRecord(value: unknown): Record<string, any> | null {\n return value && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, any> : null;\n}\nexport function readFpsGameEditorPlatformAssetLookup(payload: Record<string, unknown>): {\n projectAssetId?: string;\n platformAssetId?: string;\n kind: 'texture' | 'model';\n assetPath?: string;\n} {\n return {\n projectAssetId: readString(payload.projectAssetId),\n platformAssetId: readPlayablePlatformRawAssetId(payload) ?? undefined,\n kind: readPlayablePlatformAssetKind(payload) === 'texture' ? 'texture' : 'model',\n assetPath: readPlayablePlatformAssetPath(payload) ?? undefined,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"project-host-services.js","sourceRoot":"","sources":["../../src/product/project-host-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAM5E,OAAO,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,8BAA8B,EAA2E,MAAM,uBAAuB,CAAC;AAC9M,OAAO,EAAE,6BAA6B,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AACtH,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAE,0CAA0C,EAAE,wCAAwC,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAE1J,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAuBxG,MAAM,UAAU,6CAA6C,CAC3D,OAAuF;IAEvF,IAAI,6BAA6B,GAAkB,IAAI,CAAC;IACxD,MAAM,gBAAgB,GAAG,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AC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;QAChF,SAAS,EAAE,6BAA6B,CAAC,OAAO,CAAC,IAAI,SAAS;KAC/D,CAAC;AACJ,CAAC","sourcesContent":["import { enrichEditorSceneDocumentAssets } from '../asset-library/document';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n} from '../document/types';\nimport type { EditorServiceDocumentExportArtifact } from '@fps-games/editor-protocol';\nimport { readPlayablePlatformAssetKind, readPlayablePlatformAssetPath, readPlayablePlatformRawAssetId, type PlayablePlatformAssetDropPoint, type PlayablePlatformAssetExternal } from '../asset-bridge/index';\nimport { registerPlayablePlatformAsset, registerPlayablePlatformAssetIfNeeded } from '../asset-registration/workflow';\nimport { runPlayableAuthoringCommand, writePlayableAuthoringFile } from '../authoring-client/client';\nimport { createPlayableForgePlayDocumentFingerprint, createPlayableProjectAssetCommandHandler, postPlayableForgePlayEvent } from '../local-harness/index';\nimport type { PlayableLocalEditorHostBridgeContext, PlayableLocalEditorHostHarness } from '../local-harness/host-controller';\nimport { PLAYABLE_FORGE_PLAY_EVENT, readPlayableForgePlayRequestId } from '../local-harness/forge-play';\nimport type { PlayableForgePlaySaveState } from '../local-harness/forge-play-types';\nimport type { PlayableLocalEditorDocumentOperationExecutor } from '../local-harness/types';\n\ntype ProductHarness<TDocument> = PlayableLocalEditorHostHarness & {\n getWorkingDocument(): TDocument | null;\n prepareProjectServiceDocumentExport?(): Promise<EditorServiceDocumentExportArtifact<TDocument> | null>;\n getDocumentRevision(): number;\n validateOperationSettledForCurrentDocument(phase: 'save' | 'run' | 'export'): Promise<boolean>;\n runExclusiveDocumentOperation<TResult>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>,\n ): Promise<TResult>;\n reloadAssets(): Promise<{ ok: boolean; error?: string; [key: string]: unknown }>;\n};\n\nexport interface FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject extends { id: string }, TAsset> {\n sceneSource: { save(document: TDocument, options: any): Promise<any>; loadAssets(): Promise<TAsset[]> };\n enrichDocument?(document: TDocument, assets: TAsset[]): TDocument;\n findExistingAsset(payload: Record<string, unknown>): Promise<{ guid?: string; assetId: string; external?: PlayablePlatformAssetExternal } | null>;\n projectDropPoint?(point: PlayablePlatformAssetDropPoint | null): { x: number; y: number; z: number } | null;\n registerCommandName?: string;\n}\n\nexport function createFpsGameEditorProductProjectHostServices<TDocument, TGameObject extends { id: string }, TAsset>(\n options: FpsGameEditorProductProjectHostServicesOptions<TDocument, TGameObject, TAsset>,\n) {\n let authoringSourceRevisionCursor: number | null = null;\n const standardServices = createStandardDocumentServices<TDocument, TAsset>();\n const enrichDocument = options.enrichDocument ?? standardServices.enrichDocument;\n const findAssetId = async (payload: Record<string, unknown>) => {\n const explicit = readString(payload.projectAssetId);\n if (explicit) return explicit;\n const existing = await options.findExistingAsset(payload);\n if (existing) return existing.assetId;\n throw new Error('project assetId was not found for platform asset');\n };\n const handleCommand = createPlayableProjectAssetCommandHandler<any>({\n normalizePayload: value => value,\n registerAssetIfNeeded: payload => registerPlayablePlatformAssetIfNeeded(payload, { commandName: options.registerCommandName ?? 'npm run asset:register', cwd: '.', findExistingAsset: options.findExistingAsset, writeFile: writePlayableAuthoringFile, runCommand: runPlayableAuthoringCommand }),\n registerAsset: payload => registerPlayablePlatformAsset(payload, { commandName: options.registerCommandName ?? 'npm run asset:register', cwd: '.', findExistingAsset: options.findExistingAsset, writeFile: writePlayableAuthoringFile, runCommand: runPlayableAuthoringCommand }),\n resolveAssetId: findAssetId,\n placement: { projectDropPoint: options.projectDropPoint },\n });\n return {\n hydrateDocumentAssets: enrichDocument,\n summarize: (document: any) => `editorScene assets=${document.assets?.length ?? 0}, gameObjects=${document.scene?.gameObjects?.length ?? 0}`,\n handleProjectAssetCommand: (context: PlayableLocalEditorHostBridgeContext<any>) => handleCommand(context),\n async exportDocument(\n harness: ProductHarness<TDocument>,\n payload: Record<string, unknown>,\n saveState: PlayableForgePlaySaveState,\n postEvent: (name: string, payload?: Record<string, unknown>) => void = (name, eventPayload) => {\n postPlayableForgePlayEvent(window, name, eventPayload);\n },\n ) {\n return harness.runExclusiveDocumentOperation(async () => {\n const preRefreshAuthoredVersion = harness.getDocumentRevision();\n await assertProductOperationValid(harness, 'export');\n assertProductDocumentRevision(harness, preRefreshAuthoredVersion, 'export');\n const assetRefresh = await harness.reloadAssets();\n if (!assetRefresh.ok) {\n const error = new Error(assetRefresh.error ?? 'asset_freshness_check_failed');\n Object.assign(error, { code: 'asset_freshness_check_failed', details: assetRefresh });\n throw error;\n }\n const expectedAuthoredVersion = harness.getDocumentRevision();\n await assertProductOperationValid(harness, 'export');\n assertProductDocumentRevision(harness, expectedAuthoredVersion, 'export');\n const document = harness.getWorkingDocument() as TDocument | null;\n if (!document) throw new Error('editor_document_unavailable');\n const servicePrepared = await harness.prepareProjectServiceDocumentExport?.() ?? null;\n const prepared = servicePrepared ?? await prepareProductDocumentExport(\n document,\n options.sceneSource,\n authoringSourceRevisionCursor,\n );\n if (!servicePrepared) {\n const preparedAuthoringRevision = readProductAuthoringSourceRevision(prepared.document);\n if (preparedAuthoringRevision !== null) {\n authoringSourceRevisionCursor = preparedAuthoringRevision;\n }\n }\n assertProductDocumentRevision(harness, expectedAuthoredVersion, 'export');\n const sceneJsonText = typeof prepared.sceneJsonText === 'string' && prepared.sceneJsonText.trim()\n ? prepared.sceneJsonText\n : `${JSON.stringify(prepared.compiledArtifact?.data ?? prepared.document, null, 2)}\\n`;\n saveState.preparedRevision += 1;\n saveState.committedRevision = 0;\n postEvent(PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_EXPORTED, {\n requestId: readPlayableForgePlayRequestId(payload),\n sceneJsonText,\n ...(typeof prepared.expectedVersion === 'number' ? { expectedVersion: prepared.expectedVersion } : {}),\n });\n return {\n documentFingerprint: createPlayableForgePlayDocumentFingerprint(document),\n documentRevision: expectedAuthoredVersion,\n preparedAuthoringSource: {\n document: prepared.document,\n ...(prepared.source ? { source: prepared.source } : {}),\n ...(servicePrepared ? {\n serviceTransactionId: servicePrepared.transactionId,\n serviceDocumentRevision: servicePrepared.documentRevision,\n } : {}),\n },\n ...(typeof prepared.expectedVersion === 'number' ? { expectedVersion: prepared.expectedVersion } : {}),\n };\n });\n },\n };\n}\n\nasync function prepareProductDocumentExport<TDocument>(\n document: TDocument,\n sceneSource: { save(document: TDocument, options: any): Promise<any> },\n authoringSourceRevisionCursor: number | null,\n): Promise<any> {\n const workingAuthoringRevision = readProductAuthoringSourceRevision(document);\n const revisionCursor = authoringSourceRevisionCursor ?? workingAuthoringRevision;\n const outboundDocument = rebaseProductAuthoringSourceRevision(document, revisionCursor);\n return sceneSource.save(\n outboundDocument,\n {\n mode: 'prepare-platform-save',\n ...(revisionCursor === null\n ? {}\n : { expectedAuthoringSourceRevision: revisionCursor }),\n },\n );\n}\n\nfunction readProductAuthoringSourceRevision(value: unknown): number | null {\n const source = readRecord(readRecord(readRecord(value)?.meta)?.authoringSource);\n return typeof source?.revision === 'number' && Number.isFinite(source.revision)\n ? source.revision\n : null;\n}\n\nfunction rebaseProductAuthoringSourceRevision<TDocument>(\n document: TDocument,\n revision: number | null,\n): TDocument {\n const currentRevision = readProductAuthoringSourceRevision(document);\n if (revision === null || currentRevision === null || currentRevision === revision) return document;\n const clone = structuredClone(document) as TDocument;\n const record = readRecord(clone);\n const meta = readRecord(record?.meta);\n const source = readRecord(meta?.authoringSource);\n if (!record || !meta || !source) return document;\n source.revision = revision;\n return clone;\n}\n\nfunction createStandardDocumentServices<\n TDocument,\n TAsset,\n>() {\n return {\n enrichDocument: (document: TDocument, assets: TAsset[]): TDocument => enrichEditorSceneDocumentAssets(\n document as unknown as EditorSceneDocument,\n assets as unknown as EditorSceneAssetLibraryItem[],\n ) as unknown as TDocument,\n };\n}\n\nasync function assertProductOperationValid<TDocument>(\n harness: ProductHarness<TDocument>,\n phase: 'save' | 'run' | 'export',\n): Promise<void> {\n if (await harness.validateOperationSettledForCurrentDocument(phase)) return;\n const error = new Error(`${phase}_blocked_by_validation`);\n Object.assign(error, { code: 'editor_validation_failed', details: { phase } });\n throw error;\n}\n\nfunction assertProductDocumentRevision<TDocument>(\n harness: ProductHarness<TDocument>,\n expectedAuthoredVersion: number,\n phase: 'save' | 'run' | 'export',\n): void {\n const receivedAuthoredVersion = harness.getDocumentRevision();\n if (receivedAuthoredVersion === expectedAuthoredVersion) return;\n const error = new Error(`${phase}_canceled_document_changed`);\n Object.assign(error, {\n code: 'editor_validation_failed',\n details: {\n phase,\n expectedDocumentRevision: expectedAuthoredVersion,\n receivedDocumentRevision: receivedAuthoredVersion,\n },\n });\n throw error;\n}\n\nfunction readString(value: unknown): string | undefined { return typeof value === 'string' && value.trim() ? value.trim() : undefined; }\nfunction readRecord(value: unknown): Record<string, any> | null {\n return value && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, any> : null;\n}\nexport function readFpsGameEditorPlatformAssetLookup(payload: Record<string, unknown>): {\n projectAssetId?: string;\n platformAssetId?: string;\n kind: 'texture' | 'model';\n assetPath?: string;\n} {\n return {\n projectAssetId: readString(payload.projectAssetId),\n platformAssetId: readPlayablePlatformRawAssetId(payload) ?? undefined,\n kind: readPlayablePlatformAssetKind(payload) === 'texture' ? 'texture' : 'model',\n assetPath: readPlayablePlatformAssetPath(payload) ?? undefined,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-session.d.ts","sourceRoot":"","sources":["../../src/product/scene-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,KAAK,EACV,kCAAkC,EACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4CAA4C,EAC5C,KAAK,wCAAwC,EAC9C,MAAM,kCAAkC,CAAC;AAE1C,MAAM,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F,gCAAgC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAyC9E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { addAssetLibraryItemToEditorSceneDocument, } from '../asset-placement/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { default as materialBindingInternals, } from '../material-binding/binding.js';
|
|
3
3
|
import { createEditorScenePrefabBrowserAssetItems, } from '../prefab-stage/index.js';
|
|
4
4
|
import { createPlayableEditorSceneObjectCommandFacade, } from '../session/object-command-facade.js';
|
|
5
5
|
export function createPlayableEditorSceneSessionFacade(input) {
|
|
@@ -24,8 +24,9 @@ export function createPlayableEditorSceneSessionFacade(input) {
|
|
|
24
24
|
canCreateSerializedMultiPropertyPatch: objectCommandFacade.canCreateSerializedMultiPropertyPatch,
|
|
25
25
|
createSerializedMultiPropertyPatch: objectCommandFacade.createSerializedMultiPropertyPatch,
|
|
26
26
|
createBrowserAssetItems(document) {
|
|
27
|
+
const usageIndex = materialBindingInternals.getCachedUsageIndex(document);
|
|
27
28
|
return [
|
|
28
|
-
...
|
|
29
|
+
...materialBindingInternals.createBrowserAssetItems(document, usageIndex),
|
|
29
30
|
...createEditorScenePrefabBrowserAssetItems(document),
|
|
30
31
|
];
|
|
31
32
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-session.js","sourceRoot":"","sources":["../../src/product/scene-session.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,wCAAwC,GACzC,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"scene-session.js","sourceRoot":"","sources":["../../src/product/scene-session.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,wCAAwC,GACzC,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EACL,OAAO,IAAI,wBAAwB,GACpC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,wCAAwC,GACzC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACL,4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C,uBAAuB,CAAC,QAAe,EAAE,UAAU,CAAC;gBAChF,GAAG,wCAAwC,CAAC,QAAe,CAAC;aAC7D,CAAC;QACJ,CAAC;QACD,6BAA6B,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS;YAC1D,MAAM,MAAM,GAAG,wCAAwC,CACrD,QAAQ,EACR,SAAS,EACT,SAAS,EACT,KAAK,CAAC,sBAA6B,CACpC,CAAC;YACF,OAAO;gBACL,QAAQ,EAAE,MAAM,CAAC,QAAqB;gBACtC,UAAU,EAAE,MAAM,CAAC,UAAyB;aAC7C,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n SerializedPropertyPatch,\n EditorTransformSnapshot,\n} from '@fps-games/editor-core';\nimport {\n addAssetLibraryItemToEditorSceneDocument,\n} from '../asset-placement/index';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n EditorSceneGameObject,\n} from '../document/index';\nimport {\n default as materialBindingInternals,\n} from '../material-binding/binding';\nimport {\n createEditorScenePrefabBrowserAssetItems,\n} from '../prefab-stage/index';\nimport type {\n PlayableEditorSceneHierarchyFacade,\n} from '../session/hierarchy-facade';\nimport {\n createPlayableEditorSceneObjectCommandFacade,\n type PlayableEditorSceneObjectCommandServices,\n} from '../session/object-command-facade';\n\nexport interface PlayableEditorSceneSessionFacade<\n TDocument extends EditorSceneDocument,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAssetItem extends EditorSceneAssetLibraryItem,\n> {\n getHierarchyItems: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['getHierarchyItems'];\n normalizeHierarchyDocument: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['normalizeHierarchyDocument'];\n createRenamePatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createRenamePatch'];\n createCreateGroupPatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createCreateGroupPatch'];\n createCreatePrimitivePatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createCreatePrimitivePatch'];\n createDeleteSubtreePatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createDeleteSubtreePatch'];\n collectSubtreeIdList: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['collectSubtreeIdList'];\n validateReparent: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['validateReparent'];\n createReparentPatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createReparentPatch'];\n validateHierarchyMove: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['validateHierarchyMove'];\n createHierarchyMovePatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createHierarchyMovePatch'];\n validateGroupSelection: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['validateGroupSelection'];\n createGroupSelectionPatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createGroupSelectionPatch'];\n createDuplicateSelectionPatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createDuplicateSelectionPatch'];\n createPlacedAssetPatch: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>['createPlacedAssetPatch'];\n applySerializedPropertyPatch(document: TDocument, patch: SerializedPropertyPatch): TDocument;\n canCreateSerializedMultiPropertyPatch: ReturnType<typeof createPlayableEditorSceneObjectCommandFacade<TDocument, TGameObject, TPatch>>['canCreateSerializedMultiPropertyPatch'];\n createSerializedMultiPropertyPatch: ReturnType<typeof createPlayableEditorSceneObjectCommandFacade<TDocument, TGameObject, TPatch>>['createSerializedMultiPropertyPatch'];\n createBrowserAssetItems(document: TDocument): unknown[];\n addAssetLibraryItemToDocument(\n document: TDocument,\n assetItem: TAssetItem,\n placement?: EditorTransformSnapshot,\n ): { document: TDocument; gameObject: TGameObject };\n}\n\nexport interface PlayableEditorSceneSessionFacadeInput<\n TDocument extends EditorSceneDocument,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAssetItem extends EditorSceneAssetLibraryItem,\n> {\n hierarchyFacade: PlayableEditorSceneHierarchyFacade<TDocument, TGameObject, TPatch>;\n objectCommandServices: PlayableEditorSceneObjectCommandServices<TDocument, TGameObject, TPatch>;\n assetPlacementServices: {\n createGameObjectGuid: () => string;\n resolveLocalTransform(input: {\n document: TDocument;\n parentId?: string;\n worldTransform: EditorTransformSnapshot;\n }): unknown;\n };\n}\n\nexport function createPlayableEditorSceneSessionFacade<\n TDocument extends EditorSceneDocument,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAssetItem extends EditorSceneAssetLibraryItem,\n>(\n input: PlayableEditorSceneSessionFacadeInput<TDocument, TGameObject, TPatch, TAssetItem>,\n): PlayableEditorSceneSessionFacade<TDocument, TGameObject, TPatch, TAssetItem> {\n const objectCommandFacade = createPlayableEditorSceneObjectCommandFacade(input.objectCommandServices);\n return {\n getHierarchyItems: input.hierarchyFacade.getHierarchyItems,\n normalizeHierarchyDocument: input.hierarchyFacade.normalizeHierarchyDocument,\n createRenamePatch: input.hierarchyFacade.createRenamePatch,\n createCreateGroupPatch: input.hierarchyFacade.createCreateGroupPatch,\n createCreatePrimitivePatch: input.hierarchyFacade.createCreatePrimitivePatch,\n createDeleteSubtreePatch: input.hierarchyFacade.createDeleteSubtreePatch,\n collectSubtreeIdList: input.hierarchyFacade.collectSubtreeIdList,\n validateReparent: input.hierarchyFacade.validateReparent,\n createReparentPatch: input.hierarchyFacade.createReparentPatch,\n validateHierarchyMove: input.hierarchyFacade.validateHierarchyMove,\n createHierarchyMovePatch: input.hierarchyFacade.createHierarchyMovePatch,\n validateGroupSelection: input.hierarchyFacade.validateGroupSelection,\n createGroupSelectionPatch: input.hierarchyFacade.createGroupSelectionPatch,\n createDuplicateSelectionPatch: input.hierarchyFacade.createDuplicateSelectionPatch,\n createPlacedAssetPatch: input.hierarchyFacade.createPlacedAssetPatch,\n applySerializedPropertyPatch: objectCommandFacade.applySerializedPropertyPatch,\n canCreateSerializedMultiPropertyPatch: objectCommandFacade.canCreateSerializedMultiPropertyPatch,\n createSerializedMultiPropertyPatch: objectCommandFacade.createSerializedMultiPropertyPatch,\n createBrowserAssetItems(document) {\n const usageIndex = materialBindingInternals.getCachedUsageIndex(document as any);\n return [\n ...materialBindingInternals.createBrowserAssetItems(document as any, usageIndex),\n ...createEditorScenePrefabBrowserAssetItems(document as any),\n ];\n },\n addAssetLibraryItemToDocument(document, assetItem, placement) {\n const result = addAssetLibraryItemToEditorSceneDocument(\n document,\n assetItem,\n placement,\n input.assetPlacementServices as any,\n );\n return {\n document: result.document as TDocument,\n gameObject: result.gameObject as TGameObject,\n };\n },\n };\n}\n"]}
|
package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EditorAuthoringHost } from '@fps-games/editor-core';
|
|
2
|
+
import type { EditorSceneAssetLibraryItem, EditorSceneDocument, EditorSceneGameObject } from '../document/index';
|
|
3
|
+
import type { FpsGameEditorStandardSceneAssembly } from './standard-scene-assembly';
|
|
4
|
+
export interface FpsGameEditorStandardAuthoringCommandOptions<TDocument extends EditorSceneDocument<TGameObject>, TGameObject extends EditorSceneGameObject, TPatch, TAssetItem extends EditorSceneAssetLibraryItem> {
|
|
5
|
+
host: EditorAuthoringHost<TDocument, TPatch>;
|
|
6
|
+
sceneAssembly: Pick<FpsGameEditorStandardSceneAssembly<TDocument, TGameObject, TPatch, TAssetItem, any>, 'getHierarchyItems' | 'createCreatePrimitivePatch' | 'createDeleteSubtreePatch' | 'patchGameObjectField' | 'addAssetLibraryItemToDocument'>;
|
|
7
|
+
listAssets(): readonly TAssetItem[] | Promise<readonly TAssetItem[]>;
|
|
8
|
+
}
|
|
9
|
+
export declare function registerFpsGameEditorStandardAuthoringCommands<TDocument extends EditorSceneDocument<TGameObject>, TGameObject extends EditorSceneGameObject, TPatch, TAssetItem extends EditorSceneAssetLibraryItem>(options: FpsGameEditorStandardAuthoringCommandOptions<TDocument, TGameObject, TPatch, TAssetItem>): () => void;
|
|
10
|
+
//# sourceMappingURL=standard-authoring-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-authoring-commands.d.ts","sourceRoot":"","sources":["../../src/product/standard-authoring-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAWlE,OAAO,KAAK,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjH,OAAO,KAAK,EACV,kCAAkC,EACnC,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,4CAA4C,CAC3D,SAAS,SAAS,mBAAmB,CAAC,WAAW,CAAC,EAClD,WAAW,SAAS,qBAAqB,EACzC,MAAM,EACN,UAAU,SAAS,2BAA2B;IAE9C,IAAI,EAAE,mBAAmB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7C,aAAa,EAAE,IAAI,CACjB,kCAAkC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,EACnF,mBAAmB,GAAG,4BAA4B,GAAG,0BAA0B,GAC7E,sBAAsB,GAAG,+BAA+B,CAC3D,CAAC;IACF,UAAU,IAAI,SAAS,UAAU,EAAE,GAAG,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;CACtE;AAED,wBAAgB,8CAA8C,CAC5D,SAAS,SAAS,mBAAmB,CAAC,WAAW,CAAC,EAClD,WAAW,SAAS,qBAAqB,EACzC,MAAM,EACN,UAAU,SAAS,2BAA2B,EAC9C,OAAO,EAAE,4CAA4C,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,GAAG,MAAM,IAAI,CAyK/G"}
|