@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +44 -44
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1721 -367
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +1 -1
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +1 -1
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -2
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +1 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +6 -6
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +23 -23
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-product-local-editor.js","sourceRoot":"","sources":["../src/playable-product-local-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,GAErC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kCAAkC,GAGnC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,8CAA8C,EAAE,MAAM,oCAAoC,CAAC;AAEpG,OAAO,EACL,0CAA0C,EAC1C,yCAAyC,EACzC,yCAAyC,GAE1C,MAAM,4CAA4C,CAAC;AAMpD,MAAM,yCAAyC,GAAG,CAAC,CAAC;AAKpD,MAAM,+BAA+B,GAAG,IAAI,OAAO,EAGhD,CAAC;AAyEJ,MAAM,CAAC,KAAK,UAAU,yDAAyD,CAK7E,OAA2F;IAE3F,MAAM,EAAE,YAAY,EAA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,CAAC,sBAAsB,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC;IACrF,CAAC;AACH,CAAC;AAED,SAAS,yBAAyB,CAAC,MAA0B,EAAE,OAAe;IAC5E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["import {\n createPlayablePlatformAssetDropCache,\n type FpsGameEditorProjectDefinition,\n} from '@fps-games/editor-playable-sdk';\nimport {\n createFpsGameEditorLocalEditorHost,\n type FpsGameEditorLocalEditorHostOptions,\n type PlayableLocalEditorHost,\n} from './playable-local-editor-host.js';\nimport type { FpsEditorPluginHost } from '@fps-games/editor-core/plugin-host';\nimport { createFpsEditorPluginHostFromEnvironmentModule } from '@fps-games/editor-core/plugin-host';\nimport type { FpsDiagnostic, FpsPluginEnvironmentModule } from '@fps-games/plugin-api';\nimport {\n releaseFpsGameEditorDeferredProductCleanup,\n retainFpsGameEditorDeferredProductCleanup,\n retryFpsGameEditorDeferredProductCleanups,\n type FpsGameEditorDeferredProductCleanup,\n} from './internal/product-local-editor-cleanup.js';\nimport type {\n FpsGameEditorProjectModeContext,\n FpsGameEditorProjectModeTransitions,\n} from './playable-project-mode.js';\n\nconst MAX_DEFERRED_EDITOR_HOST_CLEANUP_ATTEMPTS = 6;\n\ntype FpsGameEditorProductOwnedCleanupHook = (\n disposeLocalSwitcher: () => Promise<void>,\n) => Promise<void>;\nconst productOwnedCleanupByPluginHost = new WeakMap<\n FpsEditorPluginHost,\n FpsGameEditorProductOwnedCleanupHook\n>();\n\nexport interface FpsGameEditorProductWindowLike {\n parent?: unknown;\n document?: Pick<Document, 'getElementById'>;\n location: Pick<Location, 'reload'>;\n setTimeout(handler: () => void, timeout?: number): unknown;\n}\n\nexport interface FpsGameEditorProductLocalEditorContext<TDocument> {\n getHost(): PlayableLocalEditorHost<TDocument> | null;\n rememberPlatformAssetDrop(payload: Record<string, unknown>): void;\n normalizeLoadedPlatformAssetPayload(payload: Record<string, unknown>): Record<string, unknown>;\n getCanvas(): HTMLCanvasElement | null;\n}\n\ntype FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset> =\n FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset>;\n\nexport type FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset = unknown> = Omit<\n FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset>,\n 'project' | 'root' | 'compatibilityTag' | 'agentBridgeSessionMetadata'\n | 'pluginHost' | 'persistenceAdapter' | 'worldAdapter'\n> & {\n persistenceAdapter: Omit<\n FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset>['persistenceAdapter'],\n 'runGame'\n >;\n worldAdapter: Omit<\n FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset>['worldAdapter'],\n 'disposeWorld' | 'disposeGameWorld' | 'getCanvas'\n >;\n};\n\n/** Mode intentions required by the product Local Editor assembly. */\nexport type FpsGameEditorProductProjectModeTransitions =\n Pick<FpsGameEditorProjectModeTransitions, 'enterEditorMode'>\n & Partial<Pick<FpsGameEditorProjectModeTransitions, 'enterPlayMode'>>;\n\nexport interface FpsGameEditorProductLocalEditorOptions<TDocument, TPatch, TAsset = unknown> {\n project: Pick<FpsGameEditorProjectDefinition, 'projectId' | 'projectName'>;\n root?: HTMLElement;\n compatibilityTag?: string;\n agentBridgeSessionMetadata?: Record<string, unknown>;\n pluginHost?: FpsEditorPluginHost;\n window?: FpsGameEditorProductWindowLike;\n canvasId?: string;\n projectMode: FpsGameEditorProductProjectModeTransitions;\n getCanvas?: () => HTMLCanvasElement | null;\n setAssetBridgeActive?: (active: boolean) => void;\n hostAssembly: {\n createHostOptions: (\n context: FpsGameEditorProductLocalEditorContext<TDocument>,\n ) => FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>;\n };\n}\n\nexport interface FpsGameEditorProductLocalEditorModeSwitcher<TDocument = unknown> {\n enterEditor(): Promise<void>;\n discardAndRunGame(): Promise<void>;\n dispose(): Promise<void>;\n getHost(): PlayableLocalEditorHost<TDocument> | null;\n}\n\nexport type FpsGameEditorProductLocalEditorEnvironmentModuleOptions<\n TDocument,\n TPatch,\n TAsset = unknown,\n> = Omit<FpsGameEditorProductLocalEditorOptions<TDocument, TPatch, TAsset>, 'pluginHost'> & {\n pluginModule: FpsPluginEnvironmentModule;\n reportPluginDiagnostic?: (diagnostic: FpsDiagnostic) => void;\n};\n\nexport async function mountFpsGameEditorProductLocalEditorFromEnvironmentModule<\n TDocument,\n TPatch,\n TAsset = unknown,\n>(\n options: FpsGameEditorProductLocalEditorEnvironmentModuleOptions<TDocument, TPatch, TAsset>,\n): Promise<FpsGameEditorProductLocalEditorModeSwitcher<TDocument>> {\n const { pluginModule, reportPluginDiagnostic, ...mountOptions } = options;\n const deferredCleanupErrors = await retryFpsGameEditorDeferredProductCleanups();\n throwProductCleanupErrors(\n [...deferredCleanupErrors],\n 'Deferred Local Editor cleanup must complete before replacement mount',\n );\n const pluginHost = createFpsEditorPluginHostFromEnvironmentModule({\n module: pluginModule,\n report: reportPluginDiagnostic ?? reportProductPluginDiagnostic,\n });\n try {\n await pluginHost.start();\n } catch (error) {\n throw await rollbackOwnedProductPluginHost(pluginHost, error, 'Editor Plugin Host startup failed');\n }\n\n let switcher!: FpsGameEditorProductLocalEditorModeSwitcher<TDocument>;\n let switcherDisposed = false;\n let pluginHostDisposed = false;\n let disposal: Promise<void> | null = null;\n\n const disposeOwnedResources = (\n disposeSwitcher: () => Promise<void> = () => switcher.dispose(),\n ): Promise<void> => {\n if (disposal) return disposal;\n const pending = (async () => {\n const errors: unknown[] = [];\n if (!switcherDisposed) {\n try {\n await disposeSwitcher();\n switcherDisposed = true;\n } catch (error) {\n errors.push(error);\n }\n }\n if (!pluginHostDisposed) {\n try {\n await pluginHost.dispose();\n pluginHostDisposed = true;\n } catch (error) {\n errors.push(error);\n }\n }\n throwProductCleanupErrors(errors, 'Configured Local Editor cleanup failed');\n productOwnedCleanupByPluginHost.delete(pluginHost);\n })();\n disposal = pending;\n void pending.catch(() => {\n if (disposal === pending) disposal = null;\n });\n return pending;\n };\n\n productOwnedCleanupByPluginHost.set(pluginHost, disposeOwnedResources);\n try {\n switcher = mountFpsGameEditorProductLocalEditor({ ...mountOptions, pluginHost });\n } catch (error) {\n productOwnedCleanupByPluginHost.delete(pluginHost);\n throw await rollbackOwnedProductPluginHost(pluginHost, error, 'Local Editor mount failed');\n }\n\n return {\n enterEditor: () => switcher.enterEditor(),\n discardAndRunGame: () => switcher.discardAndRunGame(),\n getHost: () => switcher.getHost(),\n dispose: () => disposeOwnedResources(),\n };\n}\n\nfunction reportProductPluginDiagnostic(diagnostic: FpsDiagnostic): void {\n const method = diagnostic.severity === 'error'\n ? 'error'\n : diagnostic.severity === 'warning'\n ? 'warn'\n : 'info';\n console[method](`[Plugin:${diagnostic.pluginId ?? 'host'}] ${diagnostic.code}: ${diagnostic.message}`);\n}\n\nexport function mountFpsGameEditorProductLocalEditor<TDocument, TPatch, TAsset = unknown>(\n options: FpsGameEditorProductLocalEditorOptions<TDocument, TPatch, TAsset>,\n): FpsGameEditorProductLocalEditorModeSwitcher<TDocument> {\n const runtimeWindow = options.window ?? globalThis.window as unknown as FpsGameEditorProductWindowLike;\n const platformAssetDropCache = createPlayablePlatformAssetDropCache();\n let editorHost: PlayableLocalEditorHost<TDocument> | null = null;\n let disposed = false;\n let disposal: Promise<void> | null = null;\n let cleanupAfterPlayModeEntryScheduled = false;\n let cleanupAfterPlayModeEntryAttempt = 0;\n const ownedCleanup = options.pluginHost\n ? productOwnedCleanupByPluginHost.get(options.pluginHost)\n : undefined;\n\n const disposeEditorHost = async (\n disposeOptions: { preserveAssetBridgeActive?: boolean } = {},\n ): Promise<void> => {\n if (disposed) return;\n if (disposal) return disposal;\n const host = editorHost;\n const pending = (async () => {\n await host?.dispose();\n if (editorHost === host) editorHost = null;\n if (!disposeOptions.preserveAssetBridgeActive) options.setAssetBridgeActive?.(false);\n disposed = true;\n })();\n disposal = pending;\n try {\n await pending;\n } finally {\n if (disposal === pending) disposal = null;\n }\n };\n\n const retryRetainedEditorHostCleanup = async (): Promise<void> => {\n await disposeAfterPlayModeEntry();\n };\n\n const retainEditorHostCleanup = (): void => {\n retainFpsGameEditorDeferredProductCleanup(retryRetainedEditorHostCleanup);\n };\n\n const disposeLocalSwitcher = async (\n preserveAssetBridgeActive: boolean,\n releaseRetainedCleanup = true,\n ): Promise<void> => {\n await disposeEditorHost({ preserveAssetBridgeActive });\n if (releaseRetainedCleanup) {\n releaseFpsGameEditorDeferredProductCleanup(retryRetainedEditorHostCleanup);\n await retryFpsGameEditorDeferredProductCleanups();\n }\n };\n\n const disposeAfterPlayModeEntry = async (): Promise<void> => {\n if (ownedCleanup) {\n await ownedCleanup(() => disposeLocalSwitcher(true, false));\n releaseFpsGameEditorDeferredProductCleanup(retryRetainedEditorHostCleanup);\n await retryFpsGameEditorDeferredProductCleanups();\n return;\n }\n await disposeLocalSwitcher(true);\n };\n\n const scheduleEditorHostCleanupAfterPlayModeEntry = (): void => {\n retainEditorHostCleanup();\n if (cleanupAfterPlayModeEntryScheduled) return;\n cleanupAfterPlayModeEntryScheduled = true;\n const scheduleAttempt = (delay: number): void => {\n runtimeWindow.setTimeout(() => {\n cleanupAfterPlayModeEntryAttempt += 1;\n void disposeAfterPlayModeEntry().catch(error => {\n console.error(\n `[FpsGameEditor] scheduled editor host cleanup after Play mode entry attempt ${cleanupAfterPlayModeEntryAttempt} failed`,\n error,\n );\n if (cleanupAfterPlayModeEntryAttempt >= MAX_DEFERRED_EDITOR_HOST_CLEANUP_ATTEMPTS) {\n cleanupAfterPlayModeEntryScheduled = false;\n console.error(\n `[FpsGameEditor] scheduled editor host cleanup paused after ${MAX_DEFERRED_EDITOR_HOST_CLEANUP_ATTEMPTS} attempts; retaining ownership for the next mount or shutdown retry`,\n );\n return;\n }\n const retryDelay = Math.min(1000, 50 * (2 ** Math.min(cleanupAfterPlayModeEntryAttempt - 1, 5)));\n scheduleAttempt(retryDelay);\n });\n }, delay);\n };\n scheduleAttempt(0);\n };\n\n const enterPlayMode = async (context?: FpsGameEditorProjectModeContext): Promise<void> => {\n retainEditorHostCleanup();\n try {\n if (options.projectMode.enterPlayMode) await options.projectMode.enterPlayMode(context);\n else runtimeWindow.location.reload();\n }\n finally { scheduleEditorHostCleanupAfterPlayModeEntry(); }\n };\n\n const enterEditorMode = async (): Promise<void> => {\n await options.projectMode.enterEditorMode({ reason: 'editor-entry' });\n };\n\n const getCanvas = (): HTMLCanvasElement | null => {\n const providedCanvas = options.getCanvas?.();\n if (providedCanvas) return providedCanvas;\n const canvas = runtimeWindow.document?.getElementById?.(options.canvasId ?? 'renderCanvas');\n return canvas instanceof HTMLCanvasElement ? canvas : null;\n };\n\n const context: FpsGameEditorProductLocalEditorContext<TDocument> = {\n getHost: () => editorHost,\n rememberPlatformAssetDrop(payload) {\n platformAssetDropCache.remember(payload);\n },\n normalizeLoadedPlatformAssetPayload(payload) {\n return platformAssetDropCache.normalize(payload);\n },\n getCanvas,\n };\n\n const hostOptions = options.hostAssembly.createHostOptions(context);\n void retryFpsGameEditorDeferredProductCleanups();\n let createdHost: ReturnType<typeof createFpsGameEditorLocalEditorHost<TDocument, TPatch, TAsset>>;\n try {\n options.setAssetBridgeActive?.(true);\n createdHost = createFpsGameEditorLocalEditorHost<TDocument, TPatch, TAsset>({\n ...hostOptions,\n persistenceAdapter: {\n ...hostOptions.persistenceAdapter,\n runGame: enterPlayMode,\n },\n worldAdapter: {\n ...hostOptions.worldAdapter,\n disposeWorld: enterEditorMode,\n getCanvas,\n },\n project: options.project,\n compatibilityTag: options.compatibilityTag,\n root: options.root,\n agentBridgeSessionMetadata: options.agentBridgeSessionMetadata,\n pluginHost: options.pluginHost,\n });\n } catch (error) {\n try {\n options.setAssetBridgeActive?.(false);\n } catch (cleanupError) {\n const retryAssetBridgeCleanup: FpsGameEditorDeferredProductCleanup = async () => {\n options.setAssetBridgeActive?.(false);\n releaseFpsGameEditorDeferredProductCleanup(retryAssetBridgeCleanup);\n };\n retainFpsGameEditorDeferredProductCleanup(retryAssetBridgeCleanup);\n throw Object.assign(new Error('Local Editor mount and asset bridge rollback failed'), {\n errors: [error, cleanupError],\n });\n }\n throw error;\n }\n editorHost = createdHost.host;\n\n return {\n async enterEditor() {\n await editorHost?.enterEditor();\n },\n async discardAndRunGame() {\n await editorHost?.discardAndRunGame();\n },\n async dispose() {\n await disposeLocalSwitcher(false);\n },\n getHost() {\n return editorHost;\n },\n };\n}\n\nasync function rollbackOwnedProductPluginHost(\n pluginHost: FpsEditorPluginHost,\n primaryError: unknown,\n message: string,\n): Promise<unknown> {\n try {\n await pluginHost.dispose();\n return primaryError;\n } catch (cleanupError) {\n const retryPluginHostCleanup: FpsGameEditorDeferredProductCleanup = async () => {\n await pluginHost.dispose();\n releaseFpsGameEditorDeferredProductCleanup(retryPluginHostCleanup);\n };\n retainFpsGameEditorDeferredProductCleanup(retryPluginHostCleanup);\n return Object.assign(new Error(message), { errors: [primaryError, cleanupError] });\n }\n}\n\nfunction throwProductCleanupErrors(errors: readonly unknown[], message: string): void {\n if (errors.length === 1) throw errors[0];\n if (errors.length > 1) throw Object.assign(new Error(message), { errors: [...errors] });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"playable-product-local-editor.js","sourceRoot":"","sources":["../src/playable-product-local-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,GAErC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kCAAkC,GA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ACrB,OAAe;IAEf,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAAC,OAAO,YAAY,EAAE,CAAC;QACtB,MAAM,sBAAsB,GAAwC,KAAK,IAAI,EAAE;YAC7E,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;YAC3B,0CAA0C,CAAC,sBAAsB,CAAC,CAAC;QACrE,CAAC,CAAC;QACF,yCAAyC,CAAC,sBAAsB,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC;IACrF,CAAC;AACH,CAAC;AAED,SAAS,yBAAyB,CAAC,MAA0B,EAAE,OAAe;IAC5E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["import {\n createPlayablePlatformAssetDropCache,\n type FpsGameEditorProjectDefinition,\n} from '@fps-games/editor-playable-sdk';\nimport {\n createFpsGameEditorLocalEditorHost,\n type FpsGameEditorLocalEditorHostOptions,\n type PlayableLocalEditorHost,\n} from './playable-local-editor-host.js';\nimport type { FpsEditorPluginHost } from '@fps-games/editor-core/plugin-host';\nimport { createFpsEditorPluginHostFromEnvironmentModule } from '@fps-games/editor-core/plugin-host';\nimport type { FpsDiagnostic, FpsPluginEnvironmentModule } from '@fps-games/plugin-api';\nimport {\n releaseFpsGameEditorDeferredProductCleanup,\n retainFpsGameEditorDeferredProductCleanup,\n retryFpsGameEditorDeferredProductCleanups,\n type FpsGameEditorDeferredProductCleanup,\n} from './internal/product-local-editor-cleanup.js';\nimport type {\n FpsGameEditorProjectModeContext,\n FpsGameEditorProjectModeTransitions,\n} from './playable-project-mode.js';\n\nconst MAX_DEFERRED_EDITOR_HOST_CLEANUP_ATTEMPTS = 6;\n\ntype FpsGameEditorProductOwnedCleanupHook = (\n disposeLocalSwitcher: () => Promise<void>,\n) => Promise<void>;\nconst productOwnedCleanupByPluginHost = new WeakMap<\n FpsEditorPluginHost,\n FpsGameEditorProductOwnedCleanupHook\n>();\n\nexport interface FpsGameEditorProductWindowLike {\n parent?: unknown;\n document?: Pick<Document, 'getElementById'>;\n location: Pick<Location, 'reload'>;\n setTimeout(handler: () => void, timeout?: number): unknown;\n}\n\nexport interface FpsGameEditorProductLocalEditorContext<TDocument> {\n getHost(): PlayableLocalEditorHost<TDocument> | null;\n rememberPlatformAssetDrop(payload: Record<string, unknown>): void;\n normalizeLoadedPlatformAssetPayload(payload: Record<string, unknown>): Record<string, unknown>;\n getCanvas(): HTMLCanvasElement | null;\n}\n\ntype FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset> =\n FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset>;\n\nexport type FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset = unknown> = Omit<\n FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset>,\n 'project' | 'root' | 'compatibilityTag'\n | 'pluginHost' | 'persistenceAdapter' | 'worldAdapter'\n> & {\n persistenceAdapter: Omit<\n FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset>['persistenceAdapter'],\n 'runGame'\n >;\n worldAdapter: Omit<\n FpsGameEditorProductBaseHostOptions<TDocument, TPatch, TAsset>['worldAdapter'],\n 'disposeWorld' | 'disposeGameWorld' | 'getCanvas'\n >;\n};\n\n/** Mode intentions required by the product Local Editor assembly. */\nexport type FpsGameEditorProductProjectModeTransitions =\n Pick<FpsGameEditorProjectModeTransitions, 'enterEditorMode'>\n & Partial<Pick<FpsGameEditorProjectModeTransitions, 'enterPlayMode'>>;\n\nexport interface FpsGameEditorProductLocalEditorOptions<TDocument, TPatch, TAsset = unknown> {\n project: Pick<FpsGameEditorProjectDefinition, 'projectId' | 'projectName'>;\n root?: HTMLElement;\n compatibilityTag?: string;\n pluginHost?: FpsEditorPluginHost;\n window?: FpsGameEditorProductWindowLike;\n canvasId?: string;\n projectMode: FpsGameEditorProductProjectModeTransitions;\n getCanvas?: () => HTMLCanvasElement | null;\n setAssetBridgeActive?: (active: boolean) => void;\n hostAssembly: {\n createHostOptions: (\n context: FpsGameEditorProductLocalEditorContext<TDocument>,\n ) => FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>;\n };\n}\n\nexport interface FpsGameEditorProductLocalEditorModeSwitcher<TDocument = unknown> {\n enterEditor(): Promise<void>;\n discardAndRunGame(): Promise<void>;\n dispose(): Promise<void>;\n getHost(): PlayableLocalEditorHost<TDocument> | null;\n}\n\nexport type FpsGameEditorProductLocalEditorEnvironmentModuleOptions<\n TDocument,\n TPatch,\n TAsset = unknown,\n> = Omit<FpsGameEditorProductLocalEditorOptions<TDocument, TPatch, TAsset>, 'pluginHost'> & {\n pluginModule: FpsPluginEnvironmentModule;\n reportPluginDiagnostic?: (diagnostic: FpsDiagnostic) => void;\n};\n\nexport async function mountFpsGameEditorProductLocalEditorFromEnvironmentModule<\n TDocument,\n TPatch,\n TAsset = unknown,\n>(\n options: FpsGameEditorProductLocalEditorEnvironmentModuleOptions<TDocument, TPatch, TAsset>,\n): Promise<FpsGameEditorProductLocalEditorModeSwitcher<TDocument>> {\n const { pluginModule, reportPluginDiagnostic, ...mountOptions } = options;\n const deferredCleanupErrors = await retryFpsGameEditorDeferredProductCleanups();\n throwProductCleanupErrors(\n [...deferredCleanupErrors],\n 'Deferred Local Editor cleanup must complete before replacement mount',\n );\n const pluginHost = createFpsEditorPluginHostFromEnvironmentModule({\n module: pluginModule,\n report: reportPluginDiagnostic ?? reportProductPluginDiagnostic,\n });\n try {\n await pluginHost.start();\n } catch (error) {\n throw await rollbackOwnedProductPluginHost(pluginHost, error, 'Editor Plugin Host startup failed');\n }\n\n let switcher!: FpsGameEditorProductLocalEditorModeSwitcher<TDocument>;\n let switcherDisposed = false;\n let pluginHostDisposed = false;\n let disposal: Promise<void> | null = null;\n\n const disposeOwnedResources = (\n disposeSwitcher: () => Promise<void> = () => switcher.dispose(),\n ): Promise<void> => {\n if (disposal) return disposal;\n const pending = (async () => {\n const errors: unknown[] = [];\n if (!switcherDisposed) {\n try {\n await disposeSwitcher();\n switcherDisposed = true;\n } catch (error) {\n errors.push(error);\n }\n }\n if (!pluginHostDisposed) {\n try {\n await pluginHost.dispose();\n pluginHostDisposed = true;\n } catch (error) {\n errors.push(error);\n }\n }\n throwProductCleanupErrors(errors, 'Configured Local Editor cleanup failed');\n productOwnedCleanupByPluginHost.delete(pluginHost);\n })();\n disposal = pending;\n void pending.catch(() => {\n if (disposal === pending) disposal = null;\n });\n return pending;\n };\n\n productOwnedCleanupByPluginHost.set(pluginHost, disposeOwnedResources);\n try {\n switcher = mountFpsGameEditorProductLocalEditor({ ...mountOptions, pluginHost });\n } catch (error) {\n productOwnedCleanupByPluginHost.delete(pluginHost);\n throw await rollbackOwnedProductPluginHost(pluginHost, error, 'Local Editor mount failed');\n }\n\n return {\n enterEditor: () => switcher.enterEditor(),\n discardAndRunGame: () => switcher.discardAndRunGame(),\n getHost: () => switcher.getHost(),\n dispose: () => disposeOwnedResources(),\n };\n}\n\nfunction reportProductPluginDiagnostic(diagnostic: FpsDiagnostic): void {\n const method = diagnostic.severity === 'error'\n ? 'error'\n : diagnostic.severity === 'warning'\n ? 'warn'\n : 'info';\n console[method](`[Plugin:${diagnostic.pluginId ?? 'host'}] ${diagnostic.code}: ${diagnostic.message}`);\n}\n\nexport function mountFpsGameEditorProductLocalEditor<TDocument, TPatch, TAsset = unknown>(\n options: FpsGameEditorProductLocalEditorOptions<TDocument, TPatch, TAsset>,\n): FpsGameEditorProductLocalEditorModeSwitcher<TDocument> {\n const runtimeWindow = options.window ?? globalThis.window as unknown as FpsGameEditorProductWindowLike;\n const platformAssetDropCache = createPlayablePlatformAssetDropCache();\n let editorHost: PlayableLocalEditorHost<TDocument> | null = null;\n let disposed = false;\n let disposal: Promise<void> | null = null;\n let cleanupAfterPlayModeEntryScheduled = false;\n let cleanupAfterPlayModeEntryAttempt = 0;\n const ownedCleanup = options.pluginHost\n ? productOwnedCleanupByPluginHost.get(options.pluginHost)\n : undefined;\n\n const disposeEditorHost = async (\n disposeOptions: { preserveAssetBridgeActive?: boolean } = {},\n ): Promise<void> => {\n if (disposed) return;\n if (disposal) return disposal;\n const host = editorHost;\n const pending = (async () => {\n await host?.dispose();\n if (editorHost === host) editorHost = null;\n if (!disposeOptions.preserveAssetBridgeActive) options.setAssetBridgeActive?.(false);\n disposed = true;\n })();\n disposal = pending;\n try {\n await pending;\n } finally {\n if (disposal === pending) disposal = null;\n }\n };\n\n const retryRetainedEditorHostCleanup = async (): Promise<void> => {\n await disposeAfterPlayModeEntry();\n };\n\n const retainEditorHostCleanup = (): void => {\n retainFpsGameEditorDeferredProductCleanup(retryRetainedEditorHostCleanup);\n };\n\n const disposeLocalSwitcher = async (\n preserveAssetBridgeActive: boolean,\n releaseRetainedCleanup = true,\n ): Promise<void> => {\n await disposeEditorHost({ preserveAssetBridgeActive });\n if (releaseRetainedCleanup) {\n releaseFpsGameEditorDeferredProductCleanup(retryRetainedEditorHostCleanup);\n await retryFpsGameEditorDeferredProductCleanups();\n }\n };\n\n const disposeAfterPlayModeEntry = async (): Promise<void> => {\n if (ownedCleanup) {\n await ownedCleanup(() => disposeLocalSwitcher(true, false));\n releaseFpsGameEditorDeferredProductCleanup(retryRetainedEditorHostCleanup);\n await retryFpsGameEditorDeferredProductCleanups();\n return;\n }\n await disposeLocalSwitcher(true);\n };\n\n const scheduleEditorHostCleanupAfterPlayModeEntry = (): void => {\n retainEditorHostCleanup();\n if (cleanupAfterPlayModeEntryScheduled) return;\n cleanupAfterPlayModeEntryScheduled = true;\n const scheduleAttempt = (delay: number): void => {\n runtimeWindow.setTimeout(() => {\n cleanupAfterPlayModeEntryAttempt += 1;\n void disposeAfterPlayModeEntry().catch(error => {\n console.error(\n `[FpsGameEditor] scheduled editor host cleanup after Play mode entry attempt ${cleanupAfterPlayModeEntryAttempt} failed`,\n error,\n );\n if (cleanupAfterPlayModeEntryAttempt >= MAX_DEFERRED_EDITOR_HOST_CLEANUP_ATTEMPTS) {\n cleanupAfterPlayModeEntryScheduled = false;\n console.error(\n `[FpsGameEditor] scheduled editor host cleanup paused after ${MAX_DEFERRED_EDITOR_HOST_CLEANUP_ATTEMPTS} attempts; retaining ownership for the next mount or shutdown retry`,\n );\n return;\n }\n const retryDelay = Math.min(1000, 50 * (2 ** Math.min(cleanupAfterPlayModeEntryAttempt - 1, 5)));\n scheduleAttempt(retryDelay);\n });\n }, delay);\n };\n scheduleAttempt(0);\n };\n\n const enterPlayMode = async (context?: FpsGameEditorProjectModeContext): Promise<void> => {\n retainEditorHostCleanup();\n try {\n if (options.projectMode.enterPlayMode) await options.projectMode.enterPlayMode(context);\n else runtimeWindow.location.reload();\n }\n finally { scheduleEditorHostCleanupAfterPlayModeEntry(); }\n };\n\n const enterEditorMode = async (): Promise<void> => {\n await options.projectMode.enterEditorMode({ reason: 'editor-entry' });\n };\n\n const getCanvas = (): HTMLCanvasElement | null => {\n const providedCanvas = options.getCanvas?.();\n if (providedCanvas) return providedCanvas;\n const canvas = runtimeWindow.document?.getElementById?.(options.canvasId ?? 'renderCanvas');\n return canvas instanceof HTMLCanvasElement ? canvas : null;\n };\n\n const context: FpsGameEditorProductLocalEditorContext<TDocument> = {\n getHost: () => editorHost,\n rememberPlatformAssetDrop(payload) {\n platformAssetDropCache.remember(payload);\n },\n normalizeLoadedPlatformAssetPayload(payload) {\n return platformAssetDropCache.normalize(payload);\n },\n getCanvas,\n };\n\n const hostOptions = options.hostAssembly.createHostOptions(context);\n void retryFpsGameEditorDeferredProductCleanups();\n let createdHost: ReturnType<typeof createFpsGameEditorLocalEditorHost<TDocument, TPatch, TAsset>>;\n try {\n options.setAssetBridgeActive?.(true);\n createdHost = createFpsGameEditorLocalEditorHost<TDocument, TPatch, TAsset>({\n ...hostOptions,\n persistenceAdapter: {\n ...hostOptions.persistenceAdapter,\n runGame: enterPlayMode,\n },\n worldAdapter: {\n ...hostOptions.worldAdapter,\n disposeWorld: enterEditorMode,\n getCanvas,\n },\n project: options.project,\n compatibilityTag: options.compatibilityTag,\n root: options.root,\n pluginHost: options.pluginHost,\n });\n } catch (error) {\n try {\n options.setAssetBridgeActive?.(false);\n } catch (cleanupError) {\n const retryAssetBridgeCleanup: FpsGameEditorDeferredProductCleanup = async () => {\n options.setAssetBridgeActive?.(false);\n releaseFpsGameEditorDeferredProductCleanup(retryAssetBridgeCleanup);\n };\n retainFpsGameEditorDeferredProductCleanup(retryAssetBridgeCleanup);\n throw Object.assign(new Error('Local Editor mount and asset bridge rollback failed'), {\n errors: [error, cleanupError],\n });\n }\n throw error;\n }\n editorHost = createdHost.host;\n\n return {\n async enterEditor() {\n await editorHost?.enterEditor();\n },\n async discardAndRunGame() {\n await editorHost?.discardAndRunGame();\n },\n async dispose() {\n await disposeLocalSwitcher(false);\n },\n getHost() {\n return editorHost;\n },\n };\n}\n\nasync function rollbackOwnedProductPluginHost(\n pluginHost: FpsEditorPluginHost,\n primaryError: unknown,\n message: string,\n): Promise<unknown> {\n try {\n await pluginHost.dispose();\n return primaryError;\n } catch (cleanupError) {\n const retryPluginHostCleanup: FpsGameEditorDeferredProductCleanup = async () => {\n await pluginHost.dispose();\n releaseFpsGameEditorDeferredProductCleanup(retryPluginHostCleanup);\n };\n retainFpsGameEditorDeferredProductCleanup(retryPluginHostCleanup);\n return Object.assign(new Error(message), { errors: [primaryError, cleanupError] });\n }\n}\n\nfunction throwProductCleanupErrors(errors: readonly unknown[], message: string): void {\n if (errors.length === 1) throw errors[0];\n if (errors.length > 1) throw Object.assign(new Error(message), { errors: [...errors] });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-product-projection-preview.d.ts","sourceRoot":"","sources":["../src/playable-product-projection-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,sCAAsC,EAC3C,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EAC1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAaL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qCAAqC,EAI3C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEpE,MAAM,WAAW,yCAAyC;IACxD,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,8CAA8C,CAAC,YAAY;IAC1E,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAAC;IAC3D,oBAAoB,CAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,YAAY,GAClB;QAAE,OAAO,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;K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ACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC;QAClC,YAAY,EAAE;YAAE,eAAe,EAAE,OAAO,CAAC;YAAC,kBAAkB,EAAE,OAAO,CAAA;SAAE,CAAC;KACzE,CAAC,CAAC;IACH,+BAA+B,CAC7B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,GAClF,MAAM,GAAG,IAAI,CAAC;CAClB;AAID,wBAAgB,2CAA2C,CACzD,SAAS,SAAS,mBAAmB,EACrC,WAAW,SAAS,qBAAqB,EACzC,MAAM,SAAS,2BAA2B,EAC1C,YAAY,GAAG,OAAO,EAEtB,OAAO,EAAE,4CAA4C,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,CAAC,GAClG,qCAAqC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"playable-product-projection-preview.d.ts","sourceRoot":"","sources":["../src/playable-product-projection-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,sCAAsC,EAC3C,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EAC1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAaL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qCAAqC,EAI3C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEpE,MAAM,WAAW,yCAAyC;IACxD,gBAAgB,EAAE,MAAM,CAAC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AC,GAClG,qCAAqC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,CAgSvE"}
|
|
@@ -250,7 +250,7 @@ export function createFpsGameEditorProductProjectionPreview(options) {
|
|
|
250
250
|
const textureAssetId = typeof texture.textureAssetId === 'string' ? texture.textureAssetId.trim() : '';
|
|
251
251
|
if (textureAssetId) {
|
|
252
252
|
const asset = assets.find(candidate => candidate.kind === 'texture' && candidate.assetId === textureAssetId);
|
|
253
|
-
return
|
|
253
|
+
return resolveEditorSceneRuntimePreviewAssetUrl(options.assetsModule, asset ?? { assetId: textureAssetId }, 'texture') ?? null;
|
|
254
254
|
}
|
|
255
255
|
const textureUrl = typeof texture.url === 'string' ? texture.url.trim() : '';
|
|
256
256
|
return textureUrl || null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-product-projection-preview.js","sourceRoot":"","sources":["../src/playable-product-projection-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,EAC7C,oDAAoD,EACpD,+BAA+B,GAMhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uCAAuC,EACvC,uCAAuC,EACvC,yCAAyC,EACzC,4CAA4C,EAC5C,wDAAwD,EACxD,mCAAmC,EACnC,wBAAwB,EACxB,oCAAoC,EACpC,sCAAsC,EACtC,+BAA+B,EAC/B,wCAAwC,EACxC,wCAAwC,GASzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mCAAmC,GAGpC,MAAM,4BAA4B,CAAC;AA6FpC,MAAM,UAAU,2CAA2C,CAMzD,OAAmG;IAEnG,MAAM,KAAK,GAA8C;QACvD,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,CAAC;QACjB,kBAAkB,EAAE,CAAC;QACrB,gBAAgB,EAAE,CAAC;QACnB,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,IAAI;KAChB,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,OAAO,EAA+C,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AAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE;KAC/E,CAAC;IACF,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,uCAAuC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACvF,CAAC","sourcesContent":["import {\n createBabylonAssetContainerProjectionImporter,\n createBabylonPrimitiveProjectionInstancingController,\n createPlayableBabylonEditorGrid,\n type BabylonAssetContainerProjectionImportEvent,\n type PlayableBabylonProjectionImportContext,\n type PlayableBabylonProjectionImportResult,\n type PlayableBabylonProjectionNode,\n type PlayableBabylonSceneCameraPreviewRig,\n} from './playable-babylon-facade.js';\nimport {\n EDITOR_SCENE_PREFAB_COMPOSITION_VERSION,\n compileEditorSceneDocumentToSceneConfig,\n createEditorSceneRuntimePreviewImportPlan,\n createEditorSceneRuntimePreviewMainCameraRig,\n createEditorSceneRuntimePreviewMissingAssetUrlDiagnostic,\n createEditorSceneRuntimePreviewNode,\n isEditorScenePrefabAsset,\n readEditorSceneRuntimePreviewAssetId,\n readEditorSceneRuntimePreviewAssetKind,\n readEditorScenePrefabRootNodeId,\n resolveEditorSceneRuntimePreviewAssetUrl,\n resolveEditorScenePrefabInstanceRelation,\n type EditorSceneAssetLibraryItem,\n type EditorSceneCameraRig,\n type EditorSceneDocument,\n type EditorSceneGameObject,\n type EditorSceneRuntimePreviewAssetsModule,\n type PlayableEditorRuntimeSceneConfig,\n type PlayableEditorRuntimeSceneNode,\n type PlayableEditorSceneCompilerDocument,\n} from '@fps-games/editor-playable-sdk';\nimport {\n createPlayableAssetResourceResolver,\n type PlayableGeneratedAssetCatalogEntry,\n type PlayableResolvedAssetResource,\n} from '@fps-games/playable-assets';\n\nexport type FpsGameEditorProductBabylonModule = Record<string, any>;\n\nexport interface FpsGameEditorProductProjectionImportStats {\n importModelCalls: number;\n containerLoads: number;\n containerCacheHits: number;\n instantiateCalls: number;\n fallbackCount: number;\n lastCacheKey: string | null;\n lastError: string | null;\n}\n\nexport interface FpsGameEditorProductProjectionGroundDecalHooks<TGroundDecal> {\n isGroundDecalConfig(value: unknown): value is TGroundDecal;\n createDynamicTexture(\n name: string,\n scene: unknown,\n decal: TGroundDecal,\n ): { texture: any; ready: Promise<unknown> };\n readSize(decal: TGroundDecal): { width: number; depth: number };\n readRendering?(decal: TGroundDecal): {\n alphaIndex?: number;\n diffuseTextureLevel?: number;\n emissiveTextureLevel?: number;\n } | null | undefined;\n}\n\nexport interface FpsGameEditorProductProjectionPreviewOptions<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n TGameObject extends EditorSceneGameObject = EditorSceneGameObject,\n TAsset extends EditorSceneAssetLibraryItem = EditorSceneAssetLibraryItem,\n TGroundDecal = unknown,\n> {\n assetsModule: EditorSceneRuntimePreviewAssetsModule;\n defaultCamera: EditorSceneCameraRig;\n gridName?: string;\n primitiveSourceMeshNamePrefix?: string;\n statsTarget?: Record<string, unknown>;\n statsTargetKey?: string;\n groundDecal?: FpsGameEditorProductProjectionGroundDecalHooks<TGroundDecal>;\n loadBabylonSceneLoader?(): Promise<{\n SceneLoader: {\n LoadAssetContainerAsync(\n path: string,\n filename: string,\n scene: unknown,\n onProgress?: unknown,\n pluginExtension?: string,\n ): Promise<unknown>;\n };\n }>;\n resolveModelPathAndFile(url: string): Promise<{\n path: string;\n filename: string;\n isDataUrl?: boolean;\n isCompressed?: boolean;\n }>;\n}\n\nexport interface FpsGameEditorProductProjectionPreview<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n TGameObject extends EditorSceneGameObject = EditorSceneGameObject,\n TAsset extends EditorSceneAssetLibraryItem = EditorSceneAssetLibraryItem,\n> {\n createEditorGrid(BABYLON: FpsGameEditorProductBabylonModule, scene: unknown, camera?: unknown): unknown;\n createEditorPreviewBabylonModule(BABYLON: FpsGameEditorProductBabylonModule): FpsGameEditorProductBabylonModule;\n createProjectionNodes(editorScene: TDocument): PlayableBabylonProjectionNode[];\n createProjectionNode(editorScene: TDocument, gameObject: TGameObject): PlayableBabylonProjectionNode;\n getProjectionNodesForTarget(editorScene: TDocument, targetId: string): PlayableBabylonProjectionNode[];\n resolveProjectionTargetId(editorScene: TDocument, projectionNodeId: string): string | null;\n getProjectionSelectionNodeIds(editorScene: TDocument, targetId: string): string[];\n createSceneCameraPreviewRig(editorScene: TDocument): PlayableBabylonSceneCameraPreviewRig | null;\n importEditorProjectionModel(context: PlayableBabylonProjectionImportContext): Promise<PlayableBabylonProjectionImportResult | null>;\n createEditorSceneLibraryAssetPreview(asset: TAsset): { kind: 'image'; url: string; alt: string; fit: 'contain' } | undefined;\n createEditorSceneInspectorTextureAssets(assets: readonly TAsset[]): Array<{\n id: string;\n label: string;\n resource: PlayableResolvedAssetResource;\n url: string;\n meta: string;\n usage: 'environment' | 'material';\n capabilities: { materialTexture: boolean; environmentTexture: boolean };\n }>;\n resolveEditorSceneTextureRefUrl(\n assets: readonly TAsset[],\n texture: { textureAssetId?: string | null; url?: string | null } | null | undefined,\n ): string | null;\n}\n\ntype EditorSceneRuntimePreviewImportPlan = NonNullable<ReturnType<typeof createEditorSceneRuntimePreviewImportPlan>>;\n\nexport function createFpsGameEditorProductProjectionPreview<\n TDocument extends EditorSceneDocument,\n TGameObject extends EditorSceneGameObject,\n TAsset extends EditorSceneAssetLibraryItem,\n TGroundDecal = unknown,\n>(\n options: FpsGameEditorProductProjectionPreviewOptions<TDocument, TGameObject, TAsset, TGroundDecal>,\n): FpsGameEditorProductProjectionPreview<TDocument, TGameObject, TAsset> {\n const stats: FpsGameEditorProductProjectionImportStats = {\n importModelCalls: 0,\n containerLoads: 0,\n containerCacheHits: 0,\n instantiateCalls: 0,\n fallbackCount: 0,\n lastCacheKey: null,\n lastError: null,\n };\n const importPlanCache = new WeakMap<object, EditorSceneRuntimePreviewImportPlan>();\n const primitiveProjectionInstancing = createBabylonPrimitiveProjectionInstancingController({\n sourceMeshNamePrefix: options.primitiveSourceMeshNamePrefix ?? '__fps_editor_primitive_source',\n });\n type ProjectionSnapshot = {\n nodes: PlayableBabylonProjectionNode[];\n nodesByTargetId: Map<string, PlayableBabylonProjectionNode[]>;\n targetIdByProjectionNodeId: Map<string, string>;\n };\n const projectionSnapshots = new WeakMap<object, ProjectionSnapshot>();\n const compiledPrefabNodesByDocument = new WeakMap<object, Map<string, PlayableEditorRuntimeSceneNode[]>>();\n const publishStats = (): void => {\n const target = options.statsTarget ?? (typeof window !== 'undefined' ? window as unknown as Record<string, unknown> : null);\n if (!target) return;\n target[options.statsTargetKey ?? '__fpsGameEditorProjectionImportStats'] = { ...stats };\n };\n const resolveCachedImportPlan = (context: PlayableBabylonProjectionImportContext): EditorSceneRuntimePreviewImportPlan | null => {\n const cached = importPlanCache.get(context);\n if (cached) return cached;\n const importPlan = createEditorSceneRuntimePreviewImportPlan({\n assetsModule: options.assetsModule,\n asset: context.asset,\n nodeId: context.node.id,\n });\n if (importPlan) importPlanCache.set(context, importPlan);\n return importPlan;\n };\n const handleEvent = (event: BabylonAssetContainerProjectionImportEvent): void => {\n stats.lastCacheKey = event.cacheKey;\n if (event.type === 'container-load-start') {\n stats.containerLoads += 1;\n stats.lastError = null;\n } else if (event.type === 'container-cache-hit') {\n stats.containerCacheHits += 1;\n } else if (event.type === 'instantiate') {\n stats.instantiateCalls += 1;\n } else if (event.type === 'container-load-failure') {\n stats.fallbackCount += 1;\n stats.lastError = event.error instanceof Error ? event.error.message : String(event.error);\n }\n publishStats();\n };\n const modelImporter = createBabylonAssetContainerProjectionImporter({\n loadContainer: async (context) => {\n const importPlan = resolveCachedImportPlan(context);\n if (!importPlan) throw new Error('[LocalEditor] Missing model import plan for projection asset container');\n const loaderModule = await (options.loadBabylonSceneLoader?.() ?? loadDefaultBabylonSceneLoader());\n const pathInfo = await options.resolveModelPathAndFile(importPlan.url);\n return loaderModule.SceneLoader.LoadAssetContainerAsync(\n pathInfo.path,\n pathInfo.filename,\n context.scene,\n undefined,\n pathInfo.isDataUrl || pathInfo.isCompressed ? '.glb' : undefined,\n ) as Promise<any>;\n },\n resolveCacheKey: (context) => {\n const importPlan = resolveCachedImportPlan(context);\n const assetId = readEditorSceneRuntimePreviewAssetId(context.asset) ?? '';\n const assetRecord = context.asset as Record<string, unknown>;\n const assetGuid = typeof assetRecord.guid === 'string' ? assetRecord.guid : '';\n return importPlan\n ? `fps-editor:model:${assetId}:${assetGuid}:${importPlan.url}`\n : `fps-editor:model:${assetId}:${assetGuid}`;\n },\n onEvent: handleEvent,\n });\n const readPreviewGroundDecal = (asset: unknown): TGroundDecal | null => {\n const metadata = asset && typeof asset === 'object' && !Array.isArray(asset)\n ? (asset as { metadata?: unknown }).metadata\n : null;\n const groundDecalUi = metadata && typeof metadata === 'object' && !Array.isArray(metadata)\n ? (metadata as { groundDecalUi?: unknown }).groundDecalUi\n : null;\n return options.groundDecal?.isGroundDecalConfig(groundDecalUi) ? groundDecalUi : null;\n };\n const decorateProjectionNode = (\n editorScene: TDocument,\n gameObject: TGameObject,\n sourceNode: PlayableBabylonProjectionNode,\n ): PlayableBabylonProjectionNode => {\n const node = sourceNode;\n if (options.groundDecal?.isGroundDecalConfig((gameObject as { groundDecal?: unknown }).groundDecal)) {\n node.asset = {\n id: `ground-decal-ui:${gameObject.id}`,\n metadata: {\n assetId: `ground-decal-ui:${gameObject.id}`,\n type: 'texture',\n groundDecalUi: structuredClone((gameObject as unknown as { groundDecal: TGroundDecal }).groundDecal),\n },\n };\n node.primitive = null;\n }\n primitiveProjectionInstancing.remember(node);\n return node;\n };\n const createProjectionNodesForGameObject = (\n editorScene: TDocument,\n gameObject: TGameObject,\n ): PlayableBabylonProjectionNode[] => {\n const relation = resolveEditorScenePrefabInstanceRelation(editorScene, gameObject.id);\n const definition = relation.definition;\n const hasExplicitComposition = isEditorScenePrefabAsset(definition)\n && definition.prefab.compositionVersion === EDITOR_SCENE_PREFAB_COMPOSITION_VERSION\n && Array.isArray(definition.prefab.nodes)\n && definition.prefab.nodes.length > 0\n && !!readEditorScenePrefabRootNodeId(definition);\n if (!hasExplicitComposition) {\n return [decorateProjectionNode(\n editorScene,\n gameObject,\n createEditorSceneRuntimePreviewNode(editorScene, gameObject) as unknown as PlayableBabylonProjectionNode,\n )];\n }\n let compiledNodesByObjectId = compiledPrefabNodesByDocument.get(editorScene);\n if (!compiledNodesByObjectId) {\n compiledNodesByObjectId = new Map<string, PlayableEditorRuntimeSceneNode[]>();\n const baseSceneConfig: PlayableEditorRuntimeSceneConfig = {\n schemaVersion: 3,\n scene: {\n rootId: 'root',\n assets: [],\n nodes: [],\n materialAssets: [],\n materials: [],\n textures: [],\n },\n };\n const compiled = compileEditorSceneDocumentToSceneConfig(\n editorScene as unknown as PlayableEditorSceneCompilerDocument,\n baseSceneConfig,\n );\n for (const node of compiled.sceneConfig.scene.nodes) {\n const objectId = node.source?.objectId;\n if (!objectId) continue;\n const nodes = compiledNodesByObjectId.get(objectId) ?? [];\n nodes.push(node);\n compiledNodesByObjectId.set(objectId, nodes);\n }\n compiledPrefabNodesByDocument.set(editorScene, compiledNodesByObjectId);\n }\n return (compiledNodesByObjectId.get(gameObject.id) ?? []).map(node => decorateProjectionNode(\n editorScene,\n gameObject,\n createProjectionNodeFromCompiledRuntimeNode(editorScene, node),\n ));\n };\n const createProjectionSnapshot = (editorScene: TDocument): ProjectionSnapshot => {\n const cached = projectionSnapshots.get(editorScene);\n if (cached) return cached;\n const nodesByTargetId = new Map<string, PlayableBabylonProjectionNode[]>();\n const targetIdByProjectionNodeId = new Map<string, string>();\n const nodes = editorScene.scene.gameObjects.flatMap((gameObject) => {\n const targetId = gameObject.id;\n const targetNodes = createProjectionNodesForGameObject(editorScene, gameObject as TGameObject);\n nodesByTargetId.set(targetId, targetNodes);\n for (const node of targetNodes) targetIdByProjectionNodeId.set(node.id, targetId);\n return targetNodes;\n });\n const snapshot = { nodes, nodesByTargetId, targetIdByProjectionNodeId };\n projectionSnapshots.set(editorScene, snapshot);\n return snapshot;\n };\n const createProjectionNode = (\n editorScene: TDocument,\n gameObject: TGameObject,\n ): PlayableBabylonProjectionNode => {\n const nodes = createProjectionSnapshot(editorScene).nodesByTargetId.get(gameObject.id) ?? [];\n return nodes.find(node => node.id === gameObject.id)\n ?? nodes[0]\n ?? decorateProjectionNode(\n editorScene,\n gameObject,\n createEditorSceneRuntimePreviewNode(editorScene, gameObject) as unknown as PlayableBabylonProjectionNode,\n );\n };\n\n return {\n createEditorGrid(BABYLON, scene, camera) {\n return createPlayableBabylonEditorGrid({\n babylon: BABYLON,\n scene,\n camera,\n name: options.gridName ?? 'fps-editor-grid',\n halfLineCount: 96,\n });\n },\n createEditorPreviewBabylonModule(BABYLON) {\n return primitiveProjectionInstancing.createPreviewBabylonModule(BABYLON);\n },\n createProjectionNodes(editorScene) {\n const nodes = createProjectionSnapshot(editorScene).nodes;\n primitiveProjectionInstancing.sync(nodes);\n return nodes;\n },\n createProjectionNode,\n getProjectionNodesForTarget(editorScene, targetId) {\n return [...(createProjectionSnapshot(editorScene).nodesByTargetId.get(targetId) ?? [])];\n },\n resolveProjectionTargetId(editorScene, projectionNodeId) {\n return createProjectionSnapshot(editorScene).targetIdByProjectionNodeId.get(projectionNodeId) ?? null;\n },\n getProjectionSelectionNodeIds(editorScene, targetId) {\n return (createProjectionSnapshot(editorScene).nodesByTargetId.get(targetId) ?? []).map(node => node.id);\n },\n createSceneCameraPreviewRig(editorScene) {\n return createEditorSceneRuntimePreviewMainCameraRig(\n editorScene,\n options.defaultCamera,\n ) as PlayableBabylonSceneCameraPreviewRig | null;\n },\n async importEditorProjectionModel(context) {\n stats.importModelCalls += 1;\n publishStats();\n const groundDecalUi = readPreviewGroundDecal(context.asset);\n if (groundDecalUi && options.groundDecal) {\n return createGroundDecalProjectionResult(context, groundDecalUi, options.groundDecal);\n }\n const assetId = readEditorSceneRuntimePreviewAssetId(context.asset);\n if (!assetId) {\n stats.fallbackCount += 1;\n publishStats();\n return null;\n }\n const importPlan = resolveCachedImportPlan(context);\n if (!importPlan) {\n const kind = readEditorSceneRuntimePreviewAssetKind(context.asset) === 'texture' ? 'texture' : 'model';\n stats.fallbackCount += 1;\n publishStats();\n console.warn('[LocalEditor] Missing projection asset URL', createEditorSceneRuntimePreviewMissingAssetUrlDiagnostic(context.asset, kind));\n return null;\n }\n return await modelImporter(context) ?? null;\n },\n createEditorSceneLibraryAssetPreview(asset) {\n if (asset.kind !== 'texture') return undefined;\n const url = resolveEditorSceneRuntimePreviewAssetUrl(options.assetsModule, asset, 'texture');\n return url ? { kind: 'image', url, alt: asset.displayName, fit: 'contain' } : undefined;\n },\n createEditorSceneInspectorTextureAssets(assets) {\n const resourceResolver = createPlayableAssetResourceResolver(\n (options.assetsModule.ASSET_CATALOG ?? {}) as Readonly<Record<string, PlayableGeneratedAssetCatalogEntry>>,\n );\n return assets\n .filter(asset => asset.kind === 'texture')\n .flatMap((asset) => {\n const resolved = resourceResolver.resolve({ assetId: asset.assetId });\n if (!resolved.ok) return [];\n const environmentTexture = isEnvironmentTextureAsset(asset, resolved.resource.url);\n return [{\n id: asset.assetId,\n label: asset.displayName || asset.assetId,\n resource: resolved.resource,\n url: resolved.resource.url,\n meta: environmentTexture ? `${asset.assetId} · IBL` : asset.assetId,\n usage: environmentTexture ? 'environment' : 'material',\n capabilities: {\n materialTexture: !environmentTexture,\n environmentTexture,\n },\n }];\n });\n },\n resolveEditorSceneTextureRefUrl(assets, texture) {\n if (!texture || typeof texture !== 'object') return null;\n const textureAssetId = typeof texture.textureAssetId === 'string' ? texture.textureAssetId.trim() : '';\n if (textureAssetId) {\n const asset = assets.find(candidate => candidate.kind === 'texture' && candidate.assetId === textureAssetId);\n return asset ? resolveEditorSceneRuntimePreviewAssetUrl(options.assetsModule, asset, 'texture') ?? null : null;\n }\n const textureUrl = typeof texture.url === 'string' ? texture.url.trim() : '';\n return textureUrl || null;\n },\n };\n}\n\nfunction createProjectionNodeFromCompiledRuntimeNode(\n editorScene: EditorSceneDocument,\n node: PlayableEditorRuntimeSceneNode,\n): PlayableBabylonProjectionNode {\n const scale = typeof node.transform?.scale === 'number'\n ? { x: node.transform.scale, y: node.transform.scale, z: node.transform.scale }\n : node.transform?.scale;\n const components = node.transform\n ? [{\n type: 'Transform',\n position: structuredClone(node.transform.position ?? { x: 0, y: 0, z: 0 }),\n rotation: structuredClone(node.transform.rotation ?? { x: 0, y: 0, z: 0 }),\n scale: structuredClone(scale ?? { x: 1, y: 1, z: 1 }),\n }]\n : [];\n if (node.kind === 'instance') {\n components.push({ type: 'ModelRenderer', assetId: node.instance.assetId } as never);\n }\n const gameObject = {\n id: node.id,\n name: node.name ?? node.id,\n kind: node.kind === 'instance' || node.kind === 'primitive' || node.kind === 'transform'\n ? node.kind\n : 'group',\n ...(node.parentId ? { parentId: node.parentId } : {}),\n ...(node.enabled === false ? { active: false } : {}),\n ...(node.shadow ? { shadow: structuredClone(node.shadow) } : {}),\n ...(node.rendering ? { rendering: structuredClone(node.rendering) } : {}),\n ...(node.kind === 'instance' || node.kind === 'primitive' || node.kind === 'transform'\n ? node.overrides ? { overrides: structuredClone(node.overrides) } : {}\n : {}),\n ...(node.kind === 'primitive' ? { primitive: structuredClone(node.primitive) } : {}),\n ...(node.kind === 'transform' && node.camera ? { camera: structuredClone(node.camera) } : {}),\n ...(node.kind === 'transform' && node.light ? { light: structuredClone(node.light) } : {}),\n ...(node.kind === 'transform' && node.marker ? { marker: structuredClone(node.marker) } : {}),\n components,\n } as unknown as EditorSceneGameObject;\n const previewNode = createEditorSceneRuntimePreviewNode(editorScene, gameObject) as unknown as PlayableBabylonProjectionNode;\n return {\n ...previewNode,\n ...(node.shadowPlan ? { shadowPlan: structuredClone(node.shadowPlan) } : {}),\n };\n}\n\nasync function loadDefaultBabylonSceneLoader() {\n await import('@babylonjs/loaders/glTF');\n return import('@babylonjs/core/Loading/sceneLoader');\n}\n\nasync function createGroundDecalProjectionResult<TGroundDecal>(\n context: PlayableBabylonProjectionImportContext,\n decal: TGroundDecal,\n hooks: FpsGameEditorProductProjectionGroundDecalHooks<TGroundDecal>,\n): Promise<PlayableBabylonProjectionImportResult> {\n const [{ MeshBuilder }, { StandardMaterial }, { Color3 }] = await Promise.all([\n import('@babylonjs/core/Meshes/meshBuilder'),\n import('@babylonjs/core/Materials/standardMaterial'),\n import('@babylonjs/core/Maths/math.color'),\n ]);\n const size = hooks.readSize(decal);\n const rendering = hooks.readRendering?.(decal) ?? null;\n const mesh = MeshBuilder.CreateGround(`${context.node.id}.groundDecalUiProjection`, {\n width: size.width,\n height: size.depth,\n }, context.scene);\n mesh.isPickable = true;\n mesh.receiveShadows = false;\n mesh.alphaIndex = rendering?.alphaIndex ?? 100;\n const mat = new StandardMaterial(`${context.node.id}.groundDecalUiProjectionMaterial`, context.scene);\n const { texture, ready } = hooks.createDynamicTexture(`${context.node.id}.groundDecalUiProjectionTexture`, context.scene, decal);\n await ready;\n mat.diffuseTexture = texture;\n mat.useAlphaFromDiffuseTexture = true;\n mat.diffuseColor = new Color3(1, 1, 1);\n mat.emissiveColor = new Color3(1, 1, 1);\n mat.specularColor = new Color3(0, 0, 0);\n mat.backFaceCulling = false;\n mat.disableLighting = true;\n if (typeof rendering?.diffuseTextureLevel === 'number' && Number.isFinite(rendering.diffuseTextureLevel)) {\n if (mat.diffuseTexture) mat.diffuseTexture.level = rendering.diffuseTextureLevel;\n }\n if (\n typeof rendering?.emissiveTextureLevel === 'number'\n && Number.isFinite(rendering.emissiveTextureLevel)\n && rendering.emissiveTextureLevel > 0\n ) {\n mat.emissiveTexture = texture;\n if (mat.emissiveTexture) mat.emissiveTexture.level = rendering.emissiveTextureLevel;\n }\n mesh.material = mat;\n return { meshes: [mesh], transformNodes: [], animationGroups: [] };\n}\n\nfunction isEnvironmentTextureAsset(asset: EditorSceneAssetLibraryItem, resolvedUrl: string): boolean {\n const metadata = asset.metadata && typeof asset.metadata === 'object' && !Array.isArray(asset.metadata)\n ? asset.metadata as Record<string, unknown>\n : {};\n if (metadata.textureUsage === 'environment' || metadata.usage === 'environment') return true;\n const capabilities = metadata.capabilities && typeof metadata.capabilities === 'object' && !Array.isArray(metadata.capabilities)\n ? metadata.capabilities as Record<string, unknown>\n : null;\n if (capabilities?.environmentTexture === true) return true;\n if (capabilities?.environmentTexture === false) return false;\n const candidates = [\n resolvedUrl,\n asset.displayName,\n asset.assetId,\n typeof metadata.relativePath === 'string' ? metadata.relativePath : '',\n typeof metadata.originalFileName === 'string' ? metadata.originalFileName : '',\n ];\n return candidates.some(value => /\\.(env|hdr|dds|ktx|ktx2)(?:[?#].*)?$/i.test(value));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"playable-product-projection-preview.js","sourceRoot":"","sources":["../src/playable-product-projection-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,EAC7C,oDAAoD,EACpD,+BAA+B,GAMhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uCAAuC,EACvC,uCAAuC,EACvC,yCAAyC,EACzC,4CAA4C,EAC5C,wDAAwD,EACxD,mCAAmC,EACnC,wBAAwB,EACxB,oCAAoC,EACpC,sCAAsC,EACtC,+BAA+B,EAC/B,wCAAwC,EACxC,wCAAwC,GASzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mCAAmC,GAGpC,MAAM,4BAA4B,CAAC;AA6FpC,MAAM,UAAU,2CAA2C,CAMzD,OAAmG;IAEnG,MAAM,KAAK,GAA8C;QACvD,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,CAAC;QACjB,kBAAkB,EAAE,CAAC;QACrB,gBAAgB,EAAE,CAAC;QACnB,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,IAAI;KAChB,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,OAAO,EAA+C,CAAC;IACnF,MAAM,6BAA6B,GAAG,oDAAoD,CAAC;QACzF,oBAAoB,EAAE,OAAO,CAAC,6BAA6B,IAAI,+BAA+B;KAC/F,CAAC,CAAC;IAMH,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAA8B,CAAC;IACtE,MAAM,6BAA6B,GAAG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ainerProjectionImporter,\n createBabylonPrimitiveProjectionInstancingController,\n createPlayableBabylonEditorGrid,\n type BabylonAssetContainerProjectionImportEvent,\n type PlayableBabylonProjectionImportContext,\n type PlayableBabylonProjectionImportResult,\n type PlayableBabylonProjectionNode,\n type PlayableBabylonSceneCameraPreviewRig,\n} from './playable-babylon-facade.js';\nimport {\n EDITOR_SCENE_PREFAB_COMPOSITION_VERSION,\n compileEditorSceneDocumentToSceneConfig,\n createEditorSceneRuntimePreviewImportPlan,\n createEditorSceneRuntimePreviewMainCameraRig,\n createEditorSceneRuntimePreviewMissingAssetUrlDiagnostic,\n createEditorSceneRuntimePreviewNode,\n isEditorScenePrefabAsset,\n readEditorSceneRuntimePreviewAssetId,\n readEditorSceneRuntimePreviewAssetKind,\n readEditorScenePrefabRootNodeId,\n resolveEditorSceneRuntimePreviewAssetUrl,\n resolveEditorScenePrefabInstanceRelation,\n type EditorSceneAssetLibraryItem,\n type EditorSceneCameraRig,\n type EditorSceneDocument,\n type EditorSceneGameObject,\n type EditorSceneRuntimePreviewAssetsModule,\n type PlayableEditorRuntimeSceneConfig,\n type PlayableEditorRuntimeSceneNode,\n type PlayableEditorSceneCompilerDocument,\n} from '@fps-games/editor-playable-sdk';\nimport {\n createPlayableAssetResourceResolver,\n type PlayableGeneratedAssetCatalogEntry,\n type PlayableResolvedAssetResource,\n} from '@fps-games/playable-assets';\n\nexport type FpsGameEditorProductBabylonModule = Record<string, any>;\n\nexport interface FpsGameEditorProductProjectionImportStats {\n importModelCalls: number;\n containerLoads: number;\n containerCacheHits: number;\n instantiateCalls: number;\n fallbackCount: number;\n lastCacheKey: string | null;\n lastError: string | null;\n}\n\nexport interface FpsGameEditorProductProjectionGroundDecalHooks<TGroundDecal> {\n isGroundDecalConfig(value: unknown): value is TGroundDecal;\n createDynamicTexture(\n name: string,\n scene: unknown,\n decal: TGroundDecal,\n ): { texture: any; ready: Promise<unknown> };\n readSize(decal: TGroundDecal): { width: number; depth: number };\n readRendering?(decal: TGroundDecal): {\n alphaIndex?: number;\n diffuseTextureLevel?: number;\n emissiveTextureLevel?: number;\n } | null | undefined;\n}\n\nexport interface FpsGameEditorProductProjectionPreviewOptions<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n TGameObject extends EditorSceneGameObject = EditorSceneGameObject,\n TAsset extends EditorSceneAssetLibraryItem = EditorSceneAssetLibraryItem,\n TGroundDecal = unknown,\n> {\n assetsModule: EditorSceneRuntimePreviewAssetsModule;\n defaultCamera: EditorSceneCameraRig;\n gridName?: string;\n primitiveSourceMeshNamePrefix?: string;\n statsTarget?: Record<string, unknown>;\n statsTargetKey?: string;\n groundDecal?: FpsGameEditorProductProjectionGroundDecalHooks<TGroundDecal>;\n loadBabylonSceneLoader?(): Promise<{\n SceneLoader: {\n LoadAssetContainerAsync(\n path: string,\n filename: string,\n scene: unknown,\n onProgress?: unknown,\n pluginExtension?: string,\n ): Promise<unknown>;\n };\n }>;\n resolveModelPathAndFile(url: string): Promise<{\n path: string;\n filename: string;\n isDataUrl?: boolean;\n isCompressed?: boolean;\n }>;\n}\n\nexport interface FpsGameEditorProductProjectionPreview<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n TGameObject extends EditorSceneGameObject = EditorSceneGameObject,\n TAsset extends EditorSceneAssetLibraryItem = EditorSceneAssetLibraryItem,\n> {\n createEditorGrid(BABYLON: FpsGameEditorProductBabylonModule, scene: unknown, camera?: unknown): unknown;\n createEditorPreviewBabylonModule(BABYLON: FpsGameEditorProductBabylonModule): FpsGameEditorProductBabylonModule;\n createProjectionNodes(editorScene: TDocument): PlayableBabylonProjectionNode[];\n createProjectionNode(editorScene: TDocument, gameObject: TGameObject): PlayableBabylonProjectionNode;\n getProjectionNodesForTarget(editorScene: TDocument, targetId: string): PlayableBabylonProjectionNode[];\n resolveProjectionTargetId(editorScene: TDocument, projectionNodeId: string): string | null;\n getProjectionSelectionNodeIds(editorScene: TDocument, targetId: string): string[];\n createSceneCameraPreviewRig(editorScene: TDocument): PlayableBabylonSceneCameraPreviewRig | null;\n importEditorProjectionModel(context: PlayableBabylonProjectionImportContext): Promise<PlayableBabylonProjectionImportResult | null>;\n createEditorSceneLibraryAssetPreview(asset: TAsset): { kind: 'image'; url: string; alt: string; fit: 'contain' } | undefined;\n createEditorSceneInspectorTextureAssets(assets: readonly TAsset[]): Array<{\n id: string;\n label: string;\n resource: PlayableResolvedAssetResource;\n url: string;\n meta: string;\n usage: 'environment' | 'material';\n capabilities: { materialTexture: boolean; environmentTexture: boolean };\n }>;\n resolveEditorSceneTextureRefUrl(\n assets: readonly TAsset[],\n texture: { textureAssetId?: string | null; url?: string | null } | null | undefined,\n ): string | null;\n}\n\ntype EditorSceneRuntimePreviewImportPlan = NonNullable<ReturnType<typeof createEditorSceneRuntimePreviewImportPlan>>;\n\nexport function createFpsGameEditorProductProjectionPreview<\n TDocument extends EditorSceneDocument,\n TGameObject extends EditorSceneGameObject,\n TAsset extends EditorSceneAssetLibraryItem,\n TGroundDecal = unknown,\n>(\n options: FpsGameEditorProductProjectionPreviewOptions<TDocument, TGameObject, TAsset, TGroundDecal>,\n): FpsGameEditorProductProjectionPreview<TDocument, TGameObject, TAsset> {\n const stats: FpsGameEditorProductProjectionImportStats = {\n importModelCalls: 0,\n containerLoads: 0,\n containerCacheHits: 0,\n instantiateCalls: 0,\n fallbackCount: 0,\n lastCacheKey: null,\n lastError: null,\n };\n const importPlanCache = new WeakMap<object, EditorSceneRuntimePreviewImportPlan>();\n const primitiveProjectionInstancing = createBabylonPrimitiveProjectionInstancingController({\n sourceMeshNamePrefix: options.primitiveSourceMeshNamePrefix ?? '__fps_editor_primitive_source',\n });\n type ProjectionSnapshot = {\n nodes: PlayableBabylonProjectionNode[];\n nodesByTargetId: Map<string, PlayableBabylonProjectionNode[]>;\n targetIdByProjectionNodeId: Map<string, string>;\n };\n const projectionSnapshots = new WeakMap<object, ProjectionSnapshot>();\n const compiledPrefabNodesByDocument = new WeakMap<object, Map<string, PlayableEditorRuntimeSceneNode[]>>();\n const publishStats = (): void => {\n const target = options.statsTarget ?? (typeof window !== 'undefined' ? window as unknown as Record<string, unknown> : null);\n if (!target) return;\n target[options.statsTargetKey ?? '__fpsGameEditorProjectionImportStats'] = { ...stats };\n };\n const resolveCachedImportPlan = (context: PlayableBabylonProjectionImportContext): EditorSceneRuntimePreviewImportPlan | null => {\n const cached = importPlanCache.get(context);\n if (cached) return cached;\n const importPlan = createEditorSceneRuntimePreviewImportPlan({\n assetsModule: options.assetsModule,\n asset: context.asset,\n nodeId: context.node.id,\n });\n if (importPlan) importPlanCache.set(context, importPlan);\n return importPlan;\n };\n const handleEvent = (event: BabylonAssetContainerProjectionImportEvent): void => {\n stats.lastCacheKey = event.cacheKey;\n if (event.type === 'container-load-start') {\n stats.containerLoads += 1;\n stats.lastError = null;\n } else if (event.type === 'container-cache-hit') {\n stats.containerCacheHits += 1;\n } else if (event.type === 'instantiate') {\n stats.instantiateCalls += 1;\n } else if (event.type === 'container-load-failure') {\n stats.fallbackCount += 1;\n stats.lastError = event.error instanceof Error ? event.error.message : String(event.error);\n }\n publishStats();\n };\n const modelImporter = createBabylonAssetContainerProjectionImporter({\n loadContainer: async (context) => {\n const importPlan = resolveCachedImportPlan(context);\n if (!importPlan) throw new Error('[LocalEditor] Missing model import plan for projection asset container');\n const loaderModule = await (options.loadBabylonSceneLoader?.() ?? loadDefaultBabylonSceneLoader());\n const pathInfo = await options.resolveModelPathAndFile(importPlan.url);\n return loaderModule.SceneLoader.LoadAssetContainerAsync(\n pathInfo.path,\n pathInfo.filename,\n context.scene,\n undefined,\n pathInfo.isDataUrl || pathInfo.isCompressed ? '.glb' : undefined,\n ) as Promise<any>;\n },\n resolveCacheKey: (context) => {\n const importPlan = resolveCachedImportPlan(context);\n const assetId = readEditorSceneRuntimePreviewAssetId(context.asset) ?? '';\n const assetRecord = context.asset as Record<string, unknown>;\n const assetGuid = typeof assetRecord.guid === 'string' ? assetRecord.guid : '';\n return importPlan\n ? `fps-editor:model:${assetId}:${assetGuid}:${importPlan.url}`\n : `fps-editor:model:${assetId}:${assetGuid}`;\n },\n onEvent: handleEvent,\n });\n const readPreviewGroundDecal = (asset: unknown): TGroundDecal | null => {\n const metadata = asset && typeof asset === 'object' && !Array.isArray(asset)\n ? (asset as { metadata?: unknown }).metadata\n : null;\n const groundDecalUi = metadata && typeof metadata === 'object' && !Array.isArray(metadata)\n ? (metadata as { groundDecalUi?: unknown }).groundDecalUi\n : null;\n return options.groundDecal?.isGroundDecalConfig(groundDecalUi) ? groundDecalUi : null;\n };\n const decorateProjectionNode = (\n editorScene: TDocument,\n gameObject: TGameObject,\n sourceNode: PlayableBabylonProjectionNode,\n ): PlayableBabylonProjectionNode => {\n const node = sourceNode;\n if (options.groundDecal?.isGroundDecalConfig((gameObject as { groundDecal?: unknown }).groundDecal)) {\n node.asset = {\n id: `ground-decal-ui:${gameObject.id}`,\n metadata: {\n assetId: `ground-decal-ui:${gameObject.id}`,\n type: 'texture',\n groundDecalUi: structuredClone((gameObject as unknown as { groundDecal: TGroundDecal }).groundDecal),\n },\n };\n node.primitive = null;\n }\n primitiveProjectionInstancing.remember(node);\n return node;\n };\n const createProjectionNodesForGameObject = (\n editorScene: TDocument,\n gameObject: TGameObject,\n ): PlayableBabylonProjectionNode[] => {\n const relation = resolveEditorScenePrefabInstanceRelation(editorScene, gameObject.id);\n const definition = relation.definition;\n const hasExplicitComposition = isEditorScenePrefabAsset(definition)\n && definition.prefab.compositionVersion === EDITOR_SCENE_PREFAB_COMPOSITION_VERSION\n && Array.isArray(definition.prefab.nodes)\n && definition.prefab.nodes.length > 0\n && !!readEditorScenePrefabRootNodeId(definition);\n if (!hasExplicitComposition) {\n return [decorateProjectionNode(\n editorScene,\n gameObject,\n createEditorSceneRuntimePreviewNode(editorScene, gameObject) as unknown as PlayableBabylonProjectionNode,\n )];\n }\n let compiledNodesByObjectId = compiledPrefabNodesByDocument.get(editorScene);\n if (!compiledNodesByObjectId) {\n compiledNodesByObjectId = new Map<string, PlayableEditorRuntimeSceneNode[]>();\n const baseSceneConfig: PlayableEditorRuntimeSceneConfig = {\n schemaVersion: 3,\n scene: {\n rootId: 'root',\n assets: [],\n nodes: [],\n materialAssets: [],\n materials: [],\n textures: [],\n },\n };\n const compiled = compileEditorSceneDocumentToSceneConfig(\n editorScene as unknown as PlayableEditorSceneCompilerDocument,\n baseSceneConfig,\n );\n for (const node of compiled.sceneConfig.scene.nodes) {\n const objectId = node.source?.objectId;\n if (!objectId) continue;\n const nodes = compiledNodesByObjectId.get(objectId) ?? [];\n nodes.push(node);\n compiledNodesByObjectId.set(objectId, nodes);\n }\n compiledPrefabNodesByDocument.set(editorScene, compiledNodesByObjectId);\n }\n return (compiledNodesByObjectId.get(gameObject.id) ?? []).map(node => decorateProjectionNode(\n editorScene,\n gameObject,\n createProjectionNodeFromCompiledRuntimeNode(editorScene, node),\n ));\n };\n const createProjectionSnapshot = (editorScene: TDocument): ProjectionSnapshot => {\n const cached = projectionSnapshots.get(editorScene);\n if (cached) return cached;\n const nodesByTargetId = new Map<string, PlayableBabylonProjectionNode[]>();\n const targetIdByProjectionNodeId = new Map<string, string>();\n const nodes = editorScene.scene.gameObjects.flatMap((gameObject) => {\n const targetId = gameObject.id;\n const targetNodes = createProjectionNodesForGameObject(editorScene, gameObject as TGameObject);\n nodesByTargetId.set(targetId, targetNodes);\n for (const node of targetNodes) targetIdByProjectionNodeId.set(node.id, targetId);\n return targetNodes;\n });\n const snapshot = { nodes, nodesByTargetId, targetIdByProjectionNodeId };\n projectionSnapshots.set(editorScene, snapshot);\n return snapshot;\n };\n const createProjectionNode = (\n editorScene: TDocument,\n gameObject: TGameObject,\n ): PlayableBabylonProjectionNode => {\n const nodes = createProjectionSnapshot(editorScene).nodesByTargetId.get(gameObject.id) ?? [];\n return nodes.find(node => node.id === gameObject.id)\n ?? nodes[0]\n ?? decorateProjectionNode(\n editorScene,\n gameObject,\n createEditorSceneRuntimePreviewNode(editorScene, gameObject) as unknown as PlayableBabylonProjectionNode,\n );\n };\n\n return {\n createEditorGrid(BABYLON, scene, camera) {\n return createPlayableBabylonEditorGrid({\n babylon: BABYLON,\n scene,\n camera,\n name: options.gridName ?? 'fps-editor-grid',\n halfLineCount: 96,\n });\n },\n createEditorPreviewBabylonModule(BABYLON) {\n return primitiveProjectionInstancing.createPreviewBabylonModule(BABYLON);\n },\n createProjectionNodes(editorScene) {\n const nodes = createProjectionSnapshot(editorScene).nodes;\n primitiveProjectionInstancing.sync(nodes);\n return nodes;\n },\n createProjectionNode,\n getProjectionNodesForTarget(editorScene, targetId) {\n return [...(createProjectionSnapshot(editorScene).nodesByTargetId.get(targetId) ?? [])];\n },\n resolveProjectionTargetId(editorScene, projectionNodeId) {\n return createProjectionSnapshot(editorScene).targetIdByProjectionNodeId.get(projectionNodeId) ?? null;\n },\n getProjectionSelectionNodeIds(editorScene, targetId) {\n return (createProjectionSnapshot(editorScene).nodesByTargetId.get(targetId) ?? []).map(node => node.id);\n },\n createSceneCameraPreviewRig(editorScene) {\n return createEditorSceneRuntimePreviewMainCameraRig(\n editorScene,\n options.defaultCamera,\n ) as PlayableBabylonSceneCameraPreviewRig | null;\n },\n async importEditorProjectionModel(context) {\n stats.importModelCalls += 1;\n publishStats();\n const groundDecalUi = readPreviewGroundDecal(context.asset);\n if (groundDecalUi && options.groundDecal) {\n return createGroundDecalProjectionResult(context, groundDecalUi, options.groundDecal);\n }\n const assetId = readEditorSceneRuntimePreviewAssetId(context.asset);\n if (!assetId) {\n stats.fallbackCount += 1;\n publishStats();\n return null;\n }\n const importPlan = resolveCachedImportPlan(context);\n if (!importPlan) {\n const kind = readEditorSceneRuntimePreviewAssetKind(context.asset) === 'texture' ? 'texture' : 'model';\n stats.fallbackCount += 1;\n publishStats();\n console.warn('[LocalEditor] Missing projection asset URL', createEditorSceneRuntimePreviewMissingAssetUrlDiagnostic(context.asset, kind));\n return null;\n }\n return await modelImporter(context) ?? null;\n },\n createEditorSceneLibraryAssetPreview(asset) {\n if (asset.kind !== 'texture') return undefined;\n const url = resolveEditorSceneRuntimePreviewAssetUrl(options.assetsModule, asset, 'texture');\n return url ? { kind: 'image', url, alt: asset.displayName, fit: 'contain' } : undefined;\n },\n createEditorSceneInspectorTextureAssets(assets) {\n const resourceResolver = createPlayableAssetResourceResolver(\n (options.assetsModule.ASSET_CATALOG ?? {}) as Readonly<Record<string, PlayableGeneratedAssetCatalogEntry>>,\n );\n return assets\n .filter(asset => asset.kind === 'texture')\n .flatMap((asset) => {\n const resolved = resourceResolver.resolve({ assetId: asset.assetId });\n if (!resolved.ok) return [];\n const environmentTexture = isEnvironmentTextureAsset(asset, resolved.resource.url);\n return [{\n id: asset.assetId,\n label: asset.displayName || asset.assetId,\n resource: resolved.resource,\n url: resolved.resource.url,\n meta: environmentTexture ? `${asset.assetId} · IBL` : asset.assetId,\n usage: environmentTexture ? 'environment' : 'material',\n capabilities: {\n materialTexture: !environmentTexture,\n environmentTexture,\n },\n }];\n });\n },\n resolveEditorSceneTextureRefUrl(assets, texture) {\n if (!texture || typeof texture !== 'object') return null;\n const textureAssetId = typeof texture.textureAssetId === 'string' ? texture.textureAssetId.trim() : '';\n if (textureAssetId) {\n const asset = assets.find(candidate => candidate.kind === 'texture' && candidate.assetId === textureAssetId);\n return resolveEditorSceneRuntimePreviewAssetUrl(\n options.assetsModule,\n asset ?? { assetId: textureAssetId },\n 'texture',\n ) ?? null;\n }\n const textureUrl = typeof texture.url === 'string' ? texture.url.trim() : '';\n return textureUrl || null;\n },\n };\n}\n\nfunction createProjectionNodeFromCompiledRuntimeNode(\n editorScene: EditorSceneDocument,\n node: PlayableEditorRuntimeSceneNode,\n): PlayableBabylonProjectionNode {\n const scale = typeof node.transform?.scale === 'number'\n ? { x: node.transform.scale, y: node.transform.scale, z: node.transform.scale }\n : node.transform?.scale;\n const components = node.transform\n ? [{\n type: 'Transform',\n position: structuredClone(node.transform.position ?? { x: 0, y: 0, z: 0 }),\n rotation: structuredClone(node.transform.rotation ?? { x: 0, y: 0, z: 0 }),\n scale: structuredClone(scale ?? { x: 1, y: 1, z: 1 }),\n }]\n : [];\n if (node.kind === 'instance') {\n components.push({ type: 'ModelRenderer', assetId: node.instance.assetId } as never);\n }\n const gameObject = {\n id: node.id,\n name: node.name ?? node.id,\n kind: node.kind === 'instance' || node.kind === 'primitive' || node.kind === 'transform'\n ? node.kind\n : 'group',\n ...(node.parentId ? { parentId: node.parentId } : {}),\n ...(node.enabled === false ? { active: false } : {}),\n ...(node.shadow ? { shadow: structuredClone(node.shadow) } : {}),\n ...(node.rendering ? { rendering: structuredClone(node.rendering) } : {}),\n ...(node.kind === 'instance' || node.kind === 'primitive' || node.kind === 'transform'\n ? node.overrides ? { overrides: structuredClone(node.overrides) } : {}\n : {}),\n ...(node.kind === 'primitive' ? { primitive: structuredClone(node.primitive) } : {}),\n ...(node.kind === 'transform' && node.camera ? { camera: structuredClone(node.camera) } : {}),\n ...(node.kind === 'transform' && node.light ? { light: structuredClone(node.light) } : {}),\n ...(node.kind === 'transform' && node.marker ? { marker: structuredClone(node.marker) } : {}),\n components,\n } as unknown as EditorSceneGameObject;\n const previewNode = createEditorSceneRuntimePreviewNode(editorScene, gameObject) as unknown as PlayableBabylonProjectionNode;\n return {\n ...previewNode,\n ...(node.shadowPlan ? { shadowPlan: structuredClone(node.shadowPlan) } : {}),\n };\n}\n\nasync function loadDefaultBabylonSceneLoader() {\n await import('@babylonjs/loaders/glTF');\n return import('@babylonjs/core/Loading/sceneLoader');\n}\n\nasync function createGroundDecalProjectionResult<TGroundDecal>(\n context: PlayableBabylonProjectionImportContext,\n decal: TGroundDecal,\n hooks: FpsGameEditorProductProjectionGroundDecalHooks<TGroundDecal>,\n): Promise<PlayableBabylonProjectionImportResult> {\n const [{ MeshBuilder }, { StandardMaterial }, { Color3 }] = await Promise.all([\n import('@babylonjs/core/Meshes/meshBuilder'),\n import('@babylonjs/core/Materials/standardMaterial'),\n import('@babylonjs/core/Maths/math.color'),\n ]);\n const size = hooks.readSize(decal);\n const rendering = hooks.readRendering?.(decal) ?? null;\n const mesh = MeshBuilder.CreateGround(`${context.node.id}.groundDecalUiProjection`, {\n width: size.width,\n height: size.depth,\n }, context.scene);\n mesh.isPickable = true;\n mesh.receiveShadows = false;\n mesh.alphaIndex = rendering?.alphaIndex ?? 100;\n const mat = new StandardMaterial(`${context.node.id}.groundDecalUiProjectionMaterial`, context.scene);\n const { texture, ready } = hooks.createDynamicTexture(`${context.node.id}.groundDecalUiProjectionTexture`, context.scene, decal);\n await ready;\n mat.diffuseTexture = texture;\n mat.useAlphaFromDiffuseTexture = true;\n mat.diffuseColor = new Color3(1, 1, 1);\n mat.emissiveColor = new Color3(1, 1, 1);\n mat.specularColor = new Color3(0, 0, 0);\n mat.backFaceCulling = false;\n mat.disableLighting = true;\n if (typeof rendering?.diffuseTextureLevel === 'number' && Number.isFinite(rendering.diffuseTextureLevel)) {\n if (mat.diffuseTexture) mat.diffuseTexture.level = rendering.diffuseTextureLevel;\n }\n if (\n typeof rendering?.emissiveTextureLevel === 'number'\n && Number.isFinite(rendering.emissiveTextureLevel)\n && rendering.emissiveTextureLevel > 0\n ) {\n mat.emissiveTexture = texture;\n if (mat.emissiveTexture) mat.emissiveTexture.level = rendering.emissiveTextureLevel;\n }\n mesh.material = mat;\n return { meshes: [mesh], transformNodes: [], animationGroups: [] };\n}\n\nfunction isEnvironmentTextureAsset(asset: EditorSceneAssetLibraryItem, resolvedUrl: string): boolean {\n const metadata = asset.metadata && typeof asset.metadata === 'object' && !Array.isArray(asset.metadata)\n ? asset.metadata as Record<string, unknown>\n : {};\n if (metadata.textureUsage === 'environment' || metadata.usage === 'environment') return true;\n const capabilities = metadata.capabilities && typeof metadata.capabilities === 'object' && !Array.isArray(metadata.capabilities)\n ? metadata.capabilities as Record<string, unknown>\n : null;\n if (capabilities?.environmentTexture === true) return true;\n if (capabilities?.environmentTexture === false) return false;\n const candidates = [\n resolvedUrl,\n asset.displayName,\n asset.assetId,\n typeof metadata.relativePath === 'string' ? metadata.relativePath : '',\n typeof metadata.originalFileName === 'string' ? metadata.originalFileName : '',\n ];\n return candidates.some(value => /\\.(env|hdr|dds|ktx|ktx2)(?:[?#].*)?$/i.test(value));\n}\n"]}
|
|
@@ -62,7 +62,6 @@ export interface FpsGameEditorProductSceneHostOptionsInput<TDocument, TPatch, TA
|
|
|
62
62
|
selection?: PlayableLocalEditorSelectionCapability<TDocument>;
|
|
63
63
|
inspector?: PlayableLocalEditorInspectorCapability<TDocument>;
|
|
64
64
|
assetBrowser?: PlayableLocalEditorAssetBrowserCapability<TDocument>;
|
|
65
|
-
agentContext?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>['agentContext'];
|
|
66
65
|
markerGraph?: PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch>;
|
|
67
66
|
assetActions?: PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>;
|
|
68
67
|
prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;
|
|
@@ -78,7 +77,6 @@ export interface FpsGameEditorProductHostAssemblyInput<TDocument extends EditorS
|
|
|
78
77
|
document: Pick<FpsGameEditorProductSceneDocumentAdapter<TDocument, TPatch, TAsset>, 'getProjectionNodes' | 'getProjectionNode' | 'getProjectionNodesForTarget' | 'resolveProjectionTargetId' | 'getProjectionSelectionNodeIds' | 'createPatchFromAsset'>;
|
|
79
78
|
lifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;
|
|
80
79
|
getInspectorContext?: () => TContext;
|
|
81
|
-
agentContext?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>['agentContext'];
|
|
82
80
|
assetActions?: Pick<PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>, 'createAssetActionPatch' | 'createPlacedAssetPatch' | 'findCreatedId'>;
|
|
83
81
|
prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;
|
|
84
82
|
hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-product-scene-capabilities.d.ts","sourceRoot":"","sources":["../src/playable-product-scene-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yCAAyC,EACzC,yCAAyC,EACzC,qCAAqC,EACrC,8CAA8C,EAC9C,6CAA6C,EAC7C,mCAAmC,EACnC,sCAAsC,EACtC,wCAAwC,EAExC,wCAAwC,EACxC,sCAAsC,EACtC,uCAAuC,EACvC,sCAAsC,EACtC,8CAA8C,EAC9C,yCAAyC,EACzC,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,sCAAsC,EACtC,0CAA0C,EAC3C,MAAM,oCAAoC,CAAC;AAE5C,OAAO,
|
|
1
|
+
{"version":3,"file":"playable-product-scene-capabilities.d.ts","sourceRoot":"","sources":["../src/playable-product-scene-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yCAAyC,EACzC,yCAAyC,EACzC,qCAAqC,EACrC,8CAA8C,EAC9C,6CAA6C,EAC7C,mCAAmC,EACnC,sCAAsC,EACtC,wCAAwC,EAExC,wCAAwC,EACxC,sCAAsC,EACtC,uCAAuC,EACvC,sCAAsC,EACtC,8CAA8C,EAC9C,yCAAyC,EACzC,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,sCAAsC,EACtC,0CAA0C,EAC3C,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAOL,mCAAmC,EACnC,gDAAgD,EAChD,wCAAwC,EACxC,kCAAkC,EAIlC,0CAA0C,EAE1C,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAE1B,KAAK,kCAAkC,EACxC,MAAM,gCAAgC,CAAC;AAIxC,MAAM,WAAW,+CAA+C,CAAC,SAAS,EAAE,MAAM;IAChF,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC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KAClH,CAAC;CACH;AAED,MAAM,WAAW,gCAAgC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CACzE,SAAQ,oCAAoC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC;IACvE,iBAAiB,CACf,OAAO,EAAE,sCAAsC,CAAC,SAAS,CAAC,GACzD,0CAA0C,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1E;AAED,wBAAgB,sCAAsC,CACpD,SAAS,SAAS,mBAAmB,CAAC,WAAW,CAAC,EAClD,WAAW,SAAS,qBAAqB,EACzC,MAAM,EACN,MAAM,SAAS,2BAA2B,EAC1C,QAAQ,EAER,KAAK,EAAE,qCAAqC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GAC7F,gCAAgC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAoJ7D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH, assertPlayableEditorSceneDocumentContract, createEditorSceneSerializedMultiTransformPatch, createEditorSceneTransformBatchPatch, createEditorSceneTransformPatch, getEditorScenePrefabStageDescriptor, getEditorScenePrefabStageProjectionNodeIdForNode, getEditorScenePrefabStageProjectionNodes, getEditorScenePrefabStageStructure, resolveEditorSceneAssetLibraryItemRelativePath, resolveEditorSceneLightingPreviewProfile, resolveEditorSceneMaterialSlotReimportDiff, resolveEditorScenePrefabStagePreviewTarget, toEditorSceneLocalTransformFromWorld, } from '@fps-games/editor-playable-sdk';
|
|
1
|
+
import { EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH, assertPlayableEditorSceneDocumentContract, createEditorSceneSerializedMultiTransformPatch, createEditorSceneTransformBatchPatch, createEditorSceneTransformPatch, cloneEditorSceneDocument, getEditorScenePrefabStageDescriptor, getEditorScenePrefabStageProjectionNodeIdForNode, getEditorScenePrefabStageProjectionNodes, getEditorScenePrefabStageStructure, resolveEditorSceneAssetLibraryItemRelativePath, resolveEditorSceneLightingPreviewProfile, resolveEditorSceneMaterialSlotReimportDiff, resolveEditorScenePrefabStagePreviewTarget, toEditorSceneLocalTransformFromWorld, } from '@fps-games/editor-playable-sdk';
|
|
2
2
|
import { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';
|
|
3
3
|
export function prepareFpsGameEditorStandardDocument(input) {
|
|
4
4
|
return input.normalizeHierarchyDocument(input.ensureEnvironmentDefaults(input.hydrateDocumentAssets(input.document, input.assets)));
|
|
@@ -104,8 +104,10 @@ export function createFpsGameEditorPlayableProjectHostAssembly(input) {
|
|
|
104
104
|
},
|
|
105
105
|
summarize: input.projectServices.summarize,
|
|
106
106
|
},
|
|
107
|
-
getInspectorContext: () => ({
|
|
108
|
-
|
|
107
|
+
getInspectorContext: () => ({
|
|
108
|
+
textureAssets: projection.createEditorSceneInspectorTextureAssets(assets),
|
|
109
|
+
resolveTextureAssetUrl: (textureId) => (projection.resolveEditorSceneTextureRefUrl(assets, { textureAssetId: textureId })),
|
|
110
|
+
}),
|
|
109
111
|
assetActions: { createAssetActionPatch: input.createAssetActionPatch },
|
|
110
112
|
prefabStage: {
|
|
111
113
|
getPrefabStageDescriptor: prefab?.getDescriptor ?? getEditorScenePrefabStageDescriptor,
|
|
@@ -145,7 +147,7 @@ export function createFpsGameEditorPlayableProjectHostAssembly(input) {
|
|
|
145
147
|
world: input.world,
|
|
146
148
|
createGrid: projection.createEditorGrid,
|
|
147
149
|
lifecycle: { loadingContent: input.loadingContent ?? DEFAULT_PLAYABLE_PROJECT_LOADING_CONTENT, beforeDiscardAndRunGame: input.rendering.reset },
|
|
148
|
-
forgePlay: { window: input.runtimeWindow, hasUnsavedPlatformChanges: input.rendering.isDirty, handleProjectAssetCommand: input.projectServices.handleProjectAssetCommand, exportDocument: ({ harness, payload, saveState }) => input.projectServices.exportDocument(harness, payload, saveState), reportError: input.reportError },
|
|
150
|
+
forgePlay: { window: input.runtimeWindow, hasUnsavedPlatformChanges: input.rendering.isDirty, handleProjectAssetCommand: input.projectServices.handleProjectAssetCommand, exportDocument: ({ harness, payload, saveState, postEvent }) => input.projectServices.exportDocument(harness, payload, saveState, postEvent), reportError: input.reportError },
|
|
149
151
|
},
|
|
150
152
|
});
|
|
151
153
|
}
|
|
@@ -160,7 +162,6 @@ export function createFpsGameEditorProductSceneHostOptions(input) {
|
|
|
160
162
|
selection: input.selection,
|
|
161
163
|
inspector: input.inspector,
|
|
162
164
|
assetBrowser: input.assetBrowser,
|
|
163
|
-
agentContext: input.agentContext,
|
|
164
165
|
markerGraph: input.markerGraph,
|
|
165
166
|
assetActions: input.assetActions,
|
|
166
167
|
prefabStage: input.prefabStage,
|
|
@@ -258,7 +259,6 @@ export function createFpsGameEditorProductHostAssembly(input) {
|
|
|
258
259
|
assetBrowser: {
|
|
259
260
|
getBrowserAssetItems: scene.createBrowserAssetItems,
|
|
260
261
|
},
|
|
261
|
-
agentContext: input.agentContext,
|
|
262
262
|
markerGraph: {
|
|
263
263
|
getMarkerGraph: scene.getMarkerGraph,
|
|
264
264
|
getMarkerTypeCatalog: scene.getMarkerTypeCatalog,
|
|
@@ -321,6 +321,9 @@ export function createFpsGameEditorProductHostAssembly(input) {
|
|
|
321
321
|
worldPreview: input.worldPreview,
|
|
322
322
|
rendering: input.rendering,
|
|
323
323
|
});
|
|
324
|
+
Object.assign(sceneHostOptions.documentAdapter, {
|
|
325
|
+
cloneDocument: (document) => cloneEditorSceneDocument(document),
|
|
326
|
+
});
|
|
324
327
|
return {
|
|
325
328
|
...sceneHostOptions,
|
|
326
329
|
createHostOptions(context) {
|
|
@@ -370,6 +373,8 @@ function isProductHierarchyStructureChange(command) {
|
|
|
370
373
|
}
|
|
371
374
|
}
|
|
372
375
|
const patch = command.patch;
|
|
376
|
+
if (isBoundedHierarchyLabelOnlyChange(command, patch))
|
|
377
|
+
return false;
|
|
373
378
|
if (patch?.kind === 'game-object.transform' || patch?.kind === 'game-object.transform-batch')
|
|
374
379
|
return false;
|
|
375
380
|
if (patch?.kind === 'game-object.field'
|
|
@@ -399,6 +404,28 @@ function isProductHierarchyStructureChange(command) {
|
|
|
399
404
|
return false;
|
|
400
405
|
return true;
|
|
401
406
|
}
|
|
407
|
+
function isBoundedHierarchyLabelOnlyChange(command, patch) {
|
|
408
|
+
const isLabelOnlyPatch = patch?.kind === 'game-object.rename'
|
|
409
|
+
|| ((patch?.kind === 'game-object.field'
|
|
410
|
+
|| patch?.kind === 'game-object.field-batch'
|
|
411
|
+
|| patch?.kind === 'serialized-property')
|
|
412
|
+
&& patch.path === 'name');
|
|
413
|
+
if (!isLabelOnlyPatch)
|
|
414
|
+
return false;
|
|
415
|
+
const hierarchy = command.presentationImpact?.hierarchy;
|
|
416
|
+
if (!hierarchy || hierarchy === 'full')
|
|
417
|
+
return false;
|
|
418
|
+
const targetIds = [
|
|
419
|
+
...(typeof patch.targetId === 'string' ? [patch.targetId] : []),
|
|
420
|
+
...(Array.isArray(patch.targetIds)
|
|
421
|
+
? patch.targetIds.filter((id) => typeof id === 'string')
|
|
422
|
+
: []),
|
|
423
|
+
];
|
|
424
|
+
if (targetIds.length === 0)
|
|
425
|
+
return false;
|
|
426
|
+
const labelIds = new Set(hierarchy.labelIds);
|
|
427
|
+
return targetIds.every(id => labelIds.has(id));
|
|
428
|
+
}
|
|
402
429
|
function isHierarchyVisiblePropertyPath(path) {
|
|
403
430
|
const normalized = path.trim();
|
|
404
431
|
return normalized === 'name'
|