@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.2
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/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
- package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
- package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
- package/dist/build-info.json +43 -43
- package/dist/internal/material-preview.d.ts +22 -0
- package/dist/internal/material-preview.d.ts.map +1 -0
- package/dist/internal/material-preview.js +186 -0
- package/dist/internal/material-preview.js.map +1 -0
- package/dist/internal/project-model-preview.d.ts +4 -0
- package/dist/internal/project-model-preview.d.ts.map +1 -0
- package/dist/internal/project-model-preview.js +359 -0
- package/dist/internal/project-model-preview.js.map +1 -0
- package/dist/local-editor-agent-context.d.ts +12 -1
- package/dist/local-editor-agent-context.d.ts.map +1 -1
- package/dist/local-editor-agent-context.js +47 -0
- package/dist/local-editor-agent-context.js.map +1 -1
- package/dist/local-editor-harness.d.ts +15 -2
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +310 -21
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-tools.d.ts +1 -0
- package/dist/local-editor-tools.d.ts.map +1 -1
- package/dist/local-editor-tools.js +3 -0
- package/dist/local-editor-tools.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +4 -0
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +27 -0
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +9 -3
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +5 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +7 -7
- package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
- package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
- 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 +150 -4
- 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 +1 -0
- 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 +249 -15
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -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 +321 -60
- 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-prefab-stage.d.ts +2 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
- 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-workbench.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
- 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 +1463 -356
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
- package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
- 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 +40 -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/vite/index.d.ts +1 -0
- 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 +1 -0
- 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/product-authoring-api.d.ts +1 -0
- 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 +94 -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-file-handle.d.ts +14 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.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/dist/editor-ui-theme.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
- 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 +5 -5
- 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 +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-product-scene-capabilities.js","sourceRoot":"","sources":["../src/playable-product-scene-capabilities.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,2CAA2C,EAC3C,yCAAyC,EACzC,8CAA8C,EAC9C,oCAAoC,EACpC,+BAA+B,EAC/B,mCAAmC,EACnC,gDAAgD,EAChD,wCAAwC,EACxC,kCAAkC,EAClC,wCAAwC,EACxC,0CAA0C,EAC1C,0CAA0C,EAC1C,oCAAoC,GAMrC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAoCxF,MAAM,UAAU,oCAAoC,CAClD,KAAkE;IAElE,OAAO,KAAK,CAAC,0BAA0B,CACrC,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAC3F,CAAC;AACJ,CAAC;AAED,MAAM,wCAAwC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC7E,SAAS,EAAE,MA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K,4BAA4B;WAC3C,KAAK,CAAC,IAAI,KAAK,sBAAsB;WACrC,KAAK,CAAC,IAAI,KAAK,4BAA4B;WAC3C,KAAK,CAAC,IAAI,KAAK,6BAA6B,CAChD;QAAE,OAAO,IAAI,CAAC;IACf,IAAI,MAAM,EAAE,IAAI,KAAK,aAAa,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAC/F,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,8BAA8B,CAAC,IAAY;IAClD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC/B,OAAO,UAAU,KAAK,MAAM;WACvB,UAAU,KAAK,OAAO;WACtB,UAAU,KAAK,UAAU;WACzB,UAAU,KAAK,QAAQ;WACvB,UAAU,KAAK,SAAS;WACxB,UAAU,KAAK,QAAQ;WACvB,UAAU,KAAK,MAAM;WACrB,UAAU,KAAK,eAAe,CAAC;AACtC,CAAC;AAED,SAAS,8BAA8B,CACrC,cAAyB,EACzB,aAAwB;IAExB,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7F,OAAO,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC;AACvG,CAAC","sourcesContent":["import type {\n PlayableLocalEditorAssetActionsCapability,\n PlayableLocalEditorAssetBrowserCapability,\n PlayableLocalEditorDocumentCapability,\n PlayableLocalEditorDocumentLifecycleCapability,\n PlayableLocalEditorHierarchyActionsCapability,\n PlayableLocalEditorHostCapabilities,\n PlayableLocalEditorInspectorCapability,\n PlayableLocalEditorMarkerGraphCapability,\n PlayableLocalEditorPatchResult,\n PlayableLocalEditorPrefabStageCapability,\n PlayableLocalEditorRenderingCapability,\n PlayableLocalEditorSceneGraphCapability,\n PlayableLocalEditorSelectionCapability,\n PlayableLocalEditorTransformCommandsCapability,\n PlayableLocalEditorWorldPreviewCapability,\n PlayableLocalEditorHarnessApi,\n} from './playable-local-editor-host.js';\nimport type {\n FpsGameEditorProductLocalEditorContext,\n FpsGameEditorProductLocalEditorHostOptions,\n} from './playable-product-local-editor.js';\nimport type { DocumentCommand } from '@fps-games/editor-core';\nimport {\n EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH,\n assertPlayableEditorSceneDocumentContract,\n createEditorSceneSerializedMultiTransformPatch,\n createEditorSceneTransformBatchPatch,\n createEditorSceneTransformPatch,\n getEditorScenePrefabStageDescriptor,\n getEditorScenePrefabStageProjectionNodeIdForNode,\n getEditorScenePrefabStageProjectionNodes,\n getEditorScenePrefabStageStructure,\n resolveEditorSceneLightingPreviewProfile,\n resolveEditorSceneMaterialSlotReimportDiff,\n resolveEditorScenePrefabStagePreviewTarget,\n toEditorSceneLocalTransformFromWorld,\n type EditorSceneAssetLibraryItem,\n type EditorSceneDocument,\n type EditorSceneGameObject,\n type EditorSceneMaterialDocument,\n type FpsGameEditorStandardSceneAssembly,\n} from '@fps-games/editor-playable-sdk';\nimport type { EditorDiagnostic, EditorDiagnosticPhase } from '@fps-games/editor-protocol';\nimport { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';\n\nexport interface FpsGameEditorPlayableProjectHostAssemblyOptions<TDocument, TAsset> {\n scene: any;\n projection: any;\n sceneSource: any;\n rendering: any;\n projectServices: any;\n /** Overrides for projects whose prefab document semantics differ from the standard scene contract. */\n prefab?: Partial<{\n getDescriptor: typeof getEditorScenePrefabStageDescriptor;\n getProjectionNodes: typeof getEditorScenePrefabStageProjectionNodes;\n getStructure: typeof getEditorScenePrefabStageStructure;\n getInspectorObject: FpsGameEditorStandardSceneAssembly<any, any, any, any, any>['getPrefabStageInspectorObject'];\n resolvePreviewTarget: typeof resolveEditorScenePrefabStagePreviewTarget;\n getProjectionNodeId: typeof getEditorScenePrefabStageProjectionNodeIdForNode;\n }>;\n prepareDocument?(document: TDocument, assets: TAsset[]): TDocument;\n createAssetActionPatch(input: any): any;\n hierarchyOperations?: NonNullable<PlayableLocalEditorHierarchyActionsCapability<TDocument, any>['operations']>;\n loadingContent?: any;\n runtimeWindow: Window;\n gameModeEntryVisible?: boolean;\n loadBabylon(): Promise<any>;\n world?: { cameraTarget?: { x: number; y: number; z: number }; cameraRadius?: number; clearColor?: { r: number; g: number; b: number; a: number }; useRightHandedSystem?: boolean; selectionEdgesPrewarm?: 'eager' | 'lazy' };\n reportError?(error: unknown): void;\n}\n\ninterface FpsGameEditorStandardDocumentPreparation<TDocument, TAsset> {\n document: TDocument;\n assets: TAsset[];\n hydrateDocumentAssets(document: TDocument, assets: TAsset[]): TDocument;\n ensureEnvironmentDefaults(document: TDocument): TDocument;\n normalizeHierarchyDocument(document: TDocument): TDocument;\n}\n\nexport function prepareFpsGameEditorStandardDocument<TDocument, TAsset>(\n input: FpsGameEditorStandardDocumentPreparation<TDocument, TAsset>,\n): TDocument {\n return input.normalizeHierarchyDocument(\n input.ensureEnvironmentDefaults(input.hydrateDocumentAssets(input.document, input.assets)),\n );\n}\n\nconst DEFAULT_PLAYABLE_PROJECT_LOADING_CONTENT = Object.freeze({\n enter: Object.freeze({ title: '正在进入编辑界面…', description: '正在加载场景数据和编辑器,请稍候' }),\n saveScene: Object.freeze({ title: '正在保存场景…', description: '正在写入场景数据,请稍候' }),\n saveAndRunGame: Object.freeze({ title: '正在保存并退出…', description: '正在写入场景并返回游戏,请稍候' }),\n discardAndRunGame: Object.freeze({ title: '正在放弃变更并退出…', description: '正在恢复游戏场景,请稍候' }),\n assetImport: Object.freeze({ title: '正在添加资源…', description: '正在检查资产库并实例化资源,请稍候' }),\n});\n\nexport function createFpsGameEditorPlayableProjectHostAssembly<TDocument, TAsset extends EditorSceneAssetLibraryItem>(\n input: FpsGameEditorPlayableProjectHostAssemblyOptions<TDocument, TAsset>,\n) {\n let assets: TAsset[] = [];\n const scene = input.scene;\n const projection = input.projection;\n const prefab = input.prefab;\n const setAssets = (nextAssets: TAsset[]): TAsset[] => {\n assets = nextAssets;\n input.rendering.setTextures(projection.createEditorSceneInspectorTextureAssets(assets));\n return assets;\n };\n const hydrateDocumentAssets = (document: TDocument, nextAssets: TAsset[]): TDocument => (\n input.projectServices.hydrateDocumentAssets?.(document, nextAssets) ?? document\n );\n const prepareDocument = (document: TDocument, nextAssets: TAsset[]): TDocument => {\n if (input.prepareDocument) return input.prepareDocument(document, nextAssets);\n return prepareFpsGameEditorStandardDocument({\n document,\n assets: nextAssets,\n hydrateDocumentAssets,\n ensureEnvironmentDefaults: scene.ensureEnvironmentDefaults,\n normalizeHierarchyDocument: scene.normalizeHierarchyDocument,\n });\n };\n return createFpsGameEditorProductHostAssembly<any, any, any, any, any>({\n scene,\n document: {\n getProjectionNodes: projection.createProjectionNodes,\n getProjectionNode: (document: any, id: string) => {\n const gameObject = document.scene.gameObjects.find((entry: any) => entry.id === id);\n return gameObject ? projection.createProjectionNode(document, gameObject) : null;\n },\n getProjectionNodesForTarget: projection.getProjectionNodesForTarget,\n resolveProjectionTargetId: projection.resolveProjectionTargetId,\n getProjectionSelectionNodeIds: projection.getProjectionSelectionNodeIds,\n createPatchFromAsset: (asset: any, request: any) => ({ label: `Add ${request?.name?.trim() || asset.displayName}`, patch: { kind: 'game-object.create-from-asset', assetItem: asset, ...(request?.name?.trim() ? { name: request.name.trim() } : {}), ...(request?.placement ? { placement: request.placement } : {}) } }),\n },\n lifecycle: {\n prepareDocument: (document: TDocument, nextAssets: TAsset[]) => prepareDocument(document, setAssets(nextAssets)),\n hydrateDocumentAssets: (document: TDocument, nextAssets: TAsset[]) => {\n const hydratedAssets = setAssets(nextAssets);\n return hydrateDocumentAssets(document, hydratedAssets);\n },\n resolveUpdatedAssetSnapshot: (nextAssets: TAsset[], update: { assetId: string }) => {\n const asset = nextAssets.find(candidate => candidate.assetId === update.assetId || candidate.id === update.assetId);\n if (!asset) return null;\n const contentHash = typeof asset.metadata?.contentHash === 'string'\n ? asset.metadata.contentHash\n : undefined;\n return {\n assetId: asset.assetId,\n ...(contentHash ? { contentHash } : {}),\n };\n },\n listAssetSnapshots: (nextAssets: TAsset[]) => nextAssets.flatMap((asset) => {\n const assetId = typeof asset.assetId === 'string' && asset.assetId.trim()\n ? asset.assetId\n : typeof asset.id === 'string' && asset.id.trim()\n ? asset.id\n : null;\n if (!assetId) return [];\n const contentHash = typeof asset.metadata?.contentHash === 'string'\n ? asset.metadata.contentHash\n : undefined;\n return [{ assetId, ...(contentHash ? { contentHash } : {}) }];\n }),\n reconcileUpdatedAsset: (document: EditorSceneMaterialDocument, update: { assetId: string }) => {\n const diffs = document.scene.gameObjects\n .map(gameObject => resolveEditorSceneMaterialSlotReimportDiff(document, gameObject))\n .filter(diff => diff.assetId === update.assetId);\n return {\n document: scene.ensureEnvironmentDefaults(document),\n reconciledBindingCount: diffs.reduce(\n (count, diff) => count + diff.bindingRemaps.length + diff.bindingRemapIssues.length,\n 0,\n ),\n warnings: diffs.flatMap(diff => [\n ...diff.bindingRemapIssues.map(issue => ({\n code: issue.reason,\n gameObjectId: diff.gameObjectId,\n slotId: issue.fromSlotId,\n materialAssetId: issue.materialAssetId,\n candidateSlotIds: issue.candidateSlotIds,\n })),\n ...diff.issues\n .filter(issue => issue.reason === 'source-material-changed')\n .map(issue => ({\n code: issue.reason,\n gameObjectId: diff.gameObjectId,\n ...(issue.slotId ? { slotId: issue.slotId } : {}),\n ...(issue.materialAssetId ? { materialAssetId: issue.materialAssetId } : {}),\n })),\n ]),\n };\n },\n summarize: input.projectServices.summarize,\n },\n getInspectorContext: () => ({ textureAssets: projection.createEditorSceneInspectorTextureAssets(assets) }),\n agentContext: input.projectServices.agentContext,\n assetActions: { createAssetActionPatch: input.createAssetActionPatch },\n prefabStage: {\n getPrefabStageDescriptor: prefab?.getDescriptor ?? getEditorScenePrefabStageDescriptor,\n getPrefabStageProjectionNodes: prefab?.getProjectionNodes ?? getEditorScenePrefabStageProjectionNodes,\n getPrefabStageStructure: prefab?.getStructure ?? getEditorScenePrefabStageStructure,\n getPrefabStageInspectorObject: prefab?.getInspectorObject ?? scene.getPrefabStageInspectorObject,\n resolvePrefabStagePreviewTarget: prefab?.resolvePreviewTarget ?? resolveEditorScenePrefabStagePreviewTarget,\n getPrefabStageProjectionNodeId: prefab?.getProjectionNodeId ?? getEditorScenePrefabStageProjectionNodeIdForNode,\n },\n hierarchyActions: {\n operations: input.hierarchyOperations ?? [],\n },\n worldPreview: {\n getSceneCameraPreviewRig: projection.createSceneCameraPreviewRig,\n getWorldAppearance: (document: any) => resolveEditorSceneLightingPreviewProfile(document, { environmentLightId: 'environment_light', sunLightId: 'sun_light', defaultEnvironmentLight: scene.defaults.environmentLight, defaultSunLight: scene.defaults.sunLight }),\n },\n rendering: input.rendering.capability,\n runtime: {\n localTestActions: input.runtimeWindow.parent === input.runtimeWindow,\n gameModeEntryVisible: input.gameModeEntryVisible,\n authoring: { drivers: [input.sceneSource.createDriver()] },\n persistenceAdapter: { loadAuthoringSource: async () => { const loaded = await input.sceneSource.load(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; }, loadAssets: input.sceneSource.loadAssets },\n worldAdapter: {\n loadPreviewEngine: async () => projection.createEditorPreviewBabylonModule(await input.loadBabylon()),\n createPreviewEngine: createBabylonEditorPreviewEngine,\n importPreviewAsset: projection.importEditorProjectionModel,\n resolveMaterialTextureUrl: (texture: unknown) => projection.resolveEditorSceneTextureRefUrl(assets, texture),\n resolveAssetId: (asset: TAsset) => asset.assetId,\n toBrowserAssetItem: (asset: any) => ({ id: asset.assetId, guid: asset.guid, assetId: asset.assetId, kind: asset.kind, label: asset.displayName, meta: asset.assetId, external: asset.external, origin: asset.origin, dedupeKey: asset.dedupeKey, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset), disabled: asset.placeable === false }),\n },\n world: input.world,\n createGrid: projection.createEditorGrid,\n lifecycle: { loadingContent: input.loadingContent ?? DEFAULT_PLAYABLE_PROJECT_LOADING_CONTENT, beforeDiscardAndRunGame: input.rendering.reset },\n forgePlay: { window: input.runtimeWindow, hasUnsavedPlatformChanges: input.rendering.isDirty, handleProjectAssetCommand: input.projectServices.handleProjectAssetCommand, exportDocument: ({ harness, payload, saveState }: any) => input.projectServices.exportDocument(harness, payload, saveState), reportError: input.reportError },\n },\n });\n}\n\nexport interface FpsGameEditorProductSceneDocumentAdapter<\n TDocument,\n TPatch,\n TAsset = unknown,\n> extends Pick<\n PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>,\n | 'reduceDocument'\n | 'getHierarchyItems'\n | 'isHierarchyStructureChange'\n | 'getProjectionNodes'\n | 'getProjectionNode'\n | 'getProjectionNodesForTarget'\n | 'resolveProjectionTargetId'\n | 'getProjectionSelectionNodeIds'\n | 'createPatchFromAsset'\n | 'createSerializedPropertyPatch'\n | 'resolveDiagnosticLocator'\n > {}\n\nexport interface FpsGameEditorProductSceneHostOptions<\n TDocument,\n TPatch,\n TAsset = unknown,\n> {\n documentAdapter: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>;\n capabilities: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>;\n}\n\nexport interface FpsGameEditorProductSceneHostOptionsInput<\n TDocument,\n TPatch,\n TAsset = unknown,\n> {\n document: FpsGameEditorProductSceneDocumentAdapter<TDocument, TPatch, TAsset>;\n lifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;\n selection?: PlayableLocalEditorSelectionCapability<TDocument>;\n inspector?: PlayableLocalEditorInspectorCapability<TDocument>;\n assetBrowser?: PlayableLocalEditorAssetBrowserCapability<TDocument>;\n agentContext?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>['agentContext'];\n markerGraph?: PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch>;\n assetActions?: PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>;\n prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;\n transformCommands?: PlayableLocalEditorTransformCommandsCapability<TDocument, TPatch>;\n sceneGraph?: PlayableLocalEditorSceneGraphCapability<TDocument, TPatch>;\n hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;\n worldPreview?: PlayableLocalEditorWorldPreviewCapability<TDocument>;\n rendering?: PlayableLocalEditorRenderingCapability<TDocument, TPatch>;\n}\n\nexport function createFpsGameEditorProductSceneHostOptions<\n TDocument,\n TPatch,\n TAsset = unknown,\n>(\n input: FpsGameEditorProductSceneHostOptionsInput<TDocument, TPatch, TAsset>,\n): FpsGameEditorProductSceneHostOptions<TDocument, TPatch, TAsset> {\n const documentAdapter: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset> = {\n ...input.document,\n };\n\n return {\n documentAdapter,\n capabilities: {\n documentLifecycle: input.lifecycle,\n selection: input.selection,\n inspector: input.inspector,\n assetBrowser: input.assetBrowser,\n agentContext: input.agentContext,\n markerGraph: input.markerGraph,\n assetActions: input.assetActions,\n prefabStage: input.prefabStage,\n transformCommands: input.transformCommands,\n sceneGraph: input.sceneGraph,\n hierarchyActions: input.hierarchyActions,\n worldPreview: input.worldPreview,\n rendering: input.rendering,\n },\n };\n}\n\nexport interface FpsGameEditorProductHostAssemblyInput<\n TDocument extends EditorSceneDocument<TGameObject>,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAsset extends EditorSceneAssetLibraryItem,\n TContext,\n> {\n scene: FpsGameEditorStandardSceneAssembly<TDocument, TGameObject, TPatch, TAsset, TContext>;\n document: Pick<\n FpsGameEditorProductSceneDocumentAdapter<TDocument, TPatch, TAsset>,\n | 'getProjectionNodes'\n | 'getProjectionNode'\n | 'getProjectionNodesForTarget'\n | 'resolveProjectionTargetId'\n | 'getProjectionSelectionNodeIds'\n | 'createPatchFromAsset'\n >;\n lifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;\n getInspectorContext?: () => TContext;\n agentContext?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>['agentContext'];\n assetActions?: Pick<\n PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>,\n 'createAssetActionPatch' | 'createPlacedAssetPatch' | 'findCreatedId'\n >;\n prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;\n hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;\n worldPreview?: PlayableLocalEditorWorldPreviewCapability<TDocument>;\n rendering?: PlayableLocalEditorRenderingCapability<TDocument, TPatch>;\n runtime?: FpsGameEditorProductHostRuntimeOptions<TDocument, TPatch, TAsset>;\n}\n\ntype FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset> = NonNullable<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>['forgePlay']\n>;\n\nfunction collectProductEditorSceneDocumentDiagnostics(\n document: EditorSceneDocument,\n phase: EditorDiagnosticPhase,\n): EditorDiagnostic[] {\n try {\n assertPlayableEditorSceneDocumentContract(document);\n return [];\n } catch (error) {\n const record = error && typeof error === 'object'\n ? error as { code?: unknown; path?: unknown; message?: unknown }\n : null;\n const path = typeof record?.path === 'string' ? record.path : undefined;\n const code = classifyProductDocumentValidationCode(document, path)\n ?? (typeof record?.code === 'string'\n ? `document-${record.code.replace(/\\./g, '-')}`\n : 'document-contract-invalid');\n return [{\n code,\n severity: 'error',\n phase,\n source: 'document',\n producer: 'document-validation',\n message: typeof record?.message === 'string' ? record.message : String(error),\n suggestion: path\n ? `检查诊断详情中的文档路径 ${path},修复无效或重复的数据后重新验证。`\n : '检查当前 Scene Document 的结构完整性后重新验证。',\n subject: { kind: 'document' },\n ...(path ? {\n details: { path },\n } : {}),\n }];\n }\n}\n\nfunction classifyProductDocumentValidationCode(\n document: EditorSceneDocument,\n path: string | undefined,\n): string | null {\n if (!path) return null;\n const assetMatch = /^\\$\\.assets\\[(\\d+)\\]\\.id$/.exec(path);\n if (assetMatch && hasDuplicateIdAtIndex(document.assets, Number(assetMatch[1]))) {\n return 'document-asset-id-duplicate';\n }\n const objectMatch = /^\\$\\.scene\\.gameObjects\\[(\\d+)\\]\\.id$/.exec(path);\n if (objectMatch && hasDuplicateIdAtIndex(document.scene.gameObjects, Number(objectMatch[1]))) {\n return 'document-game-object-id-duplicate';\n }\n return null;\n}\n\nfunction hasDuplicateIdAtIndex(values: readonly { id?: unknown }[], index: number): boolean {\n const id = typeof values[index]?.id === 'string' ? values[index].id : null;\n return !!id && values.filter(value => value.id === id).length > 1;\n}\n\nexport interface FpsGameEditorProductHostRuntimeOptions<TDocument, TPatch, TAsset> extends Omit<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>,\n 'documentAdapter' | 'capabilities' | 'persistenceAdapter' | 'worldAdapter' | 'forgePlay'\n> {\n persistenceAdapter: Omit<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>['persistenceAdapter'],\n 'runGame'\n >;\n worldAdapter: Omit<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>['worldAdapter'],\n 'disposeWorld' | 'disposeGameWorld' | 'getCanvas'\n >;\n forgePlay?: Omit<\n FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>,\n 'handleAssetDrop' | 'handleProjectAssetCommand' | 'exportDocument'\n > & {\n handleProjectAssetCommand?: (\n bridgeContext: Parameters<NonNullable<FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>['handleProjectAssetCommand']>>[0],\n normalizeLoadedPlatformAssetPayload: (payload: Record<string, unknown>) => Record<string, unknown>,\n ) => Promise<void> | void;\n exportDocument?: (input: Parameters<NonNullable<FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>['exportDocument']>>[0] & {\n harness: PlayableLocalEditorHarnessApi<TDocument>;\n }) => ReturnType<NonNullable<FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>['exportDocument']>>;\n };\n}\n\nexport interface FpsGameEditorProductHostAssembly<TDocument, TPatch, TAsset>\n extends FpsGameEditorProductSceneHostOptions<TDocument, TPatch, TAsset> {\n createHostOptions(\n context: FpsGameEditorProductLocalEditorContext<TDocument>,\n ): FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>;\n}\n\nexport function createFpsGameEditorProductHostAssembly<\n TDocument extends EditorSceneDocument<TGameObject>,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAsset extends EditorSceneAssetLibraryItem,\n TContext,\n>(\n input: FpsGameEditorProductHostAssemblyInput<TDocument, TGameObject, TPatch, TAsset, TContext>,\n): FpsGameEditorProductHostAssembly<TDocument, TPatch, TAsset> {\n const scene = input.scene;\n const inspectorContext = (): TContext => input.getInspectorContext?.() ?? ({} as TContext);\n const projectValidateDocument = input.lifecycle?.validateDocument;\n const documentLifecycleCapabilities: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset> = {\n ...input.lifecycle,\n validateDocument: (document, context) => [\n ...collectProductEditorSceneDocumentDiagnostics(document, context.phase),\n ...(projectValidateDocument?.(document, context) ?? []),\n ],\n };\n const sceneHostOptions = createFpsGameEditorProductSceneHostOptions<TDocument, TPatch, TAsset>({\n document: {\n reduceDocument: scene.reduceDocument,\n getHierarchyItems: scene.getHierarchyItems,\n isHierarchyStructureChange: isProductHierarchyStructureChange,\n getProjectionNodes: input.document.getProjectionNodes,\n getProjectionNode: input.document.getProjectionNode,\n getProjectionNodesForTarget: input.document.getProjectionNodesForTarget,\n resolveProjectionTargetId: input.document.resolveProjectionTargetId,\n getProjectionSelectionNodeIds: input.document.getProjectionSelectionNodeIds,\n createPatchFromAsset: input.document.createPatchFromAsset,\n createSerializedPropertyPatch: scene.createInspectorPropertyPatch,\n resolveDiagnosticLocator: scene.resolveDiagnosticLocator,\n },\n lifecycle: documentLifecycleCapabilities,\n selection: {\n isSelectable: scene.isSelectableHierarchyId,\n isLocked: () => false,\n },\n inspector: {\n getInspectorObject: (document, activeId) => scene.getInspectorObject(document, activeId, inspectorContext()),\n getInspectorMultiObject: (document, selectedIds, activeId) => scene.getInspectorMultiObject(\n document,\n selectedIds,\n activeId,\n inspectorContext(),\n ),\n getRuntimeInspectorSections: scene.getRuntimeInspectorSections,\n },\n assetBrowser: {\n getBrowserAssetItems: scene.createBrowserAssetItems,\n },\n agentContext: input.agentContext,\n markerGraph: {\n getMarkerGraph: scene.getMarkerGraph,\n getMarkerTypeCatalog: scene.getMarkerTypeCatalog,\n getRelationTypeCatalog: scene.getRelationTypeCatalog,\n getPrefabInstanceMarkerOverlays: scene.getPrefabInstanceMarkerOverlays,\n getPrefabStageMarkerOverlays: scene.getPrefabStageMarkerOverlays,\n createMarkerGraphPatch: scene.createMarkerGraphPatch,\n },\n assetActions: {\n ...input.assetActions,\n createPlacedAssetPatch: input.assetActions?.createPlacedAssetPatch ?? ((command) => {\n if (!command.asset || !command.hit) return null;\n return scene.createPlacedAssetPatch({\n document: command.document,\n asset: command.asset,\n hit: command.hit as any,\n }) as PlayableLocalEditorPatchResult<TPatch> | null;\n }),\n findCreatedId: input.assetActions?.findCreatedId ?? findCreatedEditorSceneObjectId,\n },\n prefabStage: input.prefabStage,\n transformCommands: {\n canCreateSerializedMultiPropertyPatch(command) {\n return command.path.startsWith('transform.')\n || command.path === EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH\n || scene.canCreateSerializedMultiPropertyPatch(command);\n },\n createSerializedMultiPropertyPatch(command) {\n const scenePatch = scene.createSerializedMultiPropertyPatch(command);\n if (scenePatch) return scenePatch;\n if (command.targetIds.some(targetId => !scene.createInspectorPropertyPatch({\n document: command.document,\n targetId,\n path: command.path,\n value: command.value,\n }))) return null;\n return createEditorSceneSerializedMultiTransformPatch(command) as ReturnType<typeof scene.createSerializedMultiPropertyPatch>;\n },\n createTransformInspectorPreview: command => toEditorSceneLocalTransformFromWorld(\n command.document,\n command.targetId,\n command.transform,\n ),\n createTransformPatch: command => createEditorSceneTransformPatch(command as any) as any,\n createTransformBatchPatch: command => createEditorSceneTransformBatchPatch(command as any) as any,\n createDuplicateSelectionPatch: scene.createDuplicateSelectionPatch,\n },\n sceneGraph: {\n validateSceneGraphDrop: scene.validateReparent,\n validateSceneGraphMove: scene.validateHierarchyMove,\n validateSceneGraphGroupSelection: scene.validateGroupSelection,\n createSceneGraphRenamePatch: scene.createRenamePatch,\n createSceneGraphCreateGroupPatch: scene.createCreateGroupPatch,\n createSceneGraphCreatePrimitivePatch: scene.createCreatePrimitivePatch,\n createSceneGraphDeletePatch: scene.createDeleteSubtreePatch,\n createSceneGraphDropPatch: scene.createReparentPatch,\n createSceneGraphMovePatch: scene.createHierarchyMovePatch,\n createSceneGraphGroupSelectionPatch: scene.createGroupSelectionPatch,\n },\n hierarchyActions: input.hierarchyActions,\n worldPreview: input.worldPreview,\n rendering: input.rendering,\n });\n return {\n ...sceneHostOptions,\n createHostOptions(context) {\n const runtime = input.runtime;\n if (!runtime) {\n throw new Error('createFpsGameEditorProductHostAssembly requires runtime options before mounting.');\n }\n const { forgePlay, ...runtimeHostOptions } = runtime;\n return {\n ...runtimeHostOptions,\n ...sceneHostOptions,\n persistenceAdapter: {\n ...runtime.persistenceAdapter,\n },\n worldAdapter: {\n ...runtime.worldAdapter,\n },\n ...(forgePlay ? {\n forgePlay: {\n ...forgePlay,\n handleAssetDrop: context.rememberPlatformAssetDrop,\n handleProjectAssetCommand: forgePlay.handleProjectAssetCommand\n ? bridgeContext => forgePlay.handleProjectAssetCommand?.(\n bridgeContext,\n context.normalizeLoadedPlatformAssetPayload,\n )\n : undefined,\n exportDocument: forgePlay.exportDocument\n ? (exportInput) => {\n const harness = context.getHost()?.harness;\n if (!harness) throw new Error('editor_host_unavailable');\n return forgePlay.exportDocument!({ ...exportInput, harness });\n }\n : undefined,\n },\n } : {}),\n };\n },\n };\n}\n\nfunction isProductHierarchyStructureChange<TDocument, TPatch>(\n command: DocumentCommand<TDocument, TPatch>,\n): boolean {\n if (command.type === 'document.replace') return true;\n const impact = command.projectionImpact;\n if (impact?.type === 'incremental') {\n if ((impact.createdNodeIds?.length ?? 0) > 0\n || (impact.deletedNodeIds?.length ?? 0) > 0) {\n return true;\n }\n }\n const patch = command.patch as { kind?: unknown; path?: unknown } | null | undefined;\n if (patch?.kind === 'game-object.transform' || patch?.kind === 'game-object.transform-batch') return false;\n if (patch?.kind === 'game-object.field'\n || patch?.kind === 'game-object.field-batch'\n || patch?.kind === 'serialized-property') {\n return typeof patch.path !== 'string' || isHierarchyVisiblePropertyPath(patch.path);\n }\n if (typeof patch?.kind === 'string' && (\n patch.kind === 'game-object.rendering-alpha-index-migration'\n || patch.kind.startsWith('scene.material-asset.')\n || patch.kind === 'scene.prefab-material-asset.duplicate-and-bind'\n )) return false;\n if (typeof patch?.kind === 'string' && patch.kind.startsWith('scene.prefab-asset.')) return true;\n if (patch?.kind === 'scene.marker-graph') return true;\n if (typeof patch?.kind === 'string' && (\n patch.kind === 'game-object.create-from-asset'\n || patch.kind === 'game-object.duplicate-selection'\n || patch.kind === 'game-object.rename'\n || patch.kind === 'game-object.create-group'\n || patch.kind === 'game-object.create-primitive'\n || patch.kind === 'game-object.delete-subtree'\n || patch.kind === 'game-object.reparent'\n || patch.kind === 'game-object.hierarchy-move'\n || patch.kind === 'game-object.group-selection'\n )) return true;\n if (impact?.type === 'incremental' && (impact.syncTransformIds?.length ?? 0) > 0) return false;\n return true;\n}\n\nfunction isHierarchyVisiblePropertyPath(path: string): boolean {\n const normalized = path.trim();\n return normalized === 'name'\n || normalized === 'label'\n || normalized === 'parentId'\n || normalized === 'active'\n || normalized === 'enabled'\n || normalized === 'locked'\n || normalized === 'kind'\n || normalized === 'transformType';\n}\n\nfunction findCreatedEditorSceneObjectId<TDocument extends EditorSceneDocument>(\n beforeDocument: TDocument,\n afterDocument: TDocument,\n): string | null {\n const beforeIds = new Set(beforeDocument.scene.gameObjects.map(gameObject => gameObject.id));\n return afterDocument.scene.gameObjects.find(gameObject => !beforeIds.has(gameObject.id))?.id ?? null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"playable-product-scene-capabilities.js","sourceRoot":"","sources":["../src/playable-product-scene-capabilities.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,2CAA2C,EAC3C,yCAAyC,EACzC,8CAA8C,EAC9C,oCAAoC,EACpC,+BAA+B,EAC/B,mCAAmC,EACnC,gDAAgD,EAChD,wCAAwC,EACxC,kCAAkC,EAClC,8CAA8C,EAC9C,wCAAwC,EACxC,0CAA0C,EAC1C,0CAA0C,EAC1C,oCAAoC,GAMrC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAoCxF,MAAM,UAAU,oCAAoC,CAClD,KAAkE;IAElE,OAAO,KAAK,CAAC,0BAA0B,CACrC,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAC3F,CAAC;AACJ,CAAC;AAED,MAAM,wCAAwC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC7E,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;IAC3E,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACpF,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;IACtF,WAAW,EAAE,MAAM,CAAC,MAAM,CAA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C,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC;AACvG,CAAC","sourcesContent":["import type {\n PlayableLocalEditorAssetActionsCapability,\n PlayableLocalEditorAssetBrowserCapability,\n PlayableLocalEditorDocumentCapability,\n PlayableLocalEditorDocumentLifecycleCapability,\n PlayableLocalEditorHierarchyActionsCapability,\n PlayableLocalEditorHostCapabilities,\n PlayableLocalEditorInspectorCapability,\n PlayableLocalEditorMarkerGraphCapability,\n PlayableLocalEditorPatchResult,\n PlayableLocalEditorPrefabStageCapability,\n PlayableLocalEditorRenderingCapability,\n PlayableLocalEditorSceneGraphCapability,\n PlayableLocalEditorSelectionCapability,\n PlayableLocalEditorTransformCommandsCapability,\n PlayableLocalEditorWorldPreviewCapability,\n PlayableLocalEditorHarnessApi,\n} from './playable-local-editor-host.js';\nimport type {\n FpsGameEditorProductLocalEditorContext,\n FpsGameEditorProductLocalEditorHostOptions,\n} from './playable-product-local-editor.js';\nimport type { DocumentCommand } from '@fps-games/editor-core';\nimport {\n EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH,\n assertPlayableEditorSceneDocumentContract,\n createEditorSceneSerializedMultiTransformPatch,\n createEditorSceneTransformBatchPatch,\n createEditorSceneTransformPatch,\n getEditorScenePrefabStageDescriptor,\n getEditorScenePrefabStageProjectionNodeIdForNode,\n getEditorScenePrefabStageProjectionNodes,\n getEditorScenePrefabStageStructure,\n resolveEditorSceneAssetLibraryItemRelativePath,\n resolveEditorSceneLightingPreviewProfile,\n resolveEditorSceneMaterialSlotReimportDiff,\n resolveEditorScenePrefabStagePreviewTarget,\n toEditorSceneLocalTransformFromWorld,\n type EditorSceneAssetLibraryItem,\n type EditorSceneDocument,\n type EditorSceneGameObject,\n type EditorSceneMaterialDocument,\n type FpsGameEditorStandardSceneAssembly,\n} from '@fps-games/editor-playable-sdk';\nimport type { EditorDiagnostic, EditorDiagnosticPhase } from '@fps-games/editor-protocol';\nimport { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';\n\nexport interface FpsGameEditorPlayableProjectHostAssemblyOptions<TDocument, TAsset> {\n scene: any;\n projection: any;\n sceneSource: any;\n rendering: any;\n projectServices: any;\n /** Overrides for projects whose prefab document semantics differ from the standard scene contract. */\n prefab?: Partial<{\n getDescriptor: typeof getEditorScenePrefabStageDescriptor;\n getProjectionNodes: typeof getEditorScenePrefabStageProjectionNodes;\n getStructure: typeof getEditorScenePrefabStageStructure;\n getInspectorObject: FpsGameEditorStandardSceneAssembly<any, any, any, any, any>['getPrefabStageInspectorObject'];\n resolvePreviewTarget: typeof resolveEditorScenePrefabStagePreviewTarget;\n getProjectionNodeId: typeof getEditorScenePrefabStageProjectionNodeIdForNode;\n }>;\n prepareDocument?(document: TDocument, assets: TAsset[]): TDocument;\n createAssetActionPatch(input: any): any;\n hierarchyOperations?: NonNullable<PlayableLocalEditorHierarchyActionsCapability<TDocument, any>['operations']>;\n loadingContent?: any;\n runtimeWindow: Window;\n gameModeEntryVisible?: boolean;\n loadBabylon(): Promise<any>;\n world?: { cameraTarget?: { x: number; y: number; z: number }; cameraRadius?: number; clearColor?: { r: number; g: number; b: number; a: number }; useRightHandedSystem?: boolean; selectionEdgesPrewarm?: 'eager' | 'lazy' };\n reportError?(error: unknown): void;\n}\n\ninterface FpsGameEditorStandardDocumentPreparation<TDocument, TAsset> {\n document: TDocument;\n assets: TAsset[];\n hydrateDocumentAssets(document: TDocument, assets: TAsset[]): TDocument;\n ensureEnvironmentDefaults(document: TDocument): TDocument;\n normalizeHierarchyDocument(document: TDocument): TDocument;\n}\n\nexport function prepareFpsGameEditorStandardDocument<TDocument, TAsset>(\n input: FpsGameEditorStandardDocumentPreparation<TDocument, TAsset>,\n): TDocument {\n return input.normalizeHierarchyDocument(\n input.ensureEnvironmentDefaults(input.hydrateDocumentAssets(input.document, input.assets)),\n );\n}\n\nconst DEFAULT_PLAYABLE_PROJECT_LOADING_CONTENT = Object.freeze({\n enter: Object.freeze({ title: '正在进入编辑界面…', description: '正在加载场景数据和编辑器,请稍候' }),\n saveScene: Object.freeze({ title: '正在保存场景…', description: '正在写入场景数据,请稍候' }),\n saveAndRunGame: Object.freeze({ title: '正在保存并退出…', description: '正在写入场景并返回游戏,请稍候' }),\n discardAndRunGame: Object.freeze({ title: '正在放弃变更并退出…', description: '正在恢复游戏场景,请稍候' }),\n assetImport: Object.freeze({ title: '正在添加资源…', description: '正在检查资产库并实例化资源,请稍候' }),\n});\n\nexport function createFpsGameEditorPlayableProjectHostAssembly<TDocument, TAsset extends EditorSceneAssetLibraryItem>(\n input: FpsGameEditorPlayableProjectHostAssemblyOptions<TDocument, TAsset>,\n) {\n let assets: TAsset[] = [];\n const scene = input.scene;\n const projection = input.projection;\n const prefab = input.prefab;\n const setAssets = (nextAssets: TAsset[]): TAsset[] => {\n assets = nextAssets;\n input.rendering.setTextures(projection.createEditorSceneInspectorTextureAssets(assets));\n return assets;\n };\n const hydrateDocumentAssets = (document: TDocument, nextAssets: TAsset[]): TDocument => (\n input.projectServices.hydrateDocumentAssets?.(document, nextAssets) ?? document\n );\n const prepareDocument = (document: TDocument, nextAssets: TAsset[]): TDocument => {\n if (input.prepareDocument) return input.prepareDocument(document, nextAssets);\n return prepareFpsGameEditorStandardDocument({\n document,\n assets: nextAssets,\n hydrateDocumentAssets,\n ensureEnvironmentDefaults: scene.ensureEnvironmentDefaults,\n normalizeHierarchyDocument: scene.normalizeHierarchyDocument,\n });\n };\n return createFpsGameEditorProductHostAssembly<any, any, any, any, any>({\n scene,\n document: {\n getProjectionNodes: projection.createProjectionNodes,\n getProjectionNode: (document: any, id: string) => {\n const gameObject = document.scene.gameObjects.find((entry: any) => entry.id === id);\n return gameObject ? projection.createProjectionNode(document, gameObject) : null;\n },\n getProjectionNodesForTarget: projection.getProjectionNodesForTarget,\n resolveProjectionTargetId: projection.resolveProjectionTargetId,\n getProjectionSelectionNodeIds: projection.getProjectionSelectionNodeIds,\n createPatchFromAsset: (asset: any, request: any) => ({ label: `Add ${request?.name?.trim() || asset.displayName}`, patch: { kind: 'game-object.create-from-asset', assetItem: asset, ...(request?.name?.trim() ? { name: request.name.trim() } : {}), ...(request?.placement ? { placement: request.placement } : {}) } }),\n },\n lifecycle: {\n prepareDocument: (document: TDocument, nextAssets: TAsset[]) => prepareDocument(document, setAssets(nextAssets)),\n hydrateDocumentAssets: (document: TDocument, nextAssets: TAsset[]) => {\n const hydratedAssets = setAssets(nextAssets);\n return hydrateDocumentAssets(document, hydratedAssets);\n },\n resolveUpdatedAssetSnapshot: (nextAssets: TAsset[], update: { assetId: string }) => {\n const asset = nextAssets.find(candidate => candidate.assetId === update.assetId || candidate.id === update.assetId);\n if (!asset) return null;\n const contentHash = typeof asset.metadata?.contentHash === 'string'\n ? asset.metadata.contentHash\n : undefined;\n return {\n assetId: asset.assetId,\n ...(contentHash ? { contentHash } : {}),\n };\n },\n listAssetSnapshots: (nextAssets: TAsset[]) => nextAssets.flatMap((asset) => {\n const assetId = typeof asset.assetId === 'string' && asset.assetId.trim()\n ? asset.assetId\n : typeof asset.id === 'string' && asset.id.trim()\n ? asset.id\n : null;\n if (!assetId) return [];\n const contentHash = typeof asset.metadata?.contentHash === 'string'\n ? asset.metadata.contentHash\n : undefined;\n return [{ assetId, ...(contentHash ? { contentHash } : {}) }];\n }),\n reconcileUpdatedAsset: (document: EditorSceneMaterialDocument, update: { assetId: string }) => {\n const diffs = document.scene.gameObjects\n .map(gameObject => resolveEditorSceneMaterialSlotReimportDiff(document, gameObject))\n .filter(diff => diff.assetId === update.assetId);\n return {\n document: scene.ensureEnvironmentDefaults(document),\n reconciledBindingCount: diffs.reduce(\n (count, diff) => count + diff.bindingRemaps.length + diff.bindingRemapIssues.length,\n 0,\n ),\n warnings: diffs.flatMap(diff => [\n ...diff.bindingRemapIssues.map(issue => ({\n code: issue.reason,\n gameObjectId: diff.gameObjectId,\n slotId: issue.fromSlotId,\n materialAssetId: issue.materialAssetId,\n candidateSlotIds: issue.candidateSlotIds,\n })),\n ...diff.issues\n .filter(issue => issue.reason === 'source-material-changed')\n .map(issue => ({\n code: issue.reason,\n gameObjectId: diff.gameObjectId,\n ...(issue.slotId ? { slotId: issue.slotId } : {}),\n ...(issue.materialAssetId ? { materialAssetId: issue.materialAssetId } : {}),\n })),\n ]),\n };\n },\n summarize: input.projectServices.summarize,\n },\n getInspectorContext: () => ({ textureAssets: projection.createEditorSceneInspectorTextureAssets(assets) }),\n agentContext: input.projectServices.agentContext,\n assetActions: { createAssetActionPatch: input.createAssetActionPatch },\n prefabStage: {\n getPrefabStageDescriptor: prefab?.getDescriptor ?? getEditorScenePrefabStageDescriptor,\n getPrefabStageProjectionNodes: prefab?.getProjectionNodes ?? getEditorScenePrefabStageProjectionNodes,\n getPrefabStageStructure: prefab?.getStructure ?? getEditorScenePrefabStageStructure,\n getPrefabStageInspectorObject: prefab?.getInspectorObject ?? scene.getPrefabStageInspectorObject,\n resolvePrefabStagePreviewTarget: prefab?.resolvePreviewTarget ?? resolveEditorScenePrefabStagePreviewTarget,\n getPrefabStageProjectionNodeId: prefab?.getProjectionNodeId ?? getEditorScenePrefabStageProjectionNodeIdForNode,\n },\n hierarchyActions: {\n operations: input.hierarchyOperations ?? [],\n },\n worldPreview: {\n getSceneCameraPreviewRig: projection.createSceneCameraPreviewRig,\n getWorldAppearance: (document: any) => resolveEditorSceneLightingPreviewProfile(document, { environmentLightId: 'environment_light', sunLightId: 'sun_light', defaultEnvironmentLight: scene.defaults.environmentLight, defaultSunLight: scene.defaults.sunLight }),\n },\n rendering: input.rendering.capability,\n runtime: {\n localTestActions: input.runtimeWindow.parent === input.runtimeWindow,\n gameModeEntryVisible: input.gameModeEntryVisible,\n authoring: { drivers: [input.sceneSource.createDriver()] },\n persistenceAdapter: {\n loadAuthoringSource: async () => { const loaded = await input.sceneSource.load(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; },\n loadAssets: input.sceneSource.loadAssets,\n ...(input.sceneSource.loadProjectFiles ? { loadProjectFiles: input.sceneSource.loadProjectFiles } : {}),\n ...(input.sceneSource.loadProjectFile ? { loadProjectFile: input.sceneSource.loadProjectFile } : {}),\n ...(input.sceneSource.resolveProjectMedia ? { resolveProjectMedia: input.sceneSource.resolveProjectMedia } : {}),\n },\n worldAdapter: {\n loadPreviewEngine: async () => projection.createEditorPreviewBabylonModule(await input.loadBabylon()),\n createPreviewEngine: createBabylonEditorPreviewEngine,\n importPreviewAsset: projection.importEditorProjectionModel,\n resolveMaterialTextureUrl: (texture: unknown) => projection.resolveEditorSceneTextureRefUrl(assets, texture),\n resolveAssetId: (asset: TAsset) => asset.assetId,\n toBrowserAssetItem: (asset: TAsset) => ({ id: asset.assetId, guid: asset.guid, assetId: asset.assetId, kind: asset.kind, label: asset.displayName, relativePath: resolveEditorSceneAssetLibraryItemRelativePath(asset), meta: asset.assetId, external: asset.external, origin: asset.origin, dedupeKey: asset.dedupeKey, contentHash: typeof asset.metadata?.contentHash === 'string' ? asset.metadata.contentHash : undefined, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset), disabled: asset.placeable === false }),\n },\n world: input.world,\n createGrid: projection.createEditorGrid,\n lifecycle: { loadingContent: input.loadingContent ?? DEFAULT_PLAYABLE_PROJECT_LOADING_CONTENT, beforeDiscardAndRunGame: input.rendering.reset },\n forgePlay: { window: input.runtimeWindow, hasUnsavedPlatformChanges: input.rendering.isDirty, handleProjectAssetCommand: input.projectServices.handleProjectAssetCommand, exportDocument: ({ harness, payload, saveState }: any) => input.projectServices.exportDocument(harness, payload, saveState), reportError: input.reportError },\n },\n });\n}\n\nexport interface FpsGameEditorProductSceneDocumentAdapter<\n TDocument,\n TPatch,\n TAsset = unknown,\n> extends Pick<\n PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>,\n | 'reduceDocument'\n | 'getHierarchyItems'\n | 'isHierarchyStructureChange'\n | 'getProjectionNodes'\n | 'getProjectionNode'\n | 'getProjectionNodesForTarget'\n | 'resolveProjectionTargetId'\n | 'getProjectionSelectionNodeIds'\n | 'createPatchFromAsset'\n | 'createSerializedPropertyPatch'\n | 'resolveDiagnosticLocator'\n > {}\n\nexport interface FpsGameEditorProductSceneHostOptions<\n TDocument,\n TPatch,\n TAsset = unknown,\n> {\n documentAdapter: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>;\n capabilities: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>;\n}\n\nexport interface FpsGameEditorProductSceneHostOptionsInput<\n TDocument,\n TPatch,\n TAsset = unknown,\n> {\n document: FpsGameEditorProductSceneDocumentAdapter<TDocument, TPatch, TAsset>;\n lifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;\n selection?: PlayableLocalEditorSelectionCapability<TDocument>;\n inspector?: PlayableLocalEditorInspectorCapability<TDocument>;\n assetBrowser?: PlayableLocalEditorAssetBrowserCapability<TDocument>;\n agentContext?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>['agentContext'];\n markerGraph?: PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch>;\n assetActions?: PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>;\n prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;\n transformCommands?: PlayableLocalEditorTransformCommandsCapability<TDocument, TPatch>;\n sceneGraph?: PlayableLocalEditorSceneGraphCapability<TDocument, TPatch>;\n hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;\n worldPreview?: PlayableLocalEditorWorldPreviewCapability<TDocument>;\n rendering?: PlayableLocalEditorRenderingCapability<TDocument, TPatch>;\n}\n\nexport function createFpsGameEditorProductSceneHostOptions<\n TDocument,\n TPatch,\n TAsset = unknown,\n>(\n input: FpsGameEditorProductSceneHostOptionsInput<TDocument, TPatch, TAsset>,\n): FpsGameEditorProductSceneHostOptions<TDocument, TPatch, TAsset> {\n const documentAdapter: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset> = {\n ...input.document,\n };\n\n return {\n documentAdapter,\n capabilities: {\n documentLifecycle: input.lifecycle,\n selection: input.selection,\n inspector: input.inspector,\n assetBrowser: input.assetBrowser,\n agentContext: input.agentContext,\n markerGraph: input.markerGraph,\n assetActions: input.assetActions,\n prefabStage: input.prefabStage,\n transformCommands: input.transformCommands,\n sceneGraph: input.sceneGraph,\n hierarchyActions: input.hierarchyActions,\n worldPreview: input.worldPreview,\n rendering: input.rendering,\n },\n };\n}\n\nexport interface FpsGameEditorProductHostAssemblyInput<\n TDocument extends EditorSceneDocument<TGameObject>,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAsset extends EditorSceneAssetLibraryItem,\n TContext,\n> {\n scene: FpsGameEditorStandardSceneAssembly<TDocument, TGameObject, TPatch, TAsset, TContext>;\n document: Pick<\n FpsGameEditorProductSceneDocumentAdapter<TDocument, TPatch, TAsset>,\n | 'getProjectionNodes'\n | 'getProjectionNode'\n | 'getProjectionNodesForTarget'\n | 'resolveProjectionTargetId'\n | 'getProjectionSelectionNodeIds'\n | 'createPatchFromAsset'\n >;\n lifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;\n getInspectorContext?: () => TContext;\n agentContext?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>['agentContext'];\n assetActions?: Pick<\n PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>,\n 'createAssetActionPatch' | 'createPlacedAssetPatch' | 'findCreatedId'\n >;\n prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;\n hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;\n worldPreview?: PlayableLocalEditorWorldPreviewCapability<TDocument>;\n rendering?: PlayableLocalEditorRenderingCapability<TDocument, TPatch>;\n runtime?: FpsGameEditorProductHostRuntimeOptions<TDocument, TPatch, TAsset>;\n}\n\ntype FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset> = NonNullable<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>['forgePlay']\n>;\n\nfunction collectProductEditorSceneDocumentDiagnostics(\n document: EditorSceneDocument,\n phase: EditorDiagnosticPhase,\n): EditorDiagnostic[] {\n try {\n assertPlayableEditorSceneDocumentContract(document);\n return [];\n } catch (error) {\n const record = error && typeof error === 'object'\n ? error as { code?: unknown; path?: unknown; message?: unknown }\n : null;\n const path = typeof record?.path === 'string' ? record.path : undefined;\n const code = classifyProductDocumentValidationCode(document, path)\n ?? (typeof record?.code === 'string'\n ? `document-${record.code.replace(/\\./g, '-')}`\n : 'document-contract-invalid');\n return [{\n code,\n severity: 'error',\n phase,\n source: 'document',\n producer: 'document-validation',\n message: typeof record?.message === 'string' ? record.message : String(error),\n suggestion: path\n ? `检查诊断详情中的文档路径 ${path},修复无效或重复的数据后重新验证。`\n : '检查当前 Scene Document 的结构完整性后重新验证。',\n subject: { kind: 'document' },\n ...(path ? {\n details: { path },\n } : {}),\n }];\n }\n}\n\nfunction classifyProductDocumentValidationCode(\n document: EditorSceneDocument,\n path: string | undefined,\n): string | null {\n if (!path) return null;\n const assetMatch = /^\\$\\.assets\\[(\\d+)\\]\\.id$/.exec(path);\n if (assetMatch && hasDuplicateIdAtIndex(document.assets, Number(assetMatch[1]))) {\n return 'document-asset-id-duplicate';\n }\n const objectMatch = /^\\$\\.scene\\.gameObjects\\[(\\d+)\\]\\.id$/.exec(path);\n if (objectMatch && hasDuplicateIdAtIndex(document.scene.gameObjects, Number(objectMatch[1]))) {\n return 'document-game-object-id-duplicate';\n }\n return null;\n}\n\nfunction hasDuplicateIdAtIndex(values: readonly { id?: unknown }[], index: number): boolean {\n const id = typeof values[index]?.id === 'string' ? values[index].id : null;\n return !!id && values.filter(value => value.id === id).length > 1;\n}\n\nexport interface FpsGameEditorProductHostRuntimeOptions<TDocument, TPatch, TAsset> extends Omit<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>,\n 'documentAdapter' | 'capabilities' | 'persistenceAdapter' | 'worldAdapter' | 'forgePlay'\n> {\n persistenceAdapter: Omit<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>['persistenceAdapter'],\n 'runGame'\n >;\n worldAdapter: Omit<\n FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>['worldAdapter'],\n 'disposeWorld' | 'disposeGameWorld' | 'getCanvas'\n >;\n forgePlay?: Omit<\n FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>,\n 'handleAssetDrop' | 'handleProjectAssetCommand' | 'exportDocument'\n > & {\n handleProjectAssetCommand?: (\n bridgeContext: Parameters<NonNullable<FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>['handleProjectAssetCommand']>>[0],\n normalizeLoadedPlatformAssetPayload: (payload: Record<string, unknown>) => Record<string, unknown>,\n ) => Promise<void> | void;\n exportDocument?: (input: Parameters<NonNullable<FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>['exportDocument']>>[0] & {\n harness: PlayableLocalEditorHarnessApi<TDocument>;\n }) => ReturnType<NonNullable<FpsGameEditorProductForgePlayOptions<TDocument, TPatch, TAsset>['exportDocument']>>;\n };\n}\n\nexport interface FpsGameEditorProductHostAssembly<TDocument, TPatch, TAsset>\n extends FpsGameEditorProductSceneHostOptions<TDocument, TPatch, TAsset> {\n createHostOptions(\n context: FpsGameEditorProductLocalEditorContext<TDocument>,\n ): FpsGameEditorProductLocalEditorHostOptions<TDocument, TPatch, TAsset>;\n}\n\nexport function createFpsGameEditorProductHostAssembly<\n TDocument extends EditorSceneDocument<TGameObject>,\n TGameObject extends EditorSceneGameObject,\n TPatch,\n TAsset extends EditorSceneAssetLibraryItem,\n TContext,\n>(\n input: FpsGameEditorProductHostAssemblyInput<TDocument, TGameObject, TPatch, TAsset, TContext>,\n): FpsGameEditorProductHostAssembly<TDocument, TPatch, TAsset> {\n const scene = input.scene;\n const inspectorContext = (): TContext => input.getInspectorContext?.() ?? ({} as TContext);\n const projectValidateDocument = input.lifecycle?.validateDocument;\n const documentLifecycleCapabilities: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset> = {\n ...input.lifecycle,\n validateDocument: (document, context) => [\n ...collectProductEditorSceneDocumentDiagnostics(document, context.phase),\n ...(projectValidateDocument?.(document, context) ?? []),\n ],\n };\n const sceneHostOptions = createFpsGameEditorProductSceneHostOptions<TDocument, TPatch, TAsset>({\n document: {\n reduceDocument: scene.reduceDocument,\n getHierarchyItems: scene.getHierarchyItems,\n isHierarchyStructureChange: isProductHierarchyStructureChange,\n getProjectionNodes: input.document.getProjectionNodes,\n getProjectionNode: input.document.getProjectionNode,\n getProjectionNodesForTarget: input.document.getProjectionNodesForTarget,\n resolveProjectionTargetId: input.document.resolveProjectionTargetId,\n getProjectionSelectionNodeIds: input.document.getProjectionSelectionNodeIds,\n createPatchFromAsset: input.document.createPatchFromAsset,\n createSerializedPropertyPatch: scene.createInspectorPropertyPatch,\n resolveDiagnosticLocator: scene.resolveDiagnosticLocator,\n },\n lifecycle: documentLifecycleCapabilities,\n selection: {\n isSelectable: scene.isSelectableHierarchyId,\n isLocked: () => false,\n },\n inspector: {\n getInspectorObject: (document, activeId) => scene.getInspectorObject(document, activeId, inspectorContext()),\n getInspectorMultiObject: (document, selectedIds, activeId) => scene.getInspectorMultiObject(\n document,\n selectedIds,\n activeId,\n inspectorContext(),\n ),\n getRuntimeInspectorSections: scene.getRuntimeInspectorSections,\n },\n assetBrowser: {\n getBrowserAssetItems: scene.createBrowserAssetItems,\n },\n agentContext: input.agentContext,\n markerGraph: {\n getMarkerGraph: scene.getMarkerGraph,\n getMarkerTypeCatalog: scene.getMarkerTypeCatalog,\n getRelationTypeCatalog: scene.getRelationTypeCatalog,\n getPrefabInstanceMarkerOverlays: scene.getPrefabInstanceMarkerOverlays,\n getPrefabStageMarkerOverlays: scene.getPrefabStageMarkerOverlays,\n createMarkerGraphPatch: scene.createMarkerGraphPatch,\n },\n assetActions: {\n ...input.assetActions,\n createPlacedAssetPatch: input.assetActions?.createPlacedAssetPatch ?? ((command) => {\n if (!command.asset || !command.hit) return null;\n return scene.createPlacedAssetPatch({\n document: command.document,\n asset: command.asset,\n hit: command.hit as any,\n }) as PlayableLocalEditorPatchResult<TPatch> | null;\n }),\n findCreatedId: input.assetActions?.findCreatedId ?? findCreatedEditorSceneObjectId,\n },\n prefabStage: input.prefabStage,\n transformCommands: {\n canCreateSerializedMultiPropertyPatch(command) {\n return command.path.startsWith('transform.')\n || command.path === EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH\n || scene.canCreateSerializedMultiPropertyPatch(command);\n },\n createSerializedMultiPropertyPatch(command) {\n const scenePatch = scene.createSerializedMultiPropertyPatch(command);\n if (scenePatch) return scenePatch;\n if (command.targetIds.some(targetId => !scene.createInspectorPropertyPatch({\n document: command.document,\n targetId,\n path: command.path,\n value: command.value,\n }))) return null;\n return createEditorSceneSerializedMultiTransformPatch(command) as ReturnType<typeof scene.createSerializedMultiPropertyPatch>;\n },\n createTransformInspectorPreview: command => toEditorSceneLocalTransformFromWorld(\n command.document,\n command.targetId,\n command.transform,\n ),\n createTransformPatch: command => createEditorSceneTransformPatch(command as any) as any,\n createTransformBatchPatch: command => createEditorSceneTransformBatchPatch(command as any) as any,\n createDuplicateSelectionPatch: scene.createDuplicateSelectionPatch,\n },\n sceneGraph: {\n validateSceneGraphDrop: scene.validateReparent,\n validateSceneGraphMove: scene.validateHierarchyMove,\n validateSceneGraphGroupSelection: scene.validateGroupSelection,\n createSceneGraphRenamePatch: scene.createRenamePatch,\n createSceneGraphCreateGroupPatch: scene.createCreateGroupPatch,\n createSceneGraphCreatePrimitivePatch: scene.createCreatePrimitivePatch,\n createSceneGraphDeletePatch: scene.createDeleteSubtreePatch,\n createSceneGraphDropPatch: scene.createReparentPatch,\n createSceneGraphMovePatch: scene.createHierarchyMovePatch,\n createSceneGraphGroupSelectionPatch: scene.createGroupSelectionPatch,\n },\n hierarchyActions: input.hierarchyActions,\n worldPreview: input.worldPreview,\n rendering: input.rendering,\n });\n return {\n ...sceneHostOptions,\n createHostOptions(context) {\n const runtime = input.runtime;\n if (!runtime) {\n throw new Error('createFpsGameEditorProductHostAssembly requires runtime options before mounting.');\n }\n const { forgePlay, ...runtimeHostOptions } = runtime;\n return {\n ...runtimeHostOptions,\n ...sceneHostOptions,\n persistenceAdapter: {\n ...runtime.persistenceAdapter,\n },\n worldAdapter: {\n ...runtime.worldAdapter,\n },\n ...(forgePlay ? {\n forgePlay: {\n ...forgePlay,\n handleAssetDrop: context.rememberPlatformAssetDrop,\n handleProjectAssetCommand: forgePlay.handleProjectAssetCommand\n ? bridgeContext => forgePlay.handleProjectAssetCommand?.(\n bridgeContext,\n context.normalizeLoadedPlatformAssetPayload,\n )\n : undefined,\n exportDocument: forgePlay.exportDocument\n ? (exportInput) => {\n const harness = context.getHost()?.harness;\n if (!harness) throw new Error('editor_host_unavailable');\n return forgePlay.exportDocument!({ ...exportInput, harness });\n }\n : undefined,\n },\n } : {}),\n };\n },\n };\n}\n\nfunction isProductHierarchyStructureChange<TDocument, TPatch>(\n command: DocumentCommand<TDocument, TPatch>,\n): boolean {\n if (command.type === 'document.replace') return true;\n const impact = command.projectionImpact;\n if (impact?.type === 'incremental') {\n if ((impact.createdNodeIds?.length ?? 0) > 0\n || (impact.deletedNodeIds?.length ?? 0) > 0) {\n return true;\n }\n }\n const patch = command.patch as { kind?: unknown; path?: unknown } | null | undefined;\n if (patch?.kind === 'game-object.transform' || patch?.kind === 'game-object.transform-batch') return false;\n if (patch?.kind === 'game-object.field'\n || patch?.kind === 'game-object.field-batch'\n || patch?.kind === 'serialized-property') {\n return typeof patch.path !== 'string' || isHierarchyVisiblePropertyPath(patch.path);\n }\n if (typeof patch?.kind === 'string' && (\n patch.kind === 'game-object.rendering-alpha-index-migration'\n || patch.kind.startsWith('scene.material-asset.')\n || patch.kind === 'scene.prefab-material-asset.duplicate-and-bind'\n )) return false;\n if (typeof patch?.kind === 'string' && patch.kind.startsWith('scene.prefab-asset.')) return true;\n if (patch?.kind === 'scene.marker-graph') return true;\n if (typeof patch?.kind === 'string' && (\n patch.kind === 'game-object.create-from-asset'\n || patch.kind === 'game-object.duplicate-selection'\n || patch.kind === 'game-object.rename'\n || patch.kind === 'game-object.create-group'\n || patch.kind === 'game-object.create-primitive'\n || patch.kind === 'game-object.delete-subtree'\n || patch.kind === 'game-object.reparent'\n || patch.kind === 'game-object.hierarchy-move'\n || patch.kind === 'game-object.group-selection'\n )) return true;\n if (impact?.type === 'incremental' && (impact.syncTransformIds?.length ?? 0) > 0) return false;\n return true;\n}\n\nfunction isHierarchyVisiblePropertyPath(path: string): boolean {\n const normalized = path.trim();\n return normalized === 'name'\n || normalized === 'label'\n || normalized === 'parentId'\n || normalized === 'active'\n || normalized === 'enabled'\n || normalized === 'locked'\n || normalized === 'kind'\n || normalized === 'transformType';\n}\n\nfunction findCreatedEditorSceneObjectId<TDocument extends EditorSceneDocument>(\n beforeDocument: TDocument,\n afterDocument: TDocument,\n): string | null {\n const beforeIds = new Set(beforeDocument.scene.gameObjects.map(gameObject => gameObject.id));\n return afterDocument.scene.gameObjects.find(gameObject => !beforeIds.has(gameObject.id))?.id ?? null;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-standard-project.d.ts","sourceRoot":"","sources":["../src/playable-standard-project.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"playable-standard-project.d.ts","sourceRoot":"","sources":["../src/playable-standard-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC/B,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EAGL,KAAK,uDAAuD,EAC5D,KAAK,2CAA2C,EAChD,KAAK,0CAA0C,EAChD,MAAM,oCAAoC,CAAC;AAG5C,MAAM,WAAW,wCAAwC;IACvD,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,wDACf,SAAQ,wCAAwC;IAChD,WAAW,EAAE,0CAA0C,CAAC;IACxD,YAAY,EAAE,uDAAuD,CACnE,mBAAmB,EACnB,GAAG,EACH,2BAA2B,CAC5B,CAAC,cAAc,CAAC,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,iBAAiB,GAAG,IAAI,CAAC;CAC5C;AAED,kHAAkH;AAClH,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,8BAA8B,EACvC,YAAY,EAAE,yBAAyB,EACvC,OAAO,GAAE,wCAA6C;;;;;;;;qCAcrB,GAAG;;yBAIU,iBAAiB,GAAG,IAAI;;;;;iCA0B3C,MAAM;;;;;;;;;gBA+GsiG,CAAC;;;;EApIzkG;AA6FD,wBAAgB,0DAA0D,CACxE,OAAO,EAAE,8BAA8B,EACvC,OAAO,EAAE,wDAAwD,GAChE,OAAO,CAAC,2CAA2C,CAAC,mBAAmB,CAAC,CAAC,CAY3E;AAED,kHAAkH;AAClH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,8BAA8B,EACvC,YAAY,EAAE,yBAAyB,EACvC,OAAO,GAAE,wCAA6C,GACrD,2CAA2C,CAAC,mBAAmB,CAAC,CAGlE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createFpsGameEditorAdapter, createFpsGameEditorStandardSceneAssembly, enrichEditorSceneDocumentAssets, loadEditorAssetLibrary, loadSceneMainSource, saveSceneMainSource, } from '@fps-games/editor-playable-sdk';
|
|
1
|
+
import { createFpsGameEditorAdapter, createFpsGameEditorStandardSceneAssembly, enrichEditorSceneDocumentAssets, loadEditorAssetLibrary, loadEditorProjectFile, loadEditorProjectFiles, loadSceneMainSource, resolveEditorProjectMediaSource, resolveEditorSceneAssetLibraryItemRelativePath, saveSceneMainSource, } from '@fps-games/editor-playable-sdk';
|
|
2
2
|
import { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';
|
|
3
3
|
import { createFpsGameEditorProductHostAssembly, prepareFpsGameEditorStandardDocument, } from './playable-product-scene-capabilities.js';
|
|
4
4
|
import { mountFpsGameEditorProductLocalEditor, mountFpsGameEditorProductLocalEditorFromEnvironmentModule, } from './playable-product-local-editor.js';
|
|
@@ -96,6 +96,9 @@ function createFpsGameEditorStandardLocalEditorAssembly(project, options) {
|
|
|
96
96
|
persistenceAdapter: {
|
|
97
97
|
loadAuthoringSource: async () => { const loaded = await loadSceneMainSource(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; },
|
|
98
98
|
loadAssets: loadEditorAssetLibrary,
|
|
99
|
+
loadProjectFiles: loadEditorProjectFiles,
|
|
100
|
+
loadProjectFile: loadEditorProjectFile,
|
|
101
|
+
resolveProjectMedia: resolveEditorProjectMediaSource,
|
|
99
102
|
},
|
|
100
103
|
worldAdapter: {
|
|
101
104
|
loadPreviewEngine: () => import('@babylonjs/core'),
|
|
@@ -103,7 +106,7 @@ function createFpsGameEditorStandardLocalEditorAssembly(project, options) {
|
|
|
103
106
|
importPreviewAsset: projection.importEditorProjectionModel,
|
|
104
107
|
resolveMaterialTextureUrl: (texture) => projection.resolveEditorSceneTextureRefUrl(assets, texture),
|
|
105
108
|
resolveAssetId: (asset) => asset.assetId,
|
|
106
|
-
toBrowserAssetItem: (asset) => ({ id: asset.assetId, label: asset.displayName, kind: asset.kind, origin: asset.origin, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset) }),
|
|
109
|
+
toBrowserAssetItem: (asset) => ({ id: asset.assetId, label: asset.displayName, kind: asset.kind, relativePath: resolveEditorSceneAssetLibraryItemRelativePath(asset), origin: asset.origin, contentHash: typeof asset.metadata?.contentHash === 'string' ? asset.metadata.contentHash : undefined, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset) }),
|
|
107
110
|
},
|
|
108
111
|
createGrid: projection.createEditorGrid,
|
|
109
112
|
authoring: { drivers: [{ sourceType: 'scene', load: loadSceneMainSource, save: saveSceneMainSource }] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playable-standard-project.js","sourceRoot":"","sources":["../src/playable-standard-project.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,wCAAwC,EACxC,+BAA+B,EAC/B,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GAKpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,EACL,sCAAsC,EACtC,oCAAoC,GACrC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,oCAAoC,EACpC,yDAAyD,GAI1D,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,2CAA2C,EAAE,MAAM,0CAA0C,CAAC;AAmBvG,kHAAkH;AAClH,MAAM,UAAU,yCAAyC,CACvD,OAAuC,EACvC,YAAuC,EACvC,UAAoD,EAAE;IAEtD,MAAM,OAAO,GAAG,0BAA0B,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,8CAA8C,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClF,OAAO;QACL,OAAO;QACP,GAAG,QAAQ;QACX,kBAAkB;YAChB,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC;YAC/C,OAAO;gBACL,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa;gBAClD,0BAA0B,EAAE,OAAO,CAAC,0BAA0B;gBAC9D,WAAW,EAAE;oBACX,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE;oBACjD,aAAa,EAAE,CAAC,OAAY,EAAE,EAAE,CAAC,OAAO,YAAY,CAAC,WAAW,K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AAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAA4B,CAAC;IACnE,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAA4B,CAAC;IACnE,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC;SACxG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAuB,CAAC;IAClF,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,IAAI,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACvD,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC3C,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,cAAc,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,cAAc,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAClI,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC;AAC1F,CAAC","sourcesContent":["import {\n createFpsGameEditorAdapter,\n createFpsGameEditorStandardSceneAssembly,\n enrichEditorSceneDocumentAssets,\n loadEditorAssetLibrary,\n loadSceneMainSource,\n saveSceneMainSource,\n type EditorSceneAssetLibraryItem,\n type EditorSceneDocument,\n type FpsGameEditorProjectDefinition,\n type FpsGameEditorRuntimeHooks,\n} from '@fps-games/editor-playable-sdk';\nimport { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';\nimport {\n createFpsGameEditorProductHostAssembly,\n prepareFpsGameEditorStandardDocument,\n} from './playable-product-scene-capabilities.js';\nimport {\n mountFpsGameEditorProductLocalEditor,\n mountFpsGameEditorProductLocalEditorFromEnvironmentModule,\n type FpsGameEditorProductLocalEditorEnvironmentModuleOptions,\n type FpsGameEditorProductLocalEditorModeSwitcher,\n type FpsGameEditorProductProjectModeTransitions,\n} from './playable-product-local-editor.js';\nimport { createFpsGameEditorProductProjectionPreview } from './playable-product-projection-preview.js';\n\nexport interface FpsGameEditorStandardProjectMountOptions {\n root?: HTMLElement;\n window?: Window;\n agentBridgeSessionMetadata?: Record<string, unknown>;\n}\n\nexport interface FpsGameEditorStandardLocalEditorEnvironmentModuleOptions\n extends FpsGameEditorStandardProjectMountOptions {\n projectMode: FpsGameEditorProductProjectModeTransitions;\n pluginModule: FpsGameEditorProductLocalEditorEnvironmentModuleOptions<\n EditorSceneDocument,\n any,\n EditorSceneAssetLibraryItem\n >['pluginModule'];\n getCanvas?: () => HTMLCanvasElement | null;\n}\n\n/** @deprecated Projects own Runtime lifecycle. Use mountFpsGameEditorStandardLocalEditorFromEnvironmentModule. */\nexport function createFpsGameEditorStandardProjectRuntime(\n project: FpsGameEditorProjectDefinition,\n runtimeHooks: FpsGameEditorRuntimeHooks,\n options: FpsGameEditorStandardProjectMountOptions = {},\n) {\n const adapter = createFpsGameEditorAdapter(project, runtimeHooks);\n const assembly = createFpsGameEditorStandardLocalEditorAssembly(project, options);\n return {\n adapter,\n ...assembly,\n createMountOptions() {\n const runtimeWindow = options.window ?? window;\n return {\n project, root: options.root, window: runtimeWindow,\n agentBridgeSessionMetadata: options.agentBridgeSessionMetadata,\n projectMode: {\n enterEditorMode: () => adapter.disposeGameWorld(),\n enterPlayMode: (context: any) => typeof runtimeHooks.restartGame === 'function'\n ? adapter.restartGame(context)\n : runtimeWindow.location.reload(),\n },\n getCanvas: () => adapter.getCanvas() as HTMLCanvasElement | null,\n hostAssembly: assembly.hostAssembly,\n };\n },\n };\n}\n\nfunction createFpsGameEditorStandardLocalEditorAssembly(\n project: FpsGameEditorProjectDefinition,\n options: FpsGameEditorStandardProjectMountOptions,\n) {\n const scene = createFpsGameEditorStandardSceneAssembly<any, any, any, any, any>({\n features: project.features,\n markerTypes: [],\n relationTypes: [],\n getRenderingProfile: () => ({ shadows: { defaultMode: 'none' } } as any),\n createPatch: {\n gameObjectField: (targetId, path, value) => ({ kind: 'game-object.field', targetId, path, value }),\n gameObjectFieldBatch: fields => ({ kind: 'game-object.field-batch', fields }),\n materialAssetField: (materialAssetId, path, value) => ({ kind: 'scene.material-asset.field', materialAssetId, path, value }),\n markerGraph: command => ({ kind: 'scene.marker-graph', command }),\n },\n });\n const assetCatalog: Record<string, unknown> = {};\n const assetsModule = {\n ASSET_CATALOG: assetCatalog,\n resolveAssetUrl(assetId: string) { return (assetCatalog[assetId] as { url?: string } | undefined)?.url ?? null; },\n };\n let assets: EditorSceneAssetLibraryItem[] = [];\n const projection = createFpsGameEditorProductProjectionPreview<any, any, any>({\n assetsModule,\n defaultCamera: scene.defaults.camera,\n async resolveModelPathAndFile(value) {\n const url = new URL(value, (options.window ?? window).location.href);\n const slash = url.href.lastIndexOf('/');\n return { path: url.href.slice(0, slash + 1), filename: url.href.slice(slash + 1) };\n },\n });\n const hostAssembly = createFpsGameEditorProductHostAssembly<any, any, any, any, any>({\n scene,\n document: {\n getProjectionNodes: projection.createProjectionNodes,\n getProjectionNode: (document: EditorSceneDocument, id: string) => {\n const object = document.scene.gameObjects.find(entry => entry.id === id);\n return object ? projection.createProjectionNode(document, object) : null;\n },\n getProjectionNodesForTarget: projection.getProjectionNodesForTarget,\n resolveProjectionTargetId: projection.resolveProjectionTargetId,\n getProjectionSelectionNodeIds: projection.getProjectionSelectionNodeIds,\n createPatchFromAsset: (asset: EditorSceneAssetLibraryItem, input: any) => ({ label: `Add ${input?.name || asset.displayName}`, patch: { kind: 'game-object.create-from-asset', assetItem: asset, ...(input?.name ? { name: input.name } : {}), ...(input?.placement ? { placement: input.placement } : {}) } }),\n },\n lifecycle: { prepareDocument: (document, nextAssets) => {\n assets = nextAssets as EditorSceneAssetLibraryItem[];\n for (const key of Object.keys(assetCatalog)) delete assetCatalog[key];\n for (const asset of assets as EditorSceneAssetLibraryItem[]) assetCatalog[asset.assetId] = { ...asset, url: resolveStandardProjectAssetUrl(project, asset) };\n return prepareFpsGameEditorStandardDocument({\n document,\n assets,\n hydrateDocumentAssets: enrichEditorSceneDocumentAssets,\n ensureEnvironmentDefaults: scene.ensureEnvironmentDefaults,\n normalizeHierarchyDocument: scene.normalizeHierarchyDocument,\n });\n } },\n getInspectorContext: () => ({\n textureAssets: projection.createEditorSceneInspectorTextureAssets(assets),\n }),\n runtime: {\n lifecycle: { loadingContent: {\n enter: { title: 'Entering editor', description: 'Loading the editable scene.' },\n saveScene: { title: 'Saving scene', description: 'Writing authored scene data.' },\n saveAndRunGame: { title: 'Saving scene', description: 'Returning to the game.' },\n discardAndRunGame: { title: 'Discarding changes', description: 'Returning to the game.' },\n assetImport: { title: 'Importing asset', description: 'Updating the project asset library.' },\n } },\n persistenceAdapter: {\n loadAuthoringSource: async () => { const loaded = await loadSceneMainSource(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; },\n loadAssets: loadEditorAssetLibrary,\n },\n worldAdapter: {\n loadPreviewEngine: () => import('@babylonjs/core'),\n createPreviewEngine: createBabylonEditorPreviewEngine,\n importPreviewAsset: projection.importEditorProjectionModel,\n resolveMaterialTextureUrl: (texture: any) => projection.resolveEditorSceneTextureRefUrl(assets, texture),\n resolveAssetId: (asset: EditorSceneAssetLibraryItem) => asset.assetId,\n toBrowserAssetItem: (asset: EditorSceneAssetLibraryItem) => ({ id: asset.assetId, label: asset.displayName, kind: asset.kind, origin: asset.origin, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset) }),\n },\n createGrid: projection.createEditorGrid,\n authoring: { drivers: [{ sourceType: 'scene', load: loadSceneMainSource, save: saveSceneMainSource } as any] },\n },\n });\n return {\n assetsModule, hostAssembly, projection, scene,\n };\n}\n\nexport function mountFpsGameEditorStandardLocalEditorFromEnvironmentModule(\n project: FpsGameEditorProjectDefinition,\n options: FpsGameEditorStandardLocalEditorEnvironmentModuleOptions,\n): Promise<FpsGameEditorProductLocalEditorModeSwitcher<EditorSceneDocument>> {\n const assembly = createFpsGameEditorStandardLocalEditorAssembly(project, options);\n return mountFpsGameEditorProductLocalEditorFromEnvironmentModule({\n project,\n root: options.root,\n window: options.window,\n agentBridgeSessionMetadata: options.agentBridgeSessionMetadata,\n projectMode: options.projectMode,\n pluginModule: options.pluginModule,\n getCanvas: options.getCanvas,\n hostAssembly: assembly.hostAssembly,\n });\n}\n\n/** @deprecated Projects own Runtime lifecycle. Use mountFpsGameEditorStandardLocalEditorFromEnvironmentModule. */\nexport function mountFpsGameEditorStandardProject(\n project: FpsGameEditorProjectDefinition,\n runtimeHooks: FpsGameEditorRuntimeHooks,\n options: FpsGameEditorStandardProjectMountOptions = {},\n): FpsGameEditorProductLocalEditorModeSwitcher<EditorSceneDocument> {\n const runtime = createFpsGameEditorStandardProjectRuntime(project, runtimeHooks, options);\n return mountFpsGameEditorProductLocalEditor(runtime.createMountOptions());\n}\n\nfunction resolveStandardProjectAssetUrl(project: FpsGameEditorProjectDefinition, asset: EditorSceneAssetLibraryItem): string | null {\n const metadata = (asset.metadata ?? {}) as Record<string, unknown>;\n const external = (asset.external ?? {}) as Record<string, unknown>;\n const raw = [metadata.url, metadata.assetUrl, metadata.relativePath, external.assetUrl, external.assetPath]\n .find(value => typeof value === 'string' && value.trim()) as string | undefined;\n if (!raw) return null;\n if (/^(https?:|data:|blob:|\\/)/i.test(raw)) return raw;\n const normalized = raw.replace(/\\\\/g, '/');\n const importedMarker = normalized.lastIndexOf('/imported/');\n const relative = importedMarker >= 0 ? normalized.slice(importedMarker + '/imported/'.length) : normalized.replace(/^\\.\\.\\//, '');\n return `${project.assets.publicBase.replace(/\\/$/, '')}/${relative.replace(/^\\//, '')}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"playable-standard-project.js","sourceRoot":"","sources":["../src/playable-standard-project.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,wCAAwC,EACxC,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,+BAA+B,EAC/B,8CAA8C,EAC9C,mBAAmB,GAKpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,EACL,sCAAsC,EACtC,oCAAoC,GACrC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,oCAAoC,EACpC,yDAAyD,GAI1D,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,2CAA2C,EAAE,MAAM,0CAA0C,CAAC;AAmBvG,kHAAkH;AAClH,MAAM,UAAU,yCAAyC,CACvD,OAAuC,EACvC,YAAuC,EACvC,UAAoD,EAAE;IAEtD,MAAM,OAAO,GAAG,0BAA0B,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,8CAA8C,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClF,OAAO;QACL,OAAO;QACP,GAAG,QAAQ;QACX,kBAAkB;YAChB,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC;YAC/C,OAAO;gBACL,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa;gBAClD,0BAA0B,EAAE,OAAO,CAAC,0BAA0B;gBAC9D,WAAW,EAAE;oBACX,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE;oBACjD,aAAa,EAAE,CAAC,OAAY,EAAE,EAAE,CAA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C,KAAK,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC;AAC1F,CAAC","sourcesContent":["import {\n createFpsGameEditorAdapter,\n createFpsGameEditorStandardSceneAssembly,\n enrichEditorSceneDocumentAssets,\n loadEditorAssetLibrary,\n loadEditorProjectFile,\n loadEditorProjectFiles,\n loadSceneMainSource,\n resolveEditorProjectMediaSource,\n resolveEditorSceneAssetLibraryItemRelativePath,\n saveSceneMainSource,\n type EditorSceneAssetLibraryItem,\n type EditorSceneDocument,\n type FpsGameEditorProjectDefinition,\n type FpsGameEditorRuntimeHooks,\n} from '@fps-games/editor-playable-sdk';\nimport { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';\nimport {\n createFpsGameEditorProductHostAssembly,\n prepareFpsGameEditorStandardDocument,\n} from './playable-product-scene-capabilities.js';\nimport {\n mountFpsGameEditorProductLocalEditor,\n mountFpsGameEditorProductLocalEditorFromEnvironmentModule,\n type FpsGameEditorProductLocalEditorEnvironmentModuleOptions,\n type FpsGameEditorProductLocalEditorModeSwitcher,\n type FpsGameEditorProductProjectModeTransitions,\n} from './playable-product-local-editor.js';\nimport { createFpsGameEditorProductProjectionPreview } from './playable-product-projection-preview.js';\n\nexport interface FpsGameEditorStandardProjectMountOptions {\n root?: HTMLElement;\n window?: Window;\n agentBridgeSessionMetadata?: Record<string, unknown>;\n}\n\nexport interface FpsGameEditorStandardLocalEditorEnvironmentModuleOptions\n extends FpsGameEditorStandardProjectMountOptions {\n projectMode: FpsGameEditorProductProjectModeTransitions;\n pluginModule: FpsGameEditorProductLocalEditorEnvironmentModuleOptions<\n EditorSceneDocument,\n any,\n EditorSceneAssetLibraryItem\n >['pluginModule'];\n getCanvas?: () => HTMLCanvasElement | null;\n}\n\n/** @deprecated Projects own Runtime lifecycle. Use mountFpsGameEditorStandardLocalEditorFromEnvironmentModule. */\nexport function createFpsGameEditorStandardProjectRuntime(\n project: FpsGameEditorProjectDefinition,\n runtimeHooks: FpsGameEditorRuntimeHooks,\n options: FpsGameEditorStandardProjectMountOptions = {},\n) {\n const adapter = createFpsGameEditorAdapter(project, runtimeHooks);\n const assembly = createFpsGameEditorStandardLocalEditorAssembly(project, options);\n return {\n adapter,\n ...assembly,\n createMountOptions() {\n const runtimeWindow = options.window ?? window;\n return {\n project, root: options.root, window: runtimeWindow,\n agentBridgeSessionMetadata: options.agentBridgeSessionMetadata,\n projectMode: {\n enterEditorMode: () => adapter.disposeGameWorld(),\n enterPlayMode: (context: any) => typeof runtimeHooks.restartGame === 'function'\n ? adapter.restartGame(context)\n : runtimeWindow.location.reload(),\n },\n getCanvas: () => adapter.getCanvas() as HTMLCanvasElement | null,\n hostAssembly: assembly.hostAssembly,\n };\n },\n };\n}\n\nfunction createFpsGameEditorStandardLocalEditorAssembly(\n project: FpsGameEditorProjectDefinition,\n options: FpsGameEditorStandardProjectMountOptions,\n) {\n const scene = createFpsGameEditorStandardSceneAssembly<any, any, any, any, any>({\n features: project.features,\n markerTypes: [],\n relationTypes: [],\n getRenderingProfile: () => ({ shadows: { defaultMode: 'none' } } as any),\n createPatch: {\n gameObjectField: (targetId, path, value) => ({ kind: 'game-object.field', targetId, path, value }),\n gameObjectFieldBatch: fields => ({ kind: 'game-object.field-batch', fields }),\n materialAssetField: (materialAssetId, path, value) => ({ kind: 'scene.material-asset.field', materialAssetId, path, value }),\n markerGraph: command => ({ kind: 'scene.marker-graph', command }),\n },\n });\n const assetCatalog: Record<string, unknown> = {};\n const assetsModule = {\n ASSET_CATALOG: assetCatalog,\n resolveAssetUrl(assetId: string) { return (assetCatalog[assetId] as { url?: string } | undefined)?.url ?? null; },\n };\n let assets: EditorSceneAssetLibraryItem[] = [];\n const projection = createFpsGameEditorProductProjectionPreview<any, any, any>({\n assetsModule,\n defaultCamera: scene.defaults.camera,\n async resolveModelPathAndFile(value) {\n const url = new URL(value, (options.window ?? window).location.href);\n const slash = url.href.lastIndexOf('/');\n return { path: url.href.slice(0, slash + 1), filename: url.href.slice(slash + 1) };\n },\n });\n const hostAssembly = createFpsGameEditorProductHostAssembly<any, any, any, any, any>({\n scene,\n document: {\n getProjectionNodes: projection.createProjectionNodes,\n getProjectionNode: (document: EditorSceneDocument, id: string) => {\n const object = document.scene.gameObjects.find(entry => entry.id === id);\n return object ? projection.createProjectionNode(document, object) : null;\n },\n getProjectionNodesForTarget: projection.getProjectionNodesForTarget,\n resolveProjectionTargetId: projection.resolveProjectionTargetId,\n getProjectionSelectionNodeIds: projection.getProjectionSelectionNodeIds,\n createPatchFromAsset: (asset: EditorSceneAssetLibraryItem, input: any) => ({ label: `Add ${input?.name || asset.displayName}`, patch: { kind: 'game-object.create-from-asset', assetItem: asset, ...(input?.name ? { name: input.name } : {}), ...(input?.placement ? { placement: input.placement } : {}) } }),\n },\n lifecycle: { prepareDocument: (document, nextAssets) => {\n assets = nextAssets as EditorSceneAssetLibraryItem[];\n for (const key of Object.keys(assetCatalog)) delete assetCatalog[key];\n for (const asset of assets as EditorSceneAssetLibraryItem[]) assetCatalog[asset.assetId] = { ...asset, url: resolveStandardProjectAssetUrl(project, asset) };\n return prepareFpsGameEditorStandardDocument({\n document,\n assets,\n hydrateDocumentAssets: enrichEditorSceneDocumentAssets,\n ensureEnvironmentDefaults: scene.ensureEnvironmentDefaults,\n normalizeHierarchyDocument: scene.normalizeHierarchyDocument,\n });\n } },\n getInspectorContext: () => ({\n textureAssets: projection.createEditorSceneInspectorTextureAssets(assets),\n }),\n runtime: {\n lifecycle: { loadingContent: {\n enter: { title: 'Entering editor', description: 'Loading the editable scene.' },\n saveScene: { title: 'Saving scene', description: 'Writing authored scene data.' },\n saveAndRunGame: { title: 'Saving scene', description: 'Returning to the game.' },\n discardAndRunGame: { title: 'Discarding changes', description: 'Returning to the game.' },\n assetImport: { title: 'Importing asset', description: 'Updating the project asset library.' },\n } },\n persistenceAdapter: {\n loadAuthoringSource: async () => { const loaded = await loadSceneMainSource(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; },\n loadAssets: loadEditorAssetLibrary,\n loadProjectFiles: loadEditorProjectFiles,\n loadProjectFile: loadEditorProjectFile,\n resolveProjectMedia: resolveEditorProjectMediaSource,\n },\n worldAdapter: {\n loadPreviewEngine: () => import('@babylonjs/core'),\n createPreviewEngine: createBabylonEditorPreviewEngine,\n importPreviewAsset: projection.importEditorProjectionModel,\n resolveMaterialTextureUrl: (texture: any) => projection.resolveEditorSceneTextureRefUrl(assets, texture),\n resolveAssetId: (asset: EditorSceneAssetLibraryItem) => asset.assetId,\n toBrowserAssetItem: (asset: EditorSceneAssetLibraryItem) => ({ id: asset.assetId, label: asset.displayName, kind: asset.kind, relativePath: resolveEditorSceneAssetLibraryItemRelativePath(asset), origin: asset.origin, contentHash: typeof asset.metadata?.contentHash === 'string' ? asset.metadata.contentHash : undefined, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset) }),\n },\n createGrid: projection.createEditorGrid,\n authoring: { drivers: [{ sourceType: 'scene', load: loadSceneMainSource, save: saveSceneMainSource } as any] },\n },\n });\n return {\n assetsModule, hostAssembly, projection, scene,\n };\n}\n\nexport function mountFpsGameEditorStandardLocalEditorFromEnvironmentModule(\n project: FpsGameEditorProjectDefinition,\n options: FpsGameEditorStandardLocalEditorEnvironmentModuleOptions,\n): Promise<FpsGameEditorProductLocalEditorModeSwitcher<EditorSceneDocument>> {\n const assembly = createFpsGameEditorStandardLocalEditorAssembly(project, options);\n return mountFpsGameEditorProductLocalEditorFromEnvironmentModule({\n project,\n root: options.root,\n window: options.window,\n agentBridgeSessionMetadata: options.agentBridgeSessionMetadata,\n projectMode: options.projectMode,\n pluginModule: options.pluginModule,\n getCanvas: options.getCanvas,\n hostAssembly: assembly.hostAssembly,\n });\n}\n\n/** @deprecated Projects own Runtime lifecycle. Use mountFpsGameEditorStandardLocalEditorFromEnvironmentModule. */\nexport function mountFpsGameEditorStandardProject(\n project: FpsGameEditorProjectDefinition,\n runtimeHooks: FpsGameEditorRuntimeHooks,\n options: FpsGameEditorStandardProjectMountOptions = {},\n): FpsGameEditorProductLocalEditorModeSwitcher<EditorSceneDocument> {\n const runtime = createFpsGameEditorStandardProjectRuntime(project, runtimeHooks, options);\n return mountFpsGameEditorProductLocalEditor(runtime.createMountOptions());\n}\n\nfunction resolveStandardProjectAssetUrl(project: FpsGameEditorProjectDefinition, asset: EditorSceneAssetLibraryItem): string | null {\n const metadata = (asset.metadata ?? {}) as Record<string, unknown>;\n const external = (asset.external ?? {}) as Record<string, unknown>;\n const raw = [metadata.url, metadata.assetUrl, metadata.relativePath, external.assetUrl, external.assetPath]\n .find(value => typeof value === 'string' && value.trim()) as string | undefined;\n if (!raw) return null;\n if (/^(https?:|data:|blob:|\\/)/i.test(raw)) return raw;\n const normalized = raw.replace(/\\\\/g, '/');\n const importedMarker = normalized.lastIndexOf('/imported/');\n const relative = importedMarker >= 0 ? normalized.slice(importedMarker + '/imported/'.length) : normalized.replace(/^\\.\\.\\//, '');\n return `${project.assets.publicBase.replace(/\\/$/, '')}/${relative.replace(/^\\//, '')}`;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/babylon-renderer",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Babylon-backed renderer capabilities for fps-game-editor.",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"fpsGamePlugin": {
|
|
26
26
|
"id": "fps.renderer.babylon",
|
|
27
|
-
"version": "0.2.1-beta.
|
|
27
|
+
"version": "0.2.1-beta.2",
|
|
28
28
|
"apiVersion": 1,
|
|
29
29
|
"requires": {},
|
|
30
30
|
"provides": {
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@fps-games/playable-contracts": "0.2.1-beta.
|
|
59
|
-
"@fps-games/playable-rendering": "0.2.1-beta.
|
|
60
|
-
"@fps-games/playable-runtime-data": "0.2.1-beta.
|
|
61
|
-
"@fps-games/plugin-api": "0.2.1-beta.
|
|
62
|
-
"@fps-games/plugin-host": "0.2.1-beta.
|
|
58
|
+
"@fps-games/playable-contracts": "0.2.1-beta.2",
|
|
59
|
+
"@fps-games/playable-rendering": "0.2.1-beta.2",
|
|
60
|
+
"@fps-games/playable-runtime-data": "0.2.1-beta.2",
|
|
61
|
+
"@fps-games/plugin-api": "0.2.1-beta.2",
|
|
62
|
+
"@fps-games/plugin-host": "0.2.1-beta.2"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@babylonjs/core": "^8.0.0"
|
|
@@ -1329,6 +1329,19 @@ function createTransformBounds(transform) {
|
|
|
1329
1329
|
y: max.y - min.y,
|
|
1330
1330
|
z: max.z - min.z,
|
|
1331
1331
|
},
|
|
1332
|
+
oriented: {
|
|
1333
|
+
center: { ...transform.position },
|
|
1334
|
+
size: {
|
|
1335
|
+
x: Math.abs(transform.scale.x),
|
|
1336
|
+
y: Math.abs(transform.scale.y),
|
|
1337
|
+
z: Math.abs(transform.scale.z),
|
|
1338
|
+
},
|
|
1339
|
+
axes: {
|
|
1340
|
+
x: rotateVec3ByEuler({ x: 1, y: 0, z: 0 }, transform.rotation),
|
|
1341
|
+
y: rotateVec3ByEuler({ x: 0, y: 1, z: 0 }, transform.rotation),
|
|
1342
|
+
z: rotateVec3ByEuler({ x: 0, y: 0, z: 1 }, transform.rotation),
|
|
1343
|
+
},
|
|
1344
|
+
},
|
|
1332
1345
|
};
|
|
1333
1346
|
}
|
|
1334
1347
|
function rotateVec3ByEuler(value, rotation) {
|
|
@@ -1390,6 +1403,17 @@ function cloneBounds(bounds) {
|
|
|
1390
1403
|
max: { ...bounds.max },
|
|
1391
1404
|
center: { ...bounds.center },
|
|
1392
1405
|
size: { ...bounds.size },
|
|
1406
|
+
...(bounds.oriented ? {
|
|
1407
|
+
oriented: {
|
|
1408
|
+
center: { ...bounds.oriented.center },
|
|
1409
|
+
size: { ...bounds.oriented.size },
|
|
1410
|
+
axes: {
|
|
1411
|
+
x: { ...bounds.oriented.axes.x },
|
|
1412
|
+
y: { ...bounds.oriented.axes.y },
|
|
1413
|
+
z: { ...bounds.oriented.axes.z },
|
|
1414
|
+
},
|
|
1415
|
+
},
|
|
1416
|
+
} : {}),
|
|
1393
1417
|
};
|
|
1394
1418
|
}
|
|
1395
1419
|
//# sourceMappingURL=marker-overlay.js.map
|