@fps-games/editor 0.2.1-beta.2 → 0.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +46 -46
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1737 -374
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-babylon-rendering.d.ts +8 -7
- package/dist/playable-babylon-rendering.d.ts.map +1 -1
- package/dist/playable-babylon-rendering.js +77 -32
- package/dist/playable-babylon-rendering.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts +2 -0
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +8 -5
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +2 -2
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -3
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +14 -6
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts +4 -2
- package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js +301 -121
- package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js +5 -4
- package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts +4 -4
- package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts +2 -0
- package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js +12 -1
- package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts +6 -3
- package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/plugin.js +100 -39
- package/node_modules/@fps-games/babylon-renderer/dist/plugin.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts +1 -3
- package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/reference.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +11 -8
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +10 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +4 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +1 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +187 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/dist/identity.d.ts +1 -0
- package/node_modules/@fps-games/playable-assets/dist/identity.d.ts.map +1 -1
- package/node_modules/@fps-games/playable-assets/dist/identity.js +1 -1
- package/node_modules/@fps-games/playable-assets/dist/identity.js.map +1 -1
- package/node_modules/@fps-games/playable-assets/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/playable-assets/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/playable-assets/dist/index.js +1 -0
- package/node_modules/@fps-games/playable-assets/dist/index.js.map +1 -1
- package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts +46 -0
- package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts.map +1 -0
- package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js +109 -0
- package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js.map +1 -0
- 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/dist/runtime.d.ts.map +1 -1
- package/node_modules/@fps-games/playable-runtime/dist/runtime.js +5 -0
- package/node_modules/@fps-games/playable-runtime/dist/runtime.js.map +1 -1
- package/node_modules/@fps-games/playable-runtime/dist/types.d.ts +2 -0
- package/node_modules/@fps-games/playable-runtime/dist/types.d.ts.map +1 -1
- package/node_modules/@fps-games/playable-runtime/dist/types.js.map +1 -1
- 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/reference.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/reference.js +11 -4
- package/node_modules/@fps-games/plugin-assets/dist/reference.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts +8 -0
- package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts.map +1 -0
- package/node_modules/@fps-games/plugin-assets/dist/renderer.js +13 -0
- package/node_modules/@fps-games/plugin-assets/dist/renderer.js.map +1 -0
- package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts +12 -0
- package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts.map +1 -0
- package/node_modules/@fps-games/plugin-assets/dist/resources.js +8 -0
- package/node_modules/@fps-games/plugin-assets/dist/resources.js.map +1 -0
- package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts +2 -1
- package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/runtime.js +3 -0
- package/node_modules/@fps-games/plugin-assets/dist/runtime.js.map +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 +32 -8
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +24 -22
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -153,7 +153,7 @@ export interface EditorSceneRenderingPanelOptions {
|
|
|
153
153
|
export interface EditorSceneRenderingTextureAsset {
|
|
154
154
|
id: string;
|
|
155
155
|
label: string;
|
|
156
|
-
|
|
156
|
+
resource: PlayableResolvedAssetResource;
|
|
157
157
|
meta?: string;
|
|
158
158
|
usage?: 'material' | 'environment' | (string & {});
|
|
159
159
|
capabilities?: {
|
|
@@ -185,4 +185,5 @@ export interface EditorSceneRenderingProfileAuthoringHandlers {
|
|
|
185
185
|
summary: EditorSceneRenderingProfileSummary;
|
|
186
186
|
}) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
187
187
|
}
|
|
188
|
+
import type { PlayableResolvedAssetResource } from '@fps-games/playable-assets';
|
|
188
189
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rendering-profile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACrH,cAAc,+BAA+B,CAAC;AAE9C,MAAM,MAAM,qCAAqC,GAC7C,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,OAAO,GACP,aAAa,GACb,SAAS,CAAC;AAEd,MAAM,MAAM,uCAAuC,GAC/C,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,mBAAmB,GACnB,OAAO,GACP,aAAa,CAAC;AAElB,MAAM,MAAM,sCAAsC,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE9F,MAAM,MAAM,8BAA8B,GACtC,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,yBAAyB,GACzB,eAAe,GACf,YAAY,GACZ,QAAQ,CAAC;AAEb,MAAM,MAAM,8BAA8B,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzF,MAAM,MAAM,iCAAiC,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D,MAAM,MAAM,iCAAiC,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,qCAAqC,CAAC;IACjD,OAAO,EAAE,uCAAuC,CAAC;IACjD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAA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M,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClE;AACD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/rendering-profile/types.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC","sourcesContent":["import type { EditorSceneRenderingProfile, EditorSceneRenderingProfileSummary } from '@fps-games/playable-rendering';\nexport * from '@fps-games/playable-rendering';\n\nexport type EditorSceneRenderingPropertyValueType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'asset'\n | 'color'\n | 'string-list'\n | 'unknown';\n\nexport type EditorSceneRenderingPropertyControlKind =\n | 'readonly'\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'asset-picker-card'\n | 'color'\n | 'string-list';\n\nexport type EditorSceneRenderingPropertyCommitMode = 'live' | 'blur' | 'change' | 'immediate';\n\nexport type EditorSceneRenderingSystemKind =\n | 'environment'\n | 'rendering-group'\n | 'blob-shadow'\n | 'static-projected-shadow'\n | 'planar-shadow'\n | 'csm-shadow'\n | 'custom';\n\nexport type EditorSceneRenderingStatusTone = 'default' | 'success' | 'warning' | 'error';\n\nexport type EditorSceneRenderingPanelLanguage = 'zh' | 'en';\n\nexport type EditorSceneRenderingSectionLayout = 'cards' | 'list';\n\nexport interface EditorSceneRenderingProperty {\n path: string;\n label: string;\n valueType: EditorSceneRenderingPropertyValueType;\n control: EditorSceneRenderingPropertyControlKind;\n value: unknown;\n readOnly?: boolean;\n disabled?: boolean;\n disabledReason?: string;\n tooltip?: string;\n unit?: string;\n min?: number;\n max?: number;\n step?: number;\n options?: readonly EditorSceneRenderingPropertyEnumOption[];\n controlOptions?: Record<string, unknown>;\n placeholder?: string;\n commitMode?: EditorSceneRenderingPropertyCommitMode;\n tags?: readonly string[];\n actions?: readonly EditorSceneRenderingPanelAction[];\n}\n\nexport interface EditorSceneRenderingPropertyEnumOption {\n label: string;\n value: string | number | boolean;\n disabled?: boolean;\n}\n\nexport interface EditorSceneRenderingSystem {\n id: string;\n label: string;\n kind: EditorSceneRenderingSystemKind;\n group?: EditorSceneRenderingSystemGroup;\n active?: boolean;\n readOnly?: boolean;\n summary?: string;\n status?: string;\n details?: readonly EditorSceneRenderingSystemDetail[];\n progress?: EditorSceneRenderingProgress;\n collapsedByDefault?: boolean;\n properties: readonly EditorSceneRenderingProperty[];\n actions?: readonly EditorSceneRenderingPanelAction[];\n}\n\nexport interface EditorSceneRenderingSystemGroup {\n id: string;\n label: string;\n summary?: string;\n}\n\nexport interface EditorSceneRenderingSystemDetail {\n label: string;\n value: string;\n tone?: EditorSceneRenderingStatusTone;\n}\n\nexport interface EditorSceneRenderingProgress {\n label: string;\n value?: number;\n indeterminate?: boolean;\n}\n\nexport interface EditorSceneRenderingSection {\n id: string;\n title: string;\n summary?: string;\n collapsedByDefault?: boolean;\n systemsCollapsible?: boolean;\n layout?: EditorSceneRenderingSectionLayout;\n systems: EditorSceneRenderingSystem[];\n}\n\nexport interface EditorSceneRenderingPanelAction {\n id: string;\n label: string;\n icon?: 'undo' | 'save' | 'world' | 'status' | 'plus' | 'trash';\n disabled?: boolean;\n tooltip?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface EditorSceneRenderingPanelState {\n title?: string;\n summary?: string;\n dirty?: boolean;\n status?: string;\n statusTone?: EditorSceneRenderingStatusTone;\n actions?: EditorSceneRenderingPanelAction[];\n sections: EditorSceneRenderingSection[];\n}\n\nexport type EditorSceneStaticShadowBakeLifecycleStatus =\n | 'disabled'\n | 'baking'\n | 'missing'\n | 'preview-unsaved'\n | 'up-to-date'\n | 'out-of-date'\n | 'invalid';\n\nexport interface EditorSceneStaticShadowBakeStats {\n phase?: 'collect' | 'reuse' | 'chunk' | 'sdf' | 'pack' | 'encode' | 'complete' | (string & {});\n sourceRootCount?: number;\n sourceMeshCount?: number;\n attemptedChunkCount?: number;\n chunkCount?: number;\n textureCount?: number;\n skippedChunkCount?: number;\n pageCount?: number;\n resolution?: number;\n chunkSize?: number;\n atlasSize?: number;\n atlasUsedPixels?: number;\n atlasAllocatedPixels?: number;\n atlasOccupancy?: number;\n texelsPerMeter?: number;\n effectiveTexelsPerMeter?: number;\n maxAtlasPages?: number;\n sdfRadiusPx?: number;\n spatialChunkSize?: number;\n effectiveSpatialChunkSize?: number;\n targetChunkCount?: number;\n bakedChunkCount?: number;\n reusedChunkCount?: number;\n durationMs?: number;\n currentChunkId?: string;\n}\n\nexport interface EditorSceneStaticShadowBakeLifecycleState {\n status: EditorSceneStaticShadowBakeLifecycleStatus;\n chunkCount?: number;\n reason?: string | null;\n generatedAt?: string | null;\n stats?: EditorSceneStaticShadowBakeStats | null;\n progress?: EditorSceneRenderingProgress | null;\n}\n\nexport interface EditorSceneRenderingPanelStateInput {\n dirty?: boolean;\n lastError?: string | null;\n staticShadowBake?: EditorSceneStaticShadowBakeLifecycleState | null;\n shadowMapExperiment?: EditorSceneShadowMapExperimentPanelState | null;\n}\n\nexport interface EditorSceneShadowMapExperimentPanelState {\n configured: boolean;\n enabled: boolean;\n qualityProfileId: string | null;\n qualityProfileIds: readonly string[];\n maps?: {\n staticResolution: number;\n dynamicResolution: number;\n compositeResolution: number;\n } | null;\n filter?: string | null;\n bias?: number | null;\n normalBias?: number | null;\n darkness?: number | null;\n}\n\nexport interface EditorSceneRenderingPanelOptions {\n language?: EditorSceneRenderingPanelLanguage;\n textureAssets?: readonly EditorSceneRenderingTextureAsset[];\n}\n\nexport interface EditorSceneRenderingTextureAsset {\n id: string;\n label: string;\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/rendering-profile/types.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC","sourcesContent":["import type { EditorSceneRenderingProfile, EditorSceneRenderingProfileSummary } from '@fps-games/playable-rendering';\nexport * from '@fps-games/playable-rendering';\n\nexport type EditorSceneRenderingPropertyValueType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'asset'\n | 'color'\n | 'string-list'\n | 'unknown';\n\nexport type EditorSceneRenderingPropertyControlKind =\n | 'readonly'\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'asset-picker-card'\n | 'color'\n | 'string-list';\n\nexport type EditorSceneRenderingPropertyCommitMode = 'live' | 'blur' | 'change' | 'immediate';\n\nexport type EditorSceneRenderingSystemKind =\n | 'environment'\n | 'rendering-group'\n | 'blob-shadow'\n | 'static-projected-shadow'\n | 'planar-shadow'\n | 'csm-shadow'\n | 'custom';\n\nexport type EditorSceneRenderingStatusTone = 'default' | 'success' | 'warning' | 'error';\n\nexport type EditorSceneRenderingPanelLanguage = 'zh' | 'en';\n\nexport type EditorSceneRenderingSectionLayout = 'cards' | 'list';\n\nexport interface EditorSceneRenderingProperty {\n path: string;\n label: string;\n valueType: EditorSceneRenderingPropertyValueType;\n control: EditorSceneRenderingPropertyControlKind;\n value: unknown;\n readOnly?: boolean;\n disabled?: boolean;\n disabledReason?: string;\n tooltip?: string;\n unit?: string;\n min?: number;\n max?: number;\n step?: number;\n options?: readonly EditorSceneRenderingPropertyEnumOption[];\n controlOptions?: Record<string, unknown>;\n placeholder?: string;\n commitMode?: EditorSceneRenderingPropertyCommitMode;\n tags?: readonly string[];\n actions?: readonly EditorSceneRenderingPanelAction[];\n}\n\nexport interface EditorSceneRenderingPropertyEnumOption {\n label: string;\n value: string | number | boolean;\n disabled?: boolean;\n}\n\nexport interface EditorSceneRenderingSystem {\n id: string;\n label: string;\n kind: EditorSceneRenderingSystemKind;\n group?: EditorSceneRenderingSystemGroup;\n active?: boolean;\n readOnly?: boolean;\n summary?: string;\n status?: string;\n details?: readonly EditorSceneRenderingSystemDetail[];\n progress?: EditorSceneRenderingProgress;\n collapsedByDefault?: boolean;\n properties: readonly EditorSceneRenderingProperty[];\n actions?: readonly EditorSceneRenderingPanelAction[];\n}\n\nexport interface EditorSceneRenderingSystemGroup {\n id: string;\n label: string;\n summary?: string;\n}\n\nexport interface EditorSceneRenderingSystemDetail {\n label: string;\n value: string;\n tone?: EditorSceneRenderingStatusTone;\n}\n\nexport interface EditorSceneRenderingProgress {\n label: string;\n value?: number;\n indeterminate?: boolean;\n}\n\nexport interface EditorSceneRenderingSection {\n id: string;\n title: string;\n summary?: string;\n collapsedByDefault?: boolean;\n systemsCollapsible?: boolean;\n layout?: EditorSceneRenderingSectionLayout;\n systems: EditorSceneRenderingSystem[];\n}\n\nexport interface EditorSceneRenderingPanelAction {\n id: string;\n label: string;\n icon?: 'undo' | 'save' | 'world' | 'status' | 'plus' | 'trash';\n disabled?: boolean;\n tooltip?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface EditorSceneRenderingPanelState {\n title?: string;\n summary?: string;\n dirty?: boolean;\n status?: string;\n statusTone?: EditorSceneRenderingStatusTone;\n actions?: EditorSceneRenderingPanelAction[];\n sections: EditorSceneRenderingSection[];\n}\n\nexport type EditorSceneStaticShadowBakeLifecycleStatus =\n | 'disabled'\n | 'baking'\n | 'missing'\n | 'preview-unsaved'\n | 'up-to-date'\n | 'out-of-date'\n | 'invalid';\n\nexport interface EditorSceneStaticShadowBakeStats {\n phase?: 'collect' | 'reuse' | 'chunk' | 'sdf' | 'pack' | 'encode' | 'complete' | (string & {});\n sourceRootCount?: number;\n sourceMeshCount?: number;\n attemptedChunkCount?: number;\n chunkCount?: number;\n textureCount?: number;\n skippedChunkCount?: number;\n pageCount?: number;\n resolution?: number;\n chunkSize?: number;\n atlasSize?: number;\n atlasUsedPixels?: number;\n atlasAllocatedPixels?: number;\n atlasOccupancy?: number;\n texelsPerMeter?: number;\n effectiveTexelsPerMeter?: number;\n maxAtlasPages?: number;\n sdfRadiusPx?: number;\n spatialChunkSize?: number;\n effectiveSpatialChunkSize?: number;\n targetChunkCount?: number;\n bakedChunkCount?: number;\n reusedChunkCount?: number;\n durationMs?: number;\n currentChunkId?: string;\n}\n\nexport interface EditorSceneStaticShadowBakeLifecycleState {\n status: EditorSceneStaticShadowBakeLifecycleStatus;\n chunkCount?: number;\n reason?: string | null;\n generatedAt?: string | null;\n stats?: EditorSceneStaticShadowBakeStats | null;\n progress?: EditorSceneRenderingProgress | null;\n}\n\nexport interface EditorSceneRenderingPanelStateInput {\n dirty?: boolean;\n lastError?: string | null;\n staticShadowBake?: EditorSceneStaticShadowBakeLifecycleState | null;\n shadowMapExperiment?: EditorSceneShadowMapExperimentPanelState | null;\n}\n\nexport interface EditorSceneShadowMapExperimentPanelState {\n configured: boolean;\n enabled: boolean;\n qualityProfileId: string | null;\n qualityProfileIds: readonly string[];\n maps?: {\n staticResolution: number;\n dynamicResolution: number;\n compositeResolution: number;\n } | null;\n filter?: string | null;\n bias?: number | null;\n normalBias?: number | null;\n darkness?: number | null;\n}\n\nexport interface EditorSceneRenderingPanelOptions {\n language?: EditorSceneRenderingPanelLanguage;\n textureAssets?: readonly EditorSceneRenderingTextureAsset[];\n}\n\nexport interface EditorSceneRenderingTextureAsset {\n id: string;\n label: string;\n resource: PlayableResolvedAssetResource;\n meta?: string;\n usage?: 'material' | 'environment' | (string & {});\n capabilities?: {\n materialTexture?: boolean;\n environmentTexture?: boolean;\n };\n}\n\nexport interface EditorSceneRenderingProfileDraftState {\n savedConfig: Record<string, unknown>;\n draftConfig: Record<string, unknown>;\n dirty: boolean;\n lastError: string | null;\n}\n\nexport interface EditorSceneRenderingProfileAuthoringRequest {\n method?: string;\n body?: Record<string, unknown>;\n}\n\nexport interface EditorSceneRenderingProfileAuthoringLoadResult {\n renderingConfig: unknown;\n response?: Record<string, unknown>;\n}\n\nexport interface EditorSceneRenderingProfileAuthoringHandlers {\n readBody?: (\n request: EditorSceneRenderingProfileAuthoringRequest,\n ) => Record<string, unknown> | Promise<Record<string, unknown>>;\n loadConfig?: () => unknown | EditorSceneRenderingProfileAuthoringLoadResult | Promise<unknown | EditorSceneRenderingProfileAuthoringLoadResult>;\n saveConfig?: (input: {\n body: Record<string, unknown>;\n renderingConfig: Record<string, unknown>;\n normalized: EditorSceneRenderingProfile;\n summary: EditorSceneRenderingProfileSummary;\n }) => Record<string, unknown> | Promise<Record<string, unknown>>;\n}\nimport type { PlayableResolvedAssetResource } from '@fps-games/playable-assets';\n"]}
|
|
@@ -76,11 +76,7 @@ function resolveStaticEditorSceneRuntimePreviewAssetUrl(assetsModule, assetId, k
|
|
|
76
76
|
? assetsModule.resolveTextureAssetUrl
|
|
77
77
|
: assetsModule.resolveModelAssetUrl;
|
|
78
78
|
const typedUrl = typeof typedResolver === 'function' ? typedResolver(assetId) : null;
|
|
79
|
-
|
|
80
|
-
? assetsModule.resolveAssetUrl(assetId)
|
|
81
|
-
: null;
|
|
82
|
-
return resolveEditorSceneRuntimePreviewAssetUrlCandidate(typedUrl)
|
|
83
|
-
?? resolveEditorSceneRuntimePreviewAssetUrlCandidate(fallbackUrl);
|
|
79
|
+
return resolveEditorSceneRuntimePreviewAssetUrlCandidate(typedUrl);
|
|
84
80
|
}
|
|
85
81
|
function resolveGeneratedEditorSceneRuntimePreviewAssetRelativeUrl(relativePath) {
|
|
86
82
|
const directProjectUrl = normalizeEditorSceneRuntimePreviewProjectUrlPath(relativePath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/runtime-preview/assets.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,oCAAoC,CAAC,KAAc;IACjE,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC;WACnC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;WAC5B,EAAE,CAAC;AACV,CAAC;AAED,MAAM,UAAU,sCAAsC,CAAC,KAAc;IACnE,MAAM,QAAQ,GAAG,0CAA0C,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,GAAG,GAAG,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC;WACxC,kBAAkB,CAAC,QAAQ,CAAC,SAAS,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AC,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG;YAAE,SAAS;QACpC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;YAC/B,KAAK,CAAC,GAAG,EAAE,CAAC;YACZ,SAAS;QACX,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9E,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAgC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC","sourcesContent":["import type {\n EditorSceneRuntimePreviewAssetsModule,\n EditorSceneRuntimePreviewKind,\n} from './types';\n\nexport function readEditorSceneRuntimePreviewAssetId(asset: unknown): string {\n const value = readRecord(asset);\n return readOptionalString(value.assetId)\n ?? readOptionalString(value.id)\n ?? '';\n}\n\nexport function readEditorSceneRuntimePreviewAssetKind(asset: unknown): EditorSceneRuntimePreviewKind | null {\n const metadata = readEditorSceneRuntimePreviewAssetMetadata(asset);\n const raw = readOptionalString(metadata.type)\n ?? readOptionalString(metadata.assetType)\n ?? readOptionalString(readRecord(asset).kind);\n if (raw === 'texture') return 'texture';\n if (raw === 'model') return 'model';\n return null;\n}\n\nexport function readEditorSceneRuntimePreviewAssetMetadata(asset: unknown): Record<string, unknown> {\n return readRecord(readRecord(asset).metadata);\n}\n\nexport function resolveEditorSceneRuntimePreviewAssetUrl(\n assetsModule: EditorSceneRuntimePreviewAssetsModule,\n asset: unknown,\n kind: EditorSceneRuntimePreviewKind,\n): string | null {\n const assetId = readEditorSceneRuntimePreviewAssetId(asset);\n const metadata = readEditorSceneRuntimePreviewAssetMetadata(asset);\n const candidates: unknown[] = [];\n\n if (assetId) {\n candidates.push(resolveStaticEditorSceneRuntimePreviewAssetUrl(assetsModule, assetId, kind));\n\n const catalogEntry = readRecord(readRecord(assetsModule.ASSET_CATALOG)[assetId]);\n const catalogExternal = readRecord(catalogEntry.external);\n candidates.push(\n catalogEntry.url,\n catalogEntry.relativePath,\n catalogExternal.assetUrl,\n catalogExternal.assetPath,\n );\n }\n\n const metadataExternal = readRecord(metadata.external);\n candidates.push(\n metadata.assetUrl,\n metadata.relativePath,\n metadata.assetPath,\n metadataExternal.assetUrl,\n metadataExternal.assetPath,\n );\n\n for (const candidate of candidates) {\n const url = resolveEditorSceneRuntimePreviewAssetUrlCandidate(candidate);\n if (url) return url;\n }\n\n return null;\n}\n\nexport function resolveEditorSceneRuntimePreviewAssetUrlCandidate(value: unknown): string | null {\n const raw = readOptionalString(value);\n if (!raw) return null;\n const candidate = raw.replace(/\\\\/g, '/');\n if (/^(https?:|data:|blob:)/i.test(candidate)) return candidate;\n if (candidate.startsWith('/@fs/')) return candidate;\n if (candidate.startsWith('/src/')) return candidate;\n if (candidate.startsWith('/')) return candidate;\n\n const projectUrl = normalizeEditorSceneRuntimePreviewProjectUrlPath(candidate);\n if (projectUrl) return projectUrl;\n\n const [pathname, suffix] = splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(candidate);\n if (pathname.startsWith('/') && pathname.includes('/src/assets/')) return `/@fs${pathname}${suffix}`;\n\n return resolveGeneratedEditorSceneRuntimePreviewAssetRelativeUrl(candidate);\n}\n\nexport function normalizeEditorSceneRuntimePreviewProjectUrlPath(path: string): string | null {\n const [pathname, suffix] = splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(path.replace(/\\\\/g, '/'));\n const withoutDot = pathname.startsWith('./') ? pathname.slice(2) : pathname;\n if (withoutDot.startsWith('/src/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(withoutDot.slice(1), suffix);\n if (withoutDot.startsWith('src/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(withoutDot, suffix);\n if (withoutDot.startsWith('assets/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(`src/${withoutDot}`, suffix);\n if (withoutDot.startsWith('imported/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(`src/assets/${withoutDot}`, suffix);\n return null;\n}\n\nfunction resolveStaticEditorSceneRuntimePreviewAssetUrl(\n assetsModule: EditorSceneRuntimePreviewAssetsModule,\n assetId: string,\n kind: EditorSceneRuntimePreviewKind,\n): string | null {\n const typedResolver = kind === 'texture'\n ? assetsModule.resolveTextureAssetUrl\n : assetsModule.resolveModelAssetUrl;\n const typedUrl = typeof typedResolver === 'function' ? typedResolver(assetId) : null;\n const fallbackUrl = typeof assetsModule.resolveAssetUrl === 'function'\n ? assetsModule.resolveAssetUrl(assetId)\n : null;\n return resolveEditorSceneRuntimePreviewAssetUrlCandidate(typedUrl)\n ?? resolveEditorSceneRuntimePreviewAssetUrlCandidate(fallbackUrl);\n}\n\nfunction resolveGeneratedEditorSceneRuntimePreviewAssetRelativeUrl(relativePath: string): string | null {\n const directProjectUrl = normalizeEditorSceneRuntimePreviewProjectUrlPath(relativePath);\n if (directProjectUrl) return directProjectUrl;\n\n const [pathname, suffix] = splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(relativePath.replace(/\\\\/g, '/'));\n if (!pathname || pathname.startsWith('/') || /^[a-z][a-z0-9+.-]*:/i.test(pathname)) return null;\n\n const normalized = normalizeEditorSceneRuntimePreviewUrlPathParts(`src/assets/generated/${pathname}`);\n return normalized ? `/${normalized}${suffix}` : null;\n}\n\nfunction formatEditorSceneRuntimePreviewProjectAssetUrl(path: string, suffix: string): string | null {\n const normalized = normalizeEditorSceneRuntimePreviewUrlPathParts(path);\n return normalized ? `/${normalized}${suffix}` : null;\n}\n\nfunction splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(value: string): [string, string] {\n const suffixIndex = value.search(/[?#]/);\n return suffixIndex === -1 ? [value, ''] : [value.slice(0, suffixIndex), value.slice(suffixIndex)];\n}\n\nfunction normalizeEditorSceneRuntimePreviewUrlPathParts(path: string): string | null {\n const stack: string[] = [];\n for (const part of path.split('/')) {\n if (!part || part === '.') continue;\n if (part === '..') {\n if (!stack.length) return null;\n stack.pop();\n continue;\n }\n stack.push(part);\n }\n return stack.length ? stack.join('/') : null;\n}\n\nfunction readOptionalString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n}\n\nfunction readRecord(value: unknown): Record<string, unknown> {\n return value && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, unknown> : {};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/runtime-preview/assets.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,oCAAoC,CAAC,KAAc;IACjE,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC;WACnC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;WAC5B,EAAE,CAAC;AACV,CAAC;AAED,MAAM,UAAU,sCAAsC,CAAC,KAAc;IACnE,MAAM,QAAQ,GAAG,0CAA0C,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,GAAG,GAAG,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC;WACxC,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC;WACtC,kBAAkB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,GAAG,KAAK,SAAS;Q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AC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9E,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAgC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC","sourcesContent":["import type {\n EditorSceneRuntimePreviewAssetsModule,\n EditorSceneRuntimePreviewKind,\n} from './types';\n\nexport function readEditorSceneRuntimePreviewAssetId(asset: unknown): string {\n const value = readRecord(asset);\n return readOptionalString(value.assetId)\n ?? readOptionalString(value.id)\n ?? '';\n}\n\nexport function readEditorSceneRuntimePreviewAssetKind(asset: unknown): EditorSceneRuntimePreviewKind | null {\n const metadata = readEditorSceneRuntimePreviewAssetMetadata(asset);\n const raw = readOptionalString(metadata.type)\n ?? readOptionalString(metadata.assetType)\n ?? readOptionalString(readRecord(asset).kind);\n if (raw === 'texture') return 'texture';\n if (raw === 'model') return 'model';\n return null;\n}\n\nexport function readEditorSceneRuntimePreviewAssetMetadata(asset: unknown): Record<string, unknown> {\n return readRecord(readRecord(asset).metadata);\n}\n\nexport function resolveEditorSceneRuntimePreviewAssetUrl(\n assetsModule: EditorSceneRuntimePreviewAssetsModule,\n asset: unknown,\n kind: EditorSceneRuntimePreviewKind,\n): string | null {\n const assetId = readEditorSceneRuntimePreviewAssetId(asset);\n const metadata = readEditorSceneRuntimePreviewAssetMetadata(asset);\n const candidates: unknown[] = [];\n\n if (assetId) {\n candidates.push(resolveStaticEditorSceneRuntimePreviewAssetUrl(assetsModule, assetId, kind));\n\n const catalogEntry = readRecord(readRecord(assetsModule.ASSET_CATALOG)[assetId]);\n const catalogExternal = readRecord(catalogEntry.external);\n candidates.push(\n catalogEntry.url,\n catalogEntry.relativePath,\n catalogExternal.assetUrl,\n catalogExternal.assetPath,\n );\n }\n\n const metadataExternal = readRecord(metadata.external);\n candidates.push(\n metadata.assetUrl,\n metadata.relativePath,\n metadata.assetPath,\n metadataExternal.assetUrl,\n metadataExternal.assetPath,\n );\n\n for (const candidate of candidates) {\n const url = resolveEditorSceneRuntimePreviewAssetUrlCandidate(candidate);\n if (url) return url;\n }\n\n return null;\n}\n\nexport function resolveEditorSceneRuntimePreviewAssetUrlCandidate(value: unknown): string | null {\n const raw = readOptionalString(value);\n if (!raw) return null;\n const candidate = raw.replace(/\\\\/g, '/');\n if (/^(https?:|data:|blob:)/i.test(candidate)) return candidate;\n if (candidate.startsWith('/@fs/')) return candidate;\n if (candidate.startsWith('/src/')) return candidate;\n if (candidate.startsWith('/')) return candidate;\n\n const projectUrl = normalizeEditorSceneRuntimePreviewProjectUrlPath(candidate);\n if (projectUrl) return projectUrl;\n\n const [pathname, suffix] = splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(candidate);\n if (pathname.startsWith('/') && pathname.includes('/src/assets/')) return `/@fs${pathname}${suffix}`;\n\n return resolveGeneratedEditorSceneRuntimePreviewAssetRelativeUrl(candidate);\n}\n\nexport function normalizeEditorSceneRuntimePreviewProjectUrlPath(path: string): string | null {\n const [pathname, suffix] = splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(path.replace(/\\\\/g, '/'));\n const withoutDot = pathname.startsWith('./') ? pathname.slice(2) : pathname;\n if (withoutDot.startsWith('/src/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(withoutDot.slice(1), suffix);\n if (withoutDot.startsWith('src/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(withoutDot, suffix);\n if (withoutDot.startsWith('assets/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(`src/${withoutDot}`, suffix);\n if (withoutDot.startsWith('imported/')) return formatEditorSceneRuntimePreviewProjectAssetUrl(`src/assets/${withoutDot}`, suffix);\n return null;\n}\n\nfunction resolveStaticEditorSceneRuntimePreviewAssetUrl(\n assetsModule: EditorSceneRuntimePreviewAssetsModule,\n assetId: string,\n kind: EditorSceneRuntimePreviewKind,\n): string | null {\n const typedResolver = kind === 'texture'\n ? assetsModule.resolveTextureAssetUrl\n : assetsModule.resolveModelAssetUrl;\n const typedUrl = typeof typedResolver === 'function' ? typedResolver(assetId) : null;\n return resolveEditorSceneRuntimePreviewAssetUrlCandidate(typedUrl);\n}\n\nfunction resolveGeneratedEditorSceneRuntimePreviewAssetRelativeUrl(relativePath: string): string | null {\n const directProjectUrl = normalizeEditorSceneRuntimePreviewProjectUrlPath(relativePath);\n if (directProjectUrl) return directProjectUrl;\n\n const [pathname, suffix] = splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(relativePath.replace(/\\\\/g, '/'));\n if (!pathname || pathname.startsWith('/') || /^[a-z][a-z0-9+.-]*:/i.test(pathname)) return null;\n\n const normalized = normalizeEditorSceneRuntimePreviewUrlPathParts(`src/assets/generated/${pathname}`);\n return normalized ? `/${normalized}${suffix}` : null;\n}\n\nfunction formatEditorSceneRuntimePreviewProjectAssetUrl(path: string, suffix: string): string | null {\n const normalized = normalizeEditorSceneRuntimePreviewUrlPathParts(path);\n return normalized ? `/${normalized}${suffix}` : null;\n}\n\nfunction splitEditorSceneRuntimePreviewAssetUrlPathAndSuffix(value: string): [string, string] {\n const suffixIndex = value.search(/[?#]/);\n return suffixIndex === -1 ? [value, ''] : [value.slice(0, suffixIndex), value.slice(suffixIndex)];\n}\n\nfunction normalizeEditorSceneRuntimePreviewUrlPathParts(path: string): string | null {\n const stack: string[] = [];\n for (const part of path.split('/')) {\n if (!part || part === '.') continue;\n if (part === '..') {\n if (!stack.length) return null;\n stack.pop();\n continue;\n }\n stack.push(part);\n }\n return stack.length ? stack.join('/') : null;\n}\n\nfunction readOptionalString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n}\n\nfunction readRecord(value: unknown): Record<string, unknown> {\n return value && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, unknown> : {};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/scene-source/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,aAAa,CAAC;AA0BrB,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,wBAAsB,mBAAmB,CACvC,SAAS,SAAS,mBAAmB,GAAG,mBAAmB,EAE3D,OAAO,CAAC,EAAE,4BAA4B,GAAG,oBAAoB,GAC5D,OAAO,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAuBrD;AAED,wBAAsB,mBAAmB,CACvC,SAAS,SAAS,mBAAmB,GAAG,mBAAmB,EAE3D,WAAW,EAAE,SAAS,EACtB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/scene-source/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,aAAa,CAAC;AA0BrB,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,wBAAsB,mBAAmB,CACvC,SAAS,SAAS,mBAAmB,GAAG,mBAAmB,EAE3D,OAAO,CAAC,EAAE,4BAA4B,GAAG,oBAAoB,GAC5D,OAAO,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAuBrD;AAED,wBAAsB,mBAAmB,CACvC,SAAS,SAAS,mBAAmB,GAAG,mBAAmB,EAE3D,WAAW,EAAE,SAAS,EACtB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,CAuC/C;AAuBD,wBAAsB,sBAAsB,CAC1C,OAAO,CAAC,EAAE,4BAA4B,GAAG,oBAAoB,GAC5D,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAIxC;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,CAAC,EAAE,4BAA4B,GAAG,oBAAoB,GAC5D,OAAO,CAAC,yBAAyB,CAAC,CAIpC;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,4BAA4B,GAAG,oBAAoB,GAC5D,OAAO,CAAC,wBAAwB,CAAC,CAKnC;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,IAAI,CAAC,4BAA4B,EAAE,cAAc,CAAC,GAC3D,wBAAwB,GAAG,IAAI,CAgBjC"}
|
|
@@ -35,12 +35,20 @@ export async function loadSceneMainSource(options) {
|
|
|
35
35
|
export async function saveSceneMainSource(editorScene, options) {
|
|
36
36
|
const client = resolveClientOptions(options);
|
|
37
37
|
assertPlayableEditorSceneDocumentContract(editorScene);
|
|
38
|
+
const expectedAuthoringSourceRevision = typeof options?.expectedAuthoringSourceRevision === 'number'
|
|
39
|
+
? options.expectedAuthoringSourceRevision
|
|
40
|
+
: typeof editorScene.meta?.authoringSource?.revision === 'number'
|
|
41
|
+
? editorScene.meta.authoringSource.revision
|
|
42
|
+
: undefined;
|
|
38
43
|
const saved = await client.fetchJson(joinEndpoint(client.endpointBase, '/save-editor-scene'), {
|
|
39
44
|
method: 'POST',
|
|
40
45
|
headers: { 'Content-Type': 'application/json' },
|
|
41
46
|
body: JSON.stringify({
|
|
42
47
|
editorScene,
|
|
43
48
|
mode: options?.mode ?? 'local-commit-save',
|
|
49
|
+
...(typeof expectedAuthoringSourceRevision === 'number'
|
|
50
|
+
? { expectedAuthoringSourceRevision }
|
|
51
|
+
: {}),
|
|
44
52
|
...createSceneMainSourceSaveCompanionConfigPayload(options),
|
|
45
53
|
}),
|
|
46
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/scene-source/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,gCAAgC,GACjC,MAAM,cAAc,CAAC;AAKtB,OAAO,EACL,SAAS,EACT,YAAY,EACZ,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,gCAAgC,EAChC,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,+CAA+C,EAC/C,uCAAuC,GACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,yCAAyC,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EACL,+BAA+B,GAEhC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,4BAA4B,EAC5B,6BAA6B,GAI9B,MAAM,wBAAwB,CAAC;AAShC,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAGvC,OAA6D;IAE7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EditorSceneAuthoringSource,\n} from '../authoring';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n} from '../document';\nimport {\n fetchJson,\n joinEndpoint,\n PLAYABLE_AUTHORING_API_BASE,\n} from '../shared/http';\nimport { readString } from '../shared/json';\nimport {\n readCompiledRuntimeSceneArtifact,\n summarizeSaveResult,\n} from './artifacts';\nimport {\n createSceneMainSourceSaveCompanionConfigPayload,\n readSceneMainSourceSaveCompanionConfigs,\n} from './companion-configs';\nimport {\n readEditorAssetLibrary,\n readEditorScene,\n readRuntimeInputDrift,\n summarizeEditorSceneSource,\n} from './protocol';\nimport { assertPlayableEditorSceneDocumentContract } from '../scene-compiler/validation';\nimport {\n assertShadowMapExperimentConfig,\n type ShadowMapExperimentConfig,\n} from '@fps-games/playable-rendering';\nimport {\n resolveEditorProjectFileExtension,\n resolveEditorProjectMediaSupport,\n readEditorProjectFileContent,\n readEditorProjectFileSnapshot,\n type EditorProjectFileContent,\n type EditorProjectFileSnapshot,\n type EditorProjectMediaSource,\n} from '../project-files/index';\nimport type {\n SceneMainSourceClientOptions,\n SceneMainSourceDriverLoadResult,\n SceneMainSourceSaveOptions,\n SceneMainSourceSaveResult,\n SceneSourceFetchJson,\n} from './types';\n\nexport async function loadSceneMainSource<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n>(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<SceneMainSourceDriverLoadResult<TDocument>> {\n const client = resolveClientOptions(options);\n const json = await client.fetchJson(joinEndpoint(client.endpointBase, '/editor-scene'));\n const editorScene = readEditorScene<TDocument>(json.editorScene);\n if (!editorScene) throw new Error('project authoring endpoint did not return editorScene');\n const document = ensureEditorSceneAuthoringSource(editorScene);\n const drift = readRuntimeInputDrift(json.drift);\n const companionConfigs = readSceneMainSourceSaveCompanionConfigs(json);\n const renderingConfig = companionConfigs.rendering ?? undefined;\n const shadowMapExperimentConfig = readSceneMainSourceShadowMapExperimentConfig(json);\n const assets = Object.prototype.hasOwnProperty.call(json, 'assets')\n ? readEditorAssetLibrary(json.assets)\n : undefined;\n return {\n source: createEditorSceneAuthoringSourceDescriptor(document, readString(json.editorScenePath)),\n document,\n ...(assets ? { assets } : {}),\n drift,\n companionConfigs,\n ...(renderingConfig ? { renderingConfig } : {}),\n ...(shadowMapExperimentConfig ? { shadowMapExperimentConfig } : {}),\n summary: summarizeEditorSceneSource(document, drift),\n };\n}\n\nexport async function saveSceneMainSource<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n>(\n editorScene: TDocument,\n options?: SceneMainSourceSaveOptions,\n): Promise<SceneMainSourceSaveResult<TDocument>> {\n const client = resolveClientOptions(options);\n assertPlayableEditorSceneDocumentContract(editorScene);\n const saved = await client.fetchJson(joinEndpoint(client.endpointBase, '/save-editor-scene'), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n editorScene,\n mode: options?.mode ?? 'local-commit-save',\n ...createSceneMainSourceSaveCompanionConfigPayload(options),\n }),\n });\n const document = Object.prototype.hasOwnProperty.call(saved, 'editorScene')\n ? readRequiredEditorScene<TDocument>(saved.editorScene, '$.editorScene')\n : editorScene;\n const source = createEditorSceneAuthoringSourceDescriptor(document, readString(saved.editorScenePath));\n const compiledArtifact = readCompiledRuntimeSceneArtifact(saved, source);\n const companionConfigs = readSceneMainSourceSaveCompanionConfigs(saved);\n const renderingConfig = companionConfigs.rendering ?? undefined;\n const shadowMapExperimentConfig = readSceneMainSourceShadowMapExperimentConfig(saved);\n return {\n source,\n document,\n summary: summarizeSaveResult(saved),\n compiledArtifact,\n companionConfigs,\n expectedVersion: typeof saved.expectedVersion === 'number' ? saved.expectedVersion : undefined,\n renderingConfig,\n ...(shadowMapExperimentConfig ? { shadowMapExperimentConfig } : {}),\n sceneJsonText: typeof saved.sceneJsonText === 'string' ? saved.sceneJsonText : undefined,\n };\n}\n\nfunction readSceneMainSourceShadowMapExperimentConfig(\n value: Record<string, unknown>,\n): ShadowMapExperimentConfig | undefined {\n if (!Object.prototype.hasOwnProperty.call(value, 'shadowMapExperimentConfig')) return undefined;\n const config = value.shadowMapExperimentConfig;\n if (config == null) return undefined;\n assertShadowMapExperimentConfig(config);\n return structuredClone(config);\n}\n\nfunction readRequiredEditorScene<TDocument extends EditorSceneDocument>(\n value: unknown,\n path: string,\n): TDocument {\n const document = readEditorScene<TDocument>(value);\n if (document) return document;\n const error = new Error(`schema.invalidType: ${path}`);\n Object.assign(error, { code: 'schema.invalidType', path });\n throw error;\n}\n\nexport async function loadEditorAssetLibrary(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<EditorSceneAssetLibraryItem[]> {\n const client = resolveClientOptions(options);\n const json = await client.fetchJson(joinEndpoint(client.endpointBase, '/editor-asset-library'));\n return readEditorAssetLibrary(json.assets);\n}\n\nexport async function loadEditorProjectFiles(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<EditorProjectFileSnapshot> {\n const client = resolveClientOptions(options);\n const json = await client.fetchJson(joinEndpoint(client.endpointBase, '/project-files'));\n return readEditorProjectFileSnapshot(json);\n}\n\nexport async function loadEditorProjectFile(\n path: string,\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<EditorProjectFileContent> {\n const client = resolveClientOptions(options);\n const endpoint = joinEndpoint(client.endpointBase, `/project-file?path=${encodeURIComponent(path)}`);\n const json = await client.fetchJson(endpoint);\n return readEditorProjectFileContent(json);\n}\n\nexport function resolveEditorProjectMediaSource(\n path: string,\n options?: Pick<SceneMainSourceClientOptions, 'endpointBase'>,\n): EditorProjectMediaSource | null {\n const relativePath = normalizeEditorProjectClientPath(path);\n if (!relativePath) return null;\n const support = resolveEditorProjectMediaSupport(relativePath);\n if (!support) return null;\n const endpointBase = options?.endpointBase ?? PLAYABLE_AUTHORING_API_BASE;\n const pathSegments = relativePath.split('/');\n const name = pathSegments[pathSegments.length - 1] ?? relativePath;\n return {\n path: relativePath,\n name,\n extension: resolveEditorProjectFileExtension(name),\n kind: support.kind,\n mimeType: support.mimeType,\n url: joinEndpoint(endpointBase, `/project-media?path=${encodeURIComponent(relativePath)}`),\n };\n}\n\nfunction normalizeEditorProjectClientPath(value: string): string | null {\n const normalized = value.trim().replace(/\\\\/g, '/').replace(/^\\/+/, '');\n if (!normalized || /^[A-Za-z]:\\//.test(normalized)) return null;\n const segments = normalized.split('/');\n return segments.some(segment => !segment || segment === '.' || segment === '..')\n ? null\n : segments.join('/');\n}\n\nfunction resolveClientOptions(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Required<SceneMainSourceClientOptions> {\n if (typeof options === 'function') {\n return {\n endpointBase: PLAYABLE_AUTHORING_API_BASE,\n fetchJson: options,\n };\n }\n return {\n endpointBase: options?.endpointBase ?? PLAYABLE_AUTHORING_API_BASE,\n fetchJson: options?.fetchJson ?? fetchJson,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/scene-source/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,gCAAgC,GACjC,MAAM,cAAc,CAAC;AAKtB,OAAO,EACL,SAAS,EACT,YAAY,EACZ,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,gCAAgC,EAChC,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,+CAA+C,EAC/C,uCAAuC,GACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,yCAAyC,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EACL,+BAA+B,GAEhC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,4BAA4B,EAC5B,6BAA6B,GAI9B,MAAM,wBAAwB,CAA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AI,CAAC;QAC9E,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,oBAAoB,CAC3B,OAA6D;IAE7D,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,OAAO;YACL,YAAY,EAAE,2BAA2B;YACzC,SAAS,EAAE,OAAO;SACnB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,YAAY,EAAE,OAAO,EAAE,YAAY,IAAI,2BAA2B;QAClE,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,SAAS;KAC3C,CAAC;AACJ,CAAC","sourcesContent":["import {\n createEditorSceneAuthoringSourceDescriptor,\n ensureEditorSceneAuthoringSource,\n} from '../authoring';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n} from '../document';\nimport {\n fetchJson,\n joinEndpoint,\n PLAYABLE_AUTHORING_API_BASE,\n} from '../shared/http';\nimport { readString } from '../shared/json';\nimport {\n readCompiledRuntimeSceneArtifact,\n summarizeSaveResult,\n} from './artifacts';\nimport {\n createSceneMainSourceSaveCompanionConfigPayload,\n readSceneMainSourceSaveCompanionConfigs,\n} from './companion-configs';\nimport {\n readEditorAssetLibrary,\n readEditorScene,\n readRuntimeInputDrift,\n summarizeEditorSceneSource,\n} from './protocol';\nimport { assertPlayableEditorSceneDocumentContract } from '../scene-compiler/validation';\nimport {\n assertShadowMapExperimentConfig,\n type ShadowMapExperimentConfig,\n} from '@fps-games/playable-rendering';\nimport {\n resolveEditorProjectFileExtension,\n resolveEditorProjectMediaSupport,\n readEditorProjectFileContent,\n readEditorProjectFileSnapshot,\n type EditorProjectFileContent,\n type EditorProjectFileSnapshot,\n type EditorProjectMediaSource,\n} from '../project-files/index';\nimport type {\n SceneMainSourceClientOptions,\n SceneMainSourceDriverLoadResult,\n SceneMainSourceSaveOptions,\n SceneMainSourceSaveResult,\n SceneSourceFetchJson,\n} from './types';\n\nexport async function loadSceneMainSource<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n>(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<SceneMainSourceDriverLoadResult<TDocument>> {\n const client = resolveClientOptions(options);\n const json = await client.fetchJson(joinEndpoint(client.endpointBase, '/editor-scene'));\n const editorScene = readEditorScene<TDocument>(json.editorScene);\n if (!editorScene) throw new Error('project authoring endpoint did not return editorScene');\n const document = ensureEditorSceneAuthoringSource(editorScene);\n const drift = readRuntimeInputDrift(json.drift);\n const companionConfigs = readSceneMainSourceSaveCompanionConfigs(json);\n const renderingConfig = companionConfigs.rendering ?? undefined;\n const shadowMapExperimentConfig = readSceneMainSourceShadowMapExperimentConfig(json);\n const assets = Object.prototype.hasOwnProperty.call(json, 'assets')\n ? readEditorAssetLibrary(json.assets)\n : undefined;\n return {\n source: createEditorSceneAuthoringSourceDescriptor(document, readString(json.editorScenePath)),\n document,\n ...(assets ? { assets } : {}),\n drift,\n companionConfigs,\n ...(renderingConfig ? { renderingConfig } : {}),\n ...(shadowMapExperimentConfig ? { shadowMapExperimentConfig } : {}),\n summary: summarizeEditorSceneSource(document, drift),\n };\n}\n\nexport async function saveSceneMainSource<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n>(\n editorScene: TDocument,\n options?: SceneMainSourceSaveOptions,\n): Promise<SceneMainSourceSaveResult<TDocument>> {\n const client = resolveClientOptions(options);\n assertPlayableEditorSceneDocumentContract(editorScene);\n const expectedAuthoringSourceRevision = typeof options?.expectedAuthoringSourceRevision === 'number'\n ? options.expectedAuthoringSourceRevision\n : typeof editorScene.meta?.authoringSource?.revision === 'number'\n ? editorScene.meta.authoringSource.revision\n : undefined;\n const saved = await client.fetchJson(joinEndpoint(client.endpointBase, '/save-editor-scene'), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n editorScene,\n mode: options?.mode ?? 'local-commit-save',\n ...(typeof expectedAuthoringSourceRevision === 'number'\n ? { expectedAuthoringSourceRevision }\n : {}),\n ...createSceneMainSourceSaveCompanionConfigPayload(options),\n }),\n });\n const document = Object.prototype.hasOwnProperty.call(saved, 'editorScene')\n ? readRequiredEditorScene<TDocument>(saved.editorScene, '$.editorScene')\n : editorScene;\n const source = createEditorSceneAuthoringSourceDescriptor(document, readString(saved.editorScenePath));\n const compiledArtifact = readCompiledRuntimeSceneArtifact(saved, source);\n const companionConfigs = readSceneMainSourceSaveCompanionConfigs(saved);\n const renderingConfig = companionConfigs.rendering ?? undefined;\n const shadowMapExperimentConfig = readSceneMainSourceShadowMapExperimentConfig(saved);\n return {\n source,\n document,\n summary: summarizeSaveResult(saved),\n compiledArtifact,\n companionConfigs,\n expectedVersion: typeof saved.expectedVersion === 'number' ? saved.expectedVersion : undefined,\n renderingConfig,\n ...(shadowMapExperimentConfig ? { shadowMapExperimentConfig } : {}),\n sceneJsonText: typeof saved.sceneJsonText === 'string' ? saved.sceneJsonText : undefined,\n };\n}\n\nfunction readSceneMainSourceShadowMapExperimentConfig(\n value: Record<string, unknown>,\n): ShadowMapExperimentConfig | undefined {\n if (!Object.prototype.hasOwnProperty.call(value, 'shadowMapExperimentConfig')) return undefined;\n const config = value.shadowMapExperimentConfig;\n if (config == null) return undefined;\n assertShadowMapExperimentConfig(config);\n return structuredClone(config);\n}\n\nfunction readRequiredEditorScene<TDocument extends EditorSceneDocument>(\n value: unknown,\n path: string,\n): TDocument {\n const document = readEditorScene<TDocument>(value);\n if (document) return document;\n const error = new Error(`schema.invalidType: ${path}`);\n Object.assign(error, { code: 'schema.invalidType', path });\n throw error;\n}\n\nexport async function loadEditorAssetLibrary(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<EditorSceneAssetLibraryItem[]> {\n const client = resolveClientOptions(options);\n const json = await client.fetchJson(joinEndpoint(client.endpointBase, '/editor-asset-library'));\n return readEditorAssetLibrary(json.assets);\n}\n\nexport async function loadEditorProjectFiles(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<EditorProjectFileSnapshot> {\n const client = resolveClientOptions(options);\n const json = await client.fetchJson(joinEndpoint(client.endpointBase, '/project-files'));\n return readEditorProjectFileSnapshot(json);\n}\n\nexport async function loadEditorProjectFile(\n path: string,\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Promise<EditorProjectFileContent> {\n const client = resolveClientOptions(options);\n const endpoint = joinEndpoint(client.endpointBase, `/project-file?path=${encodeURIComponent(path)}`);\n const json = await client.fetchJson(endpoint);\n return readEditorProjectFileContent(json);\n}\n\nexport function resolveEditorProjectMediaSource(\n path: string,\n options?: Pick<SceneMainSourceClientOptions, 'endpointBase'>,\n): EditorProjectMediaSource | null {\n const relativePath = normalizeEditorProjectClientPath(path);\n if (!relativePath) return null;\n const support = resolveEditorProjectMediaSupport(relativePath);\n if (!support) return null;\n const endpointBase = options?.endpointBase ?? PLAYABLE_AUTHORING_API_BASE;\n const pathSegments = relativePath.split('/');\n const name = pathSegments[pathSegments.length - 1] ?? relativePath;\n return {\n path: relativePath,\n name,\n extension: resolveEditorProjectFileExtension(name),\n kind: support.kind,\n mimeType: support.mimeType,\n url: joinEndpoint(endpointBase, `/project-media?path=${encodeURIComponent(relativePath)}`),\n };\n}\n\nfunction normalizeEditorProjectClientPath(value: string): string | null {\n const normalized = value.trim().replace(/\\\\/g, '/').replace(/^\\/+/, '');\n if (!normalized || /^[A-Za-z]:\\//.test(normalized)) return null;\n const segments = normalized.split('/');\n return segments.some(segment => !segment || segment === '.' || segment === '..')\n ? null\n : segments.join('/');\n}\n\nfunction resolveClientOptions(\n options?: SceneMainSourceClientOptions | SceneSourceFetchJson,\n): Required<SceneMainSourceClientOptions> {\n if (typeof options === 'function') {\n return {\n endpointBase: PLAYABLE_AUTHORING_API_BASE,\n fetchJson: options,\n };\n }\n return {\n endpointBase: options?.endpointBase ?? PLAYABLE_AUTHORING_API_BASE,\n fetchJson: options?.fetchJson ?? fetchJson,\n };\n}\n"]}
|
|
@@ -21,6 +21,7 @@ export interface SceneMainSourceDriverLoadResult<TDocument extends EditorSceneDo
|
|
|
21
21
|
}
|
|
22
22
|
export interface SceneMainSourceSaveOptions extends SceneMainSourceClientOptions {
|
|
23
23
|
mode?: SceneMainSourceSaveMode;
|
|
24
|
+
expectedAuthoringSourceRevision?: number;
|
|
24
25
|
companionConfigs?: Partial<SceneMainSourceCompanionConfigs> | null;
|
|
25
26
|
renderingConfig?: Record<string, unknown> | null;
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scene-source/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,MAAM,MAAM,oBAAoB,GAAG,CACjC,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,WAAW,KACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;AAEpF,MAAM,WAAW,4BAA4B;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,+BAA+B,CAC9C,SAAS,SAAS,mBAAmB,GAAG,mBAAmB,EAC3D,MAAM,GAAG,2BAA2B;IAEpC,MAAM,EAAE,yBAAyB,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,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AAC,EAAE,CACvB,KAAK,EAAE,iDAAiD,CAAC,SAAS,CAAC,KAChE,2BAA2B,CAAC,IAAI,CAAC,CAAC;CACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/scene-source/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AuthoringSourceDescriptor,\n AuthoringSourceSaveResult,\n CompiledArtifact,\n} from '@fps-games/editor-core';\nimport type { EditorSceneRuntimeInputDrift } from '../authoring';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n} from '../document';\nimport type { SceneMainSourceCompanionConfigs } from './companion-configs';\nimport type { ShadowMapExperimentConfig } from '@fps-games/playable-rendering';\n\nexport type SceneSourceFetchJson = (\n url: string,\n init?: RequestInit,\n) => Promise<Record<string, unknown>>;\n\nexport type SceneMainSourceSaveMode = 'local-commit-save' | 'prepare-platform-save';\n\nexport interface SceneMainSourceClientOptions {\n endpointBase?: string;\n fetchJson?: SceneSourceFetchJson;\n}\n\nexport interface SceneMainSourceDriverLoadResult<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n TAsset = EditorSceneAssetLibraryItem,\n> {\n source: AuthoringSourceDescriptor;\n document: TDocument;\n assets?: TAsset[];\n drift: EditorSceneRuntimeInputDrift | null;\n companionConfigs?: SceneMainSourceCompanionConfigs;\n renderingConfig?: Record<string, unknown>;\n shadowMapExperimentConfig?: ShadowMapExperimentConfig;\n summary?: string;\n}\n\nexport interface SceneMainSourceSaveOptions extends SceneMainSourceClientOptions {\n mode?: SceneMainSourceSaveMode;\n companionConfigs?: Partial<SceneMainSourceCompanionConfigs> | null;\n renderingConfig?: Record<string, unknown> | null;\n}\n\nexport interface SceneMainSourceSaveResult<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends AuthoringSourceSaveResult<TDocument> {\n compiledArtifact?: CompiledArtifact;\n companionConfigs?: SceneMainSourceCompanionConfigs;\n expectedVersion?: number;\n renderingConfig?: Record<string, unknown>;\n shadowMapExperimentConfig?: ShadowMapExperimentConfig;\n sceneJsonText?: string;\n}\n\nexport type SceneMainSourceCompileResult =\n | CompiledArtifact\n | CompiledArtifact[]\n | null\n | undefined;\n\nexport type SceneMainSourceCompile<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> = (input: {\n source: AuthoringSourceDescriptor;\n document: TDocument;\n}) => SceneMainSourceCompileResult | Promise<SceneMainSourceCompileResult>;\n\nexport type SceneMainSourceMaybePromise<T> = T | Promise<T>;\n\nexport interface SceneMainSourceDriverLoadLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> {\n loaded: SceneMainSourceDriverLoadResult<TDocument>;\n context?: unknown;\n}\n\nexport type SceneMainSourcePrepareLoad = () => SceneMainSourceMaybePromise<unknown>;\n\nexport interface SceneMainSourceDriverSaveLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> {\n source: AuthoringSourceDescriptor;\n document: TDocument;\n}\n\nexport interface SceneMainSourcePreparedSaveOptions {\n saveOptions?: SceneMainSourceSaveOptions;\n context?: unknown;\n}\n\nexport type SceneMainSourcePrepareSave<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> = (\n input: SceneMainSourceDriverSaveLifecycleInput<TDocument>,\n) => SceneMainSourceMaybePromise<SceneMainSourceSaveOptions | SceneMainSourcePreparedSaveOptions | null | undefined>;\n\nexport interface SceneMainSourceDriverSavedLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceDriverSaveLifecycleInput<TDocument> {\n saved: SceneMainSourceSaveResult<TDocument>;\n context?: unknown;\n}\n\nexport interface SceneMainSourceDriverSaveErrorLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceDriverSaveLifecycleInput<TDocument> {\n error: unknown;\n context?: unknown;\n}\n\nexport interface SceneMainSourceRuntimeSceneArtifactLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceDriverSaveLifecycleInput<TDocument> {\n artifact: CompiledArtifact;\n phase: 'save' | 'compile';\n}\n\nexport interface SceneMainSourceDriverOptions<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceClientOptions {\n compile?: SceneMainSourceCompile<TDocument>;\n prepareLoad?: SceneMainSourcePrepareLoad;\n afterLoad?: (\n input: SceneMainSourceDriverLoadLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n prepareSave?: SceneMainSourcePrepareSave<TDocument>;\n isSaveCurrent?: (\n input: SceneMainSourceDriverSavedLifecycleInput<TDocument>,\n ) => boolean;\n afterSave?: (\n input: SceneMainSourceDriverSavedLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n onSaveError?: (\n input: SceneMainSourceDriverSaveErrorLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n onRuntimeSceneArtifact?: (\n input: SceneMainSourceRuntimeSceneArtifactLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/scene-source/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AuthoringSourceDescriptor,\n AuthoringSourceSaveResult,\n CompiledArtifact,\n} from '@fps-games/editor-core';\nimport type { EditorSceneRuntimeInputDrift } from '../authoring';\nimport type {\n EditorSceneAssetLibraryItem,\n EditorSceneDocument,\n} from '../document';\nimport type { SceneMainSourceCompanionConfigs } from './companion-configs';\nimport type { ShadowMapExperimentConfig } from '@fps-games/playable-rendering';\n\nexport type SceneSourceFetchJson = (\n url: string,\n init?: RequestInit,\n) => Promise<Record<string, unknown>>;\n\nexport type SceneMainSourceSaveMode = 'local-commit-save' | 'prepare-platform-save';\n\nexport interface SceneMainSourceClientOptions {\n endpointBase?: string;\n fetchJson?: SceneSourceFetchJson;\n}\n\nexport interface SceneMainSourceDriverLoadResult<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n TAsset = EditorSceneAssetLibraryItem,\n> {\n source: AuthoringSourceDescriptor;\n document: TDocument;\n assets?: TAsset[];\n drift: EditorSceneRuntimeInputDrift | null;\n companionConfigs?: SceneMainSourceCompanionConfigs;\n renderingConfig?: Record<string, unknown>;\n shadowMapExperimentConfig?: ShadowMapExperimentConfig;\n summary?: string;\n}\n\nexport interface SceneMainSourceSaveOptions extends SceneMainSourceClientOptions {\n mode?: SceneMainSourceSaveMode;\n expectedAuthoringSourceRevision?: number;\n companionConfigs?: Partial<SceneMainSourceCompanionConfigs> | null;\n renderingConfig?: Record<string, unknown> | null;\n}\n\nexport interface SceneMainSourceSaveResult<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends AuthoringSourceSaveResult<TDocument> {\n compiledArtifact?: CompiledArtifact;\n companionConfigs?: SceneMainSourceCompanionConfigs;\n expectedVersion?: number;\n renderingConfig?: Record<string, unknown>;\n shadowMapExperimentConfig?: ShadowMapExperimentConfig;\n sceneJsonText?: string;\n}\n\nexport type SceneMainSourceCompileResult =\n | CompiledArtifact\n | CompiledArtifact[]\n | null\n | undefined;\n\nexport type SceneMainSourceCompile<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> = (input: {\n source: AuthoringSourceDescriptor;\n document: TDocument;\n}) => SceneMainSourceCompileResult | Promise<SceneMainSourceCompileResult>;\n\nexport type SceneMainSourceMaybePromise<T> = T | Promise<T>;\n\nexport interface SceneMainSourceDriverLoadLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> {\n loaded: SceneMainSourceDriverLoadResult<TDocument>;\n context?: unknown;\n}\n\nexport type SceneMainSourcePrepareLoad = () => SceneMainSourceMaybePromise<unknown>;\n\nexport interface SceneMainSourceDriverSaveLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> {\n source: AuthoringSourceDescriptor;\n document: TDocument;\n}\n\nexport interface SceneMainSourcePreparedSaveOptions {\n saveOptions?: SceneMainSourceSaveOptions;\n context?: unknown;\n}\n\nexport type SceneMainSourcePrepareSave<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> = (\n input: SceneMainSourceDriverSaveLifecycleInput<TDocument>,\n) => SceneMainSourceMaybePromise<SceneMainSourceSaveOptions | SceneMainSourcePreparedSaveOptions | null | undefined>;\n\nexport interface SceneMainSourceDriverSavedLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceDriverSaveLifecycleInput<TDocument> {\n saved: SceneMainSourceSaveResult<TDocument>;\n context?: unknown;\n}\n\nexport interface SceneMainSourceDriverSaveErrorLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceDriverSaveLifecycleInput<TDocument> {\n error: unknown;\n context?: unknown;\n}\n\nexport interface SceneMainSourceRuntimeSceneArtifactLifecycleInput<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceDriverSaveLifecycleInput<TDocument> {\n artifact: CompiledArtifact;\n phase: 'save' | 'compile';\n}\n\nexport interface SceneMainSourceDriverOptions<\n TDocument extends EditorSceneDocument = EditorSceneDocument,\n> extends SceneMainSourceClientOptions {\n compile?: SceneMainSourceCompile<TDocument>;\n prepareLoad?: SceneMainSourcePrepareLoad;\n afterLoad?: (\n input: SceneMainSourceDriverLoadLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n prepareSave?: SceneMainSourcePrepareSave<TDocument>;\n isSaveCurrent?: (\n input: SceneMainSourceDriverSavedLifecycleInput<TDocument>,\n ) => boolean;\n afterSave?: (\n input: SceneMainSourceDriverSavedLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n onSaveError?: (\n input: SceneMainSourceDriverSaveErrorLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n onRuntimeSceneArtifact?: (\n input: SceneMainSourceRuntimeSceneArtifactLifecycleInput<TDocument>,\n ) => SceneMainSourceMaybePromise<void>;\n}\n"]}
|
|
@@ -162,6 +162,39 @@ export function inspectPlayableEditorUpgradeReadiness(input = {}) {
|
|
|
162
162
|
function inspectMigrationReadinessFile(file, options) {
|
|
163
163
|
const diagnostics = [];
|
|
164
164
|
const content = file.content;
|
|
165
|
+
const environmentResourceHardCutSeverity = options.environmentResourceHardCutSeverity ?? 'error';
|
|
166
|
+
if (/@fps-games\/editor-agent-(?:mcp|bridge)\b/.test(content)) {
|
|
167
|
+
diagnostics.push({
|
|
168
|
+
severity: 'error',
|
|
169
|
+
code: 'hard-cut.agent.retired-package',
|
|
170
|
+
path: file.filePath,
|
|
171
|
+
message: 'Removed Editor Agent transport package detected; uninstall it, install @fps-games/editor-agent at the exact @fps-games/editor version, and use fps-editor-agent from the project cwd.',
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (/\bfps-editor-agent-mcp\b|\bmcp_servers\.fps_game_editor_agent\b/.test(content)) {
|
|
175
|
+
diagnostics.push({
|
|
176
|
+
severity: 'error',
|
|
177
|
+
code: 'hard-cut.agent.retired-user-config',
|
|
178
|
+
path: file.filePath,
|
|
179
|
+
message: 'Removed user-level Agent service configuration detected; delete it because fps-editor-agent discovers the authenticated project Editor Service from cwd.',
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
if (/\bagent:mcp(?:\b|:)|\bagent-mcp-[a-z0-9-]+\.mjs\b/.test(content)) {
|
|
183
|
+
diagnostics.push({
|
|
184
|
+
severity: 'error',
|
|
185
|
+
code: 'hard-cut.agent.retired-script',
|
|
186
|
+
path: file.filePath,
|
|
187
|
+
message: 'Removed Agent daemon/script entry detected; delete the script and call fps-editor-agent commands against the project Editor Service.',
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (/\b(?:3777|3778)\b|\bEDITOR_AGENT_BRIDGE_[A-Z0-9_]+\b/.test(content)) {
|
|
191
|
+
diagnostics.push({
|
|
192
|
+
severity: 'error',
|
|
193
|
+
code: 'hard-cut.agent.retired-fixed-endpoint',
|
|
194
|
+
path: file.filePath,
|
|
195
|
+
message: 'Removed fixed Agent endpoint configuration detected; remove it and let the Vite Editor Service publish node_modules/.fps-editor/agent-runtime.json.',
|
|
196
|
+
});
|
|
197
|
+
}
|
|
165
198
|
if (/\bassertRuntimeSceneConfig(?:ModulePath|ExportName)\b/.test(content)) {
|
|
166
199
|
diagnostics.push({
|
|
167
200
|
severity: 'warning',
|
|
@@ -186,6 +219,14 @@ function inspectMigrationReadinessFile(file, options) {
|
|
|
186
219
|
message: 'Removed hierarchy.contextActions API detected; migrate each action to a typed capabilities.hierarchyActions.operations contribution.',
|
|
187
220
|
});
|
|
188
221
|
}
|
|
222
|
+
if (hasMountOwnedEditorTransition(content, file.filePath)) {
|
|
223
|
+
diagnostics.push({
|
|
224
|
+
severity: 'error',
|
|
225
|
+
code: 'hard-cut.editor-entry.mount-owned-transition',
|
|
226
|
+
path: file.filePath,
|
|
227
|
+
message: 'Project Editor Entry mount code calls switcher.enterEditor(); remove it and pass initialMode: \'edit\' to mountFpsGameEditorLocalEditorEntry so SDK backend.commit owns the transition.',
|
|
228
|
+
});
|
|
229
|
+
}
|
|
189
230
|
if (/\bhierarchyActions\b/.test(content) && /\bcontextActions\b/.test(content)) {
|
|
190
231
|
diagnostics.push({
|
|
191
232
|
severity: options.hierarchyContextActionSeverity ?? 'warning',
|
|
@@ -241,8 +282,139 @@ function inspectMigrationReadinessFile(file, options) {
|
|
|
241
282
|
message: 'Projection import logic is present without the SDK runtime preview import plan helper; verify asset URL and projection diagnostics during migration.',
|
|
242
283
|
});
|
|
243
284
|
}
|
|
285
|
+
diagnostics.push(...collectEnvironmentResourceHardCutDiagnostics(file.filePath, content, environmentResourceHardCutSeverity));
|
|
244
286
|
return diagnostics;
|
|
245
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* This hard cut intentionally scopes the check to the `editorModule.mount`
|
|
290
|
+
* callback passed to the public Editor Entry integration. A project can still
|
|
291
|
+
* use a public host elsewhere; it must not make the SDK-owned switcher
|
|
292
|
+
* transition from the mount callback under any local identifier name.
|
|
293
|
+
*/
|
|
294
|
+
function hasMountOwnedEditorTransition(content, filePath) {
|
|
295
|
+
try {
|
|
296
|
+
const root = parse(content, babelParserOptions(filePath));
|
|
297
|
+
let matched = false;
|
|
298
|
+
visitBabelNode(root, node => {
|
|
299
|
+
if (matched || node.type !== 'CallExpression' || readBabelIdentifierName(node.callee) !== 'mountFpsGameEditorLocalEditorEntry')
|
|
300
|
+
return;
|
|
301
|
+
const options = Array.isArray(node.arguments) && node.arguments.length === 1 ? node.arguments[0] : null;
|
|
302
|
+
const editorModule = exactObjectProperty(options, 'editorModule');
|
|
303
|
+
const mount = exactObjectProperty(editorModule, 'mount');
|
|
304
|
+
if (!mount || mount.type !== 'ArrowFunctionExpression' || mount.async !== true || !Array.isArray(mount.params) || mount.params.length !== 2 || !mount.params.every(readBabelIdentifierName) || !isRecord(mount.body) || mount.body.type !== 'BlockStatement' || !Array.isArray(mount.body.body))
|
|
305
|
+
return;
|
|
306
|
+
const [firstParam] = mount.params.map(readBabelIdentifierName);
|
|
307
|
+
const body = mount.body.body;
|
|
308
|
+
if (body.length !== 3 || !isCanonicalHandleDeclaration(body[0], firstParam) || !isCanonicalEditIf(body[1], readDeclaredName(body[0])) || !isCanonicalReturn(body[2], readDeclaredName(body[0])))
|
|
309
|
+
return;
|
|
310
|
+
matched = true;
|
|
311
|
+
});
|
|
312
|
+
return matched;
|
|
313
|
+
}
|
|
314
|
+
catch {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function exactObjectProperty(value, name) {
|
|
319
|
+
if (!isRecord(value) || value.type !== 'ObjectExpression' || !Array.isArray(value.properties))
|
|
320
|
+
return null;
|
|
321
|
+
let target = null;
|
|
322
|
+
for (const property of value.properties) {
|
|
323
|
+
// A spread or computed key could supply/override the target key, so this
|
|
324
|
+
// intentionally narrow fingerprint treats the whole container as manual review.
|
|
325
|
+
if (!isRecord(property) || property.type === 'SpreadElement' || property.computed)
|
|
326
|
+
return null;
|
|
327
|
+
const key = readBabelIdentifierName(property.key) ?? readBabelStaticString(property.key);
|
|
328
|
+
if (key !== name)
|
|
329
|
+
continue;
|
|
330
|
+
if (property.type !== 'ObjectProperty' || target || !isRecord(property.value))
|
|
331
|
+
return null;
|
|
332
|
+
target = property.value;
|
|
333
|
+
}
|
|
334
|
+
return target;
|
|
335
|
+
}
|
|
336
|
+
function readDeclaredName(statement) {
|
|
337
|
+
return isRecord(statement) && statement.type === 'VariableDeclaration' && Array.isArray(statement.declarations) && statement.declarations.length === 1 && isRecord(statement.declarations[0])
|
|
338
|
+
? readBabelIdentifierName(statement.declarations[0].id) : null;
|
|
339
|
+
}
|
|
340
|
+
function isCanonicalHandleDeclaration(statement, moduleName) {
|
|
341
|
+
if (!isRecord(statement) || statement.type !== 'VariableDeclaration' || statement.kind !== 'const' || !Array.isArray(statement.declarations) || statement.declarations.length !== 1)
|
|
342
|
+
return false;
|
|
343
|
+
const declaration = statement.declarations[0];
|
|
344
|
+
if (!isRecord(declaration) || !readBabelIdentifierName(declaration.id) || !isRecord(declaration.init) || declaration.init.type !== 'AwaitExpression')
|
|
345
|
+
return false;
|
|
346
|
+
const call = declaration.init.argument;
|
|
347
|
+
return isRecord(call) && call.type === 'CallExpression' && Array.isArray(call.arguments) && call.arguments.length === 1 && isRecord(call.callee) && call.callee.type === 'MemberExpression' && !call.callee.computed && readBabelIdentifierName(call.callee.object) === moduleName && readBabelIdentifierName(call.callee.property) === 'mountLocalEditorModeSwitcher' && isRecord(call.arguments[0]) && call.arguments[0].type === 'ObjectExpression';
|
|
348
|
+
}
|
|
349
|
+
function isCanonicalEditIf(statement, handle) {
|
|
350
|
+
if (!handle || !isRecord(statement) || statement.type !== 'IfStatement' || statement.alternate || !isRecord(statement.test) || statement.test.type !== 'BinaryExpression' || statement.test.operator !== '===' || !isRecord(statement.test.left) || statement.test.left.type !== 'MemberExpression' || statement.test.left.computed || readBabelIdentifierName(statement.test.left.object) === null || readBabelIdentifierName(statement.test.left.property) !== 'bootMode' || !isRecord(statement.test.right) || statement.test.right.type !== 'StringLiteral' || statement.test.right.value !== 'edit' || !isRecord(statement.consequent) || statement.consequent.type !== 'BlockStatement' || !Array.isArray(statement.consequent.body) || statement.consequent.body.length !== 1)
|
|
351
|
+
return false;
|
|
352
|
+
const expression = isRecord(statement.consequent.body[0]) && statement.consequent.body[0].type === 'ExpressionStatement' ? statement.consequent.body[0].expression : null;
|
|
353
|
+
return isAllowedEnterWrapper(expression, handle);
|
|
354
|
+
}
|
|
355
|
+
function isAllowedEnterWrapper(value, handle) {
|
|
356
|
+
if (!isRecord(value))
|
|
357
|
+
return false;
|
|
358
|
+
if (value.type === 'AwaitExpression' || value.type === 'UnaryExpression' && value.operator === 'void')
|
|
359
|
+
return isAllowedEnterWrapper(value.argument, handle);
|
|
360
|
+
if (value.type === 'CallExpression' && isRecord(value.callee) && value.callee.type === 'MemberExpression' && !value.callee.computed && readBabelIdentifierName(value.callee.property) === 'catch')
|
|
361
|
+
return isAllowedEnterWrapper(value.callee.object, handle);
|
|
362
|
+
return value.type === 'CallExpression' && Array.isArray(value.arguments) && value.arguments.length === 0 && isRecord(value.callee) && value.callee.type === 'MemberExpression' && !value.callee.computed && !value.callee.optional && readBabelIdentifierName(value.callee.object) === handle && readBabelIdentifierName(value.callee.property) === 'enterEditor';
|
|
363
|
+
}
|
|
364
|
+
function isCanonicalReturn(statement, handle) {
|
|
365
|
+
return !!handle && isRecord(statement) && statement.type === 'ReturnStatement' && readBabelIdentifierName(statement.argument) === handle;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* These checks intentionally inspect only project-side migration snapshots. They
|
|
369
|
+
* flag retired public integration shapes, not generic material texture fields or
|
|
370
|
+
* plugin registration order; those are validated by the product contract tests.
|
|
371
|
+
*/
|
|
372
|
+
function collectEnvironmentResourceHardCutDiagnostics(filePath, content, severity) {
|
|
373
|
+
const diagnostics = [];
|
|
374
|
+
const add = (code, message) => diagnostics.push({
|
|
375
|
+
severity,
|
|
376
|
+
code,
|
|
377
|
+
path: filePath,
|
|
378
|
+
message,
|
|
379
|
+
});
|
|
380
|
+
const hasBabylonRendererSurface = /\b(?:FpsBabylonRendererContext|FpsBabylonRendererPluginConfig|BabylonEnvironmentTexture(?:Profile|Factory)|createFpsBabylon(?:GameWorldPluginLifecycle|RendererHost))\b/.test(content);
|
|
381
|
+
if (/\bresolveAssetUrl\b/.test(content) && hasBabylonRendererSurface) {
|
|
382
|
+
add('hard-cut.environment-resource.resolve-asset-url-removed', 'Removed Babylon resolveAssetUrl integration detected; pass the generated asset catalog to the Host and resolve a PlayableResolvedAssetResource through the Assets Plugin service.');
|
|
383
|
+
}
|
|
384
|
+
if (/\bFpsBabylonRendererPluginConfig\b/.test(content) && /\benvironmentTexture\s*:/.test(content)) {
|
|
385
|
+
add('hard-cut.environment-resource.renderer-environment-texture-removed', 'Removed FpsBabylonRendererPluginConfig.environmentTexture fallback detected; authored rendering must resolve through the catalog-backed resource service.');
|
|
386
|
+
}
|
|
387
|
+
if (/\bBabylonEnvironmentTextureProfile\s*\{[^}]*\btextureUrl\b/.test(content)) {
|
|
388
|
+
add('hard-cut.environment-resource.profile-texture-url-removed', 'Removed BabylonEnvironmentTextureProfile.textureUrl shape detected; use profile.texture: PlayableResolvedAssetResource | null.');
|
|
389
|
+
}
|
|
390
|
+
if (/\bBabylonEnvironmentTextureFactory\b/.test(content) && /\b(?:textureUrl|url)\s*:\s*(?:string|String)\b/.test(content)) {
|
|
391
|
+
add('hard-cut.environment-resource.url-factory-removed', 'Removed URL-only BabylonEnvironmentTextureFactory contract detected; the factory must receive a PlayableResolvedAssetResource so it can preserve the asset format.');
|
|
392
|
+
}
|
|
393
|
+
if (/\bresolvePlayableBabylonRenderingEnvironmentTextureUrl\b/.test(content)) {
|
|
394
|
+
add('hard-cut.environment-resource.resolve-url-helper-removed', 'Removed resolvePlayableBabylonRenderingEnvironmentTextureUrl helper detected; use resolvePlayableBabylonRenderingEnvironmentTextureResource.');
|
|
395
|
+
}
|
|
396
|
+
if (isGeneratedAssetCatalogFile(filePath, content) && !hasGeneratedAssetCatalogFormat(content)) {
|
|
397
|
+
add('hard-cut.environment-resource.generated-catalog-format-missing', 'Generated asset catalog is missing the required format field; regenerate it with the current playable SDK instead of editing catalog output by hand.');
|
|
398
|
+
}
|
|
399
|
+
if (hasBabylonHostFactoryCall(content) && !hasCatalogSourceReference(content)) {
|
|
400
|
+
add('hard-cut.environment-resource.host-catalog-source-missing', 'Babylon Runtime/Renderer Host construction has no generated asset catalog input; pass the catalog source so plugin-assets can provide the shared resource resolver.');
|
|
401
|
+
}
|
|
402
|
+
return diagnostics;
|
|
403
|
+
}
|
|
404
|
+
function isGeneratedAssetCatalogFile(filePath, content) {
|
|
405
|
+
return /(?:^|\/)asset-catalog(?:\.generated)?\.[cm]?[jt]s$/i.test(normalizeFilePath(filePath))
|
|
406
|
+
|| (/\binterface\s+GeneratedAssetCatalogEntry\b/.test(content)
|
|
407
|
+
&& /\b(?:export\s+)?const\s+GENERATED_ASSET_CATALOG\b/.test(content));
|
|
408
|
+
}
|
|
409
|
+
function hasGeneratedAssetCatalogFormat(content) {
|
|
410
|
+
return /\bformat\s*:\s*(?:string|["'`][^"'`]+["'`])/.test(content);
|
|
411
|
+
}
|
|
412
|
+
function hasBabylonHostFactoryCall(content) {
|
|
413
|
+
return /\b(?:createFpsRuntime|createFpsBabylonGameWorldPluginLifecycle|createFpsBabylonRendererHost)\s*\(/.test(content);
|
|
414
|
+
}
|
|
415
|
+
function hasCatalogSourceReference(content) {
|
|
416
|
+
return /\b(?:assetCatalog(?:Source)?|generatedAssetCatalog|GENERATED_ASSET_CATALOG)\b/.test(content);
|
|
417
|
+
}
|
|
246
418
|
function collectDeprecatedAuthoredFields(filePath, content) {
|
|
247
419
|
if (/\.json$/i.test(filePath)) {
|
|
248
420
|
try {
|
|
@@ -390,18 +562,7 @@ function findMatchingForbiddenPackage(specifier, forbiddenPackages) {
|
|
|
390
562
|
return forbiddenPackages.find(packageName => specifier === packageName || specifier.startsWith(`${packageName}/`));
|
|
391
563
|
}
|
|
392
564
|
function readImportSpecifiers(content, filePath) {
|
|
393
|
-
const
|
|
394
|
-
const root = parse(content, {
|
|
395
|
-
sourceType: 'unambiguous',
|
|
396
|
-
allowAwaitOutsideFunction: true,
|
|
397
|
-
allowReturnOutsideFunction: true,
|
|
398
|
-
plugins: [
|
|
399
|
-
'typescript',
|
|
400
|
-
...(supportsJsx ? ['jsx'] : []),
|
|
401
|
-
'decorators',
|
|
402
|
-
'importAttributes',
|
|
403
|
-
],
|
|
404
|
-
});
|
|
565
|
+
const root = parse(content, babelParserOptions(filePath));
|
|
405
566
|
const specifiers = [];
|
|
406
567
|
visitBabelNode(root, (node) => {
|
|
407
568
|
const type = readBabelNodeType(node);
|
|
@@ -439,6 +600,20 @@ function readImportSpecifiers(content, filePath) {
|
|
|
439
600
|
});
|
|
440
601
|
return specifiers;
|
|
441
602
|
}
|
|
603
|
+
function babelParserOptions(filePath) {
|
|
604
|
+
const supportsJsx = /\.[cm]?[jt]sx$/i.test(filePath);
|
|
605
|
+
return {
|
|
606
|
+
sourceType: 'unambiguous',
|
|
607
|
+
allowAwaitOutsideFunction: true,
|
|
608
|
+
allowReturnOutsideFunction: true,
|
|
609
|
+
plugins: [
|
|
610
|
+
'typescript',
|
|
611
|
+
...(supportsJsx ? ['jsx'] : []),
|
|
612
|
+
'decorators',
|
|
613
|
+
'importAttributes',
|
|
614
|
+
],
|
|
615
|
+
};
|
|
616
|
+
}
|
|
442
617
|
function visitBabelNode(value, visit) {
|
|
443
618
|
if (Array.isArray(value)) {
|
|
444
619
|
for (const entry of value)
|