@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AAmNrC,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC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,CAAC","sourcesContent":["/**\n * Shared protocol surface for fps-game-editor packages and project adapters.\n *\n * This package intentionally contains no project schema, Babylon import, or\n * Forge Play implementation dependency. Runtime packages may depend on these\n * contracts; game projects provide adapters for project-specific semantics.\n */\n\nimport type { MaterialSlotSourceDescriptor } from '@fps-games/playable-contracts';\nexport type { MaterialSlotSourceDescriptor } from '@fps-games/playable-contracts';\n\nexport * from './agent';\nexport * from './agent-bridge';\nexport * from './agent-trace';\nexport * from './marker-graph';\nexport * from './editor-diagnostics';\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport type JsonValue = JsonPrimitive | JsonObject | JsonValue[];\nexport interface JsonObject { [key: string]: JsonValue | undefined }\n\nexport interface Vec3 {\n x: number;\n y: number;\n z: number;\n}\n\nexport type Position3D = Vec3;\nexport type Scale3D = Vec3;\nexport type Rotation3D = Vec3;\n\nexport interface ColorRGB {\n r: number;\n g: number;\n b: number;\n}\n\nexport type PersistentBinding = {\n kind: 'sceneNode';\n nodeId: string;\n rootNode: unknown;\n};\n\nexport type PersistentBindingSnapshot = {\n kind: 'sceneNode';\n nodeId: string;\n};\n\nexport type RuntimeProp = 'position' | 'rotation' | 'scaling';\n\nexport type MaterialRuntimeKind = 'pbr' | 'standard' | 'unknown';\n\nexport interface ArtistMaterialTextureRef {\n url?: string;\n textureAssetId?: string;\n}\n\nexport type ArtistMaterialAlphaMode = 'opaque' | 'mask' | 'blend';\nexport type ArtistMaterialLightingModel = 'lit' | 'unlit';\n\nexport interface ArtistBaseColorProfile {\n color?: ColorRGB;\n texture?: ArtistMaterialTextureRef | null;\n brightness?: number;\n saturation?: number;\n contrast?: number;\n hue?: number;\n}\n\nexport interface ArtistNormalProfile {\n texture?: ArtistMaterialTextureRef | null;\n strength?: number;\n}\n\nexport interface ArtistMetallicRoughnessProfile {\n texture?: ArtistMaterialTextureRef | null;\n}\n\nexport interface ArtistOcclusionProfile {\n texture?: ArtistMaterialTextureRef | null;\n strength?: number;\n}\n\nexport interface ArtistEmissionProfile {\n color?: ColorRGB;\n intensity?: number;\n texture?: ArtistMaterialTextureRef | null;\n maskTexture?: ArtistMaterialTextureRef | null;\n}\n\nexport interface ArtistAlphaProfile {\n mode?: ArtistMaterialAlphaMode;\n opacity?: number;\n cutoff?: number;\n texture?: ArtistMaterialTextureRef | null;\n}\n\nexport interface ArtistMaterialProfile {\n lightingModel?: ArtistMaterialLightingModel;\n baseColor?: ArtistBaseColorProfile;\n normal?: ArtistNormalProfile;\n metallic?: number;\n roughness?: number;\n metallicRoughness?: ArtistMetallicRoughnessProfile;\n occlusion?: ArtistOcclusionProfile;\n emission?: ArtistEmissionProfile;\n alpha?: ArtistAlphaProfile;\n}\n\nexport type SceneMaterialAssetKind = 'pbr' | 'standard';\nexport type SceneMaterialAssetSystemPreset = 'default-pbr' | 'default-standard';\n\nexport interface SceneMaterialAssetSystemConfig {\n readonly?: boolean;\n preset?: SceneMaterialAssetSystemPreset;\n}\n\nexport type SceneMaterialAssetOriginType = 'imported' | 'created' | 'duplicated' | 'preset';\n\nexport interface SceneMaterialAssetOriginConfig {\n type: SceneMaterialAssetOriginType;\n sourceAssetGuid?: string;\n sourceAssetId?: string;\n sourceSlotId?: string;\n sourceMaterialIndex?: number;\n sourceMaterialName?: string;\n sourceMaterialAssetId?: string;\n}\n\nexport interface SceneMaterialAssetConfig {\n id: string;\n guid?: string;\n name: string;\n profile: ArtistMaterialProfile;\n materialKind?: SceneMaterialAssetKind;\n system?: SceneMaterialAssetSystemConfig;\n origin?: SceneMaterialAssetOriginConfig;\n}\n\nexport interface SceneNodeMaterialBindingConfig {\n materialAssetId?: string;\n override?: ArtistMaterialProfile;\n}\n\nexport interface ArtistMaterialSlotBinding {\n slot: MaterialSlotSourceDescriptor;\n profile: ArtistMaterialProfile;\n materialKind?: SceneMaterialAssetKind;\n}\n\nexport type ArtistMaterialProp =\n | 'material.lightingModel'\n | 'material.baseColor.color'\n | 'material.baseColor.texture.url'\n | 'material.baseColor.texture.textureAssetId'\n | 'material.baseColor.brightness'\n | 'material.baseColor.saturation'\n | 'material.baseColor.contrast'\n | 'material.baseColor.hue'\n | 'material.normal.texture.url'\n | 'material.normal.texture.textureAssetId'\n | 'material.normal.strength'\n | 'material.emission.color'\n | 'material.emission.intensity'\n | 'material.emission.texture.url'\n | 'material.emission.texture.textureAssetId'\n | 'material.emission.maskTexture.url'\n | 'material.emission.maskTexture.textureAssetId'\n | 'material.metallic'\n | 'material.roughness'\n | 'material.metallicRoughness.texture.url'\n | 'material.metallicRoughness.texture.textureAssetId'\n | 'material.occlusion.texture.url'\n | 'material.occlusion.texture.textureAssetId'\n | 'material.occlusion.strength'\n | 'material.alpha.mode'\n | 'material.alpha.opacity'\n | 'material.alpha.cutoff'\n | 'material.alpha.texture.url'\n | 'material.alpha.texture.textureAssetId';\n\nexport type MaterialProp =\n | 'material.albedoColor'\n | 'material.emissiveColor'\n | 'material.metallic'\n | 'material.roughness'\n | 'material.alpha'\n | 'material.alphaCutOff'\n | 'material.transparencyMode'\n | 'material.backFaceCulling'\n | 'material.albedoTexture.url'\n | 'material.normalTexture.url'\n | 'material.normalTexture.level'\n | 'material.metallicTexture.url'\n | 'material.occlusionTexture.url'\n | 'material.emissiveTexture.url'\n | 'material.opacityTexture.url'\n | 'material.pbr.albedoColor'\n | 'material.pbr.baseWeight'\n | 'material.pbr.reflectivityColor'\n | 'material.pbr.microSurface'\n | 'material.pbr.emissiveColor'\n | 'material.pbr.emissiveIntensity'\n | 'material.pbr.ambientColor'\n | 'material.pbr.lightFalloff'\n | 'material.standard.diffuseColor'\n | 'material.standard.specularColor'\n | 'material.standard.specularPower'\n | 'material.standard.emissiveColor'\n | 'material.standard.ambientColor'\n | 'material.standard.useSpecularOverAlpha';\n\nexport type MaterialValue = ColorRGB | number | boolean | string | null;\n\nexport interface ResolveArtistMaterialProfileInput {\n originalProfile?: ArtistMaterialProfile | null;\n materialAssets?: readonly SceneMaterialAssetConfig[] | null;\n binding?: SceneNodeMaterialBindingConfig | null;\n}\n\nexport interface ResolveArtistMaterialProfileResult {\n profile: ArtistMaterialProfile;\n materialAsset: SceneMaterialAssetConfig | null;\n missingMaterialAssetId?: string;\n}\n\nfunction isFiniteNumber(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value);\n}\n\nfunction normalizeColorRGB(value: ColorRGB | undefined): ColorRGB | undefined {\n if (!value || !isFiniteNumber(value.r) || !isFiniteNumber(value.g) || !isFiniteNumber(value.b)) return undefined;\n return { r: value.r, g: value.g, b: value.b };\n}\n\nfunction normalizeMaterialTextureRef(value: ArtistMaterialTextureRef | null | undefined): ArtistMaterialTextureRef | null | undefined {\n if (value === null) return null;\n if (!value) return undefined;\n const url = typeof value.url === 'string' ? value.url.trim() : '';\n const textureAssetId = typeof value.textureAssetId === 'string' ? value.textureAssetId.trim() : '';\n if (!url && !textureAssetId) return undefined;\n return {\n ...(url ? { url } : {}),\n ...(textureAssetId ? { textureAssetId } : {}),\n };\n}\n\nfunction normalizeArtistMaterialAlphaMode(value: unknown): ArtistMaterialAlphaMode | undefined {\n return value === 'opaque' || value === 'mask' || value === 'blend' ? value : undefined;\n}\n\nfunction normalizeArtistMaterialLightingModel(value: unknown): ArtistMaterialLightingModel | undefined {\n return value === 'lit' || value === 'unlit' ? value : undefined;\n}\n\nexport function normalizeSceneMaterialAssetKind(value: unknown): SceneMaterialAssetKind | undefined {\n return value === 'pbr' || value === 'standard' ? value : undefined;\n}\n\nexport function resolveSceneMaterialAssetKind(\n materialAsset: Pick<SceneMaterialAssetConfig, 'materialKind' | 'system'> | null | undefined,\n): SceneMaterialAssetKind {\n return normalizeSceneMaterialAssetKind(materialAsset?.materialKind)\n ?? inferSceneMaterialAssetKindFromSystemPreset(materialAsset?.system?.preset)\n ?? 'pbr';\n}\n\nexport function normalizeSceneMaterialAssetSystemConfig(\n value: SceneMaterialAssetSystemConfig | null | undefined,\n): SceneMaterialAssetSystemConfig | undefined {\n if (!value || typeof value !== 'object') return undefined;\n const preset = value.preset === 'default-pbr' || value.preset === 'default-standard'\n ? value.preset\n : undefined;\n const readonly = value.readonly === true;\n if (!preset && !readonly) return undefined;\n return {\n ...(readonly ? { readonly } : {}),\n ...(preset ? { preset } : {}),\n };\n}\n\nexport function normalizeSceneMaterialAssetOriginConfig(\n value: SceneMaterialAssetOriginConfig | null | undefined,\n): SceneMaterialAssetOriginConfig | undefined {\n if (!value || typeof value !== 'object') return undefined;\n const type = value.type === 'imported'\n || value.type === 'created'\n || value.type === 'duplicated'\n || value.type === 'preset'\n ? value.type\n : undefined;\n if (!type) return undefined;\n const sourceAssetGuid = typeof value.sourceAssetGuid === 'string' ? value.sourceAssetGuid.trim() : '';\n const sourceAssetId = typeof value.sourceAssetId === 'string' ? value.sourceAssetId.trim() : '';\n const sourceSlotId = typeof value.sourceSlotId === 'string' ? value.sourceSlotId.trim() : '';\n const sourceMaterialName = typeof value.sourceMaterialName === 'string' ? value.sourceMaterialName.trim() : '';\n const sourceMaterialAssetId = typeof value.sourceMaterialAssetId === 'string' ? value.sourceMaterialAssetId.trim() : '';\n return {\n type,\n ...(sourceAssetGuid ? { sourceAssetGuid } : {}),\n ...(sourceAssetId ? { sourceAssetId } : {}),\n ...(sourceSlotId ? { sourceSlotId } : {}),\n ...(Number.isInteger(value.sourceMaterialIndex) ? { sourceMaterialIndex: value.sourceMaterialIndex } : {}),\n ...(sourceMaterialName ? { sourceMaterialName } : {}),\n ...(sourceMaterialAssetId ? { sourceMaterialAssetId } : {}),\n };\n}\n\nexport function isReadonlySceneMaterialAsset(\n materialAsset: Pick<SceneMaterialAssetConfig, 'system'> | null | undefined,\n): boolean {\n return materialAsset?.system?.readonly === true;\n}\n\nfunction inferSceneMaterialAssetKindFromSystemPreset(\n preset: unknown,\n): SceneMaterialAssetKind | undefined {\n if (preset === 'default-pbr') return 'pbr';\n if (preset === 'default-standard') return 'standard';\n return undefined;\n}\n\nexport function normalizeArtistMaterialProfile(profile: ArtistMaterialProfile | null | undefined): ArtistMaterialProfile | undefined {\n if (!profile || typeof profile !== 'object') return undefined;\n\n const normalized: ArtistMaterialProfile = {};\n const lightingModel = normalizeArtistMaterialLightingModel(profile.lightingModel);\n if (lightingModel) normalized.lightingModel = lightingModel;\n const baseColor: ArtistBaseColorProfile = {};\n const color = normalizeColorRGB(profile.baseColor?.color);\n if (color) baseColor.color = color;\n const texture = normalizeMaterialTextureRef(profile.baseColor?.texture);\n if (texture !== undefined) baseColor.texture = texture;\n if (isFiniteNumber(profile.baseColor?.brightness)) baseColor.brightness = profile.baseColor.brightness;\n if (isFiniteNumber(profile.baseColor?.saturation)) baseColor.saturation = profile.baseColor.saturation;\n if (isFiniteNumber(profile.baseColor?.contrast)) baseColor.contrast = profile.baseColor.contrast;\n if (isFiniteNumber(profile.baseColor?.hue)) baseColor.hue = profile.baseColor.hue;\n if (Object.keys(baseColor).length > 0) normalized.baseColor = baseColor;\n\n const normal: ArtistNormalProfile = {};\n const normalTexture = normalizeMaterialTextureRef(profile.normal?.texture);\n if (normalTexture !== undefined) normal.texture = normalTexture;\n if (isFiniteNumber(profile.normal?.strength)) normal.strength = profile.normal.strength;\n if (Object.keys(normal).length > 0) normalized.normal = normal;\n\n if (isFiniteNumber(profile.metallic)) normalized.metallic = profile.metallic;\n if (isFiniteNumber(profile.roughness)) normalized.roughness = profile.roughness;\n\n const metallicRoughness: ArtistMetallicRoughnessProfile = {};\n const metallicRoughnessTexture = normalizeMaterialTextureRef(profile.metallicRoughness?.texture);\n if (metallicRoughnessTexture !== undefined) metallicRoughness.texture = metallicRoughnessTexture;\n if (Object.keys(metallicRoughness).length > 0) normalized.metallicRoughness = metallicRoughness;\n\n const occlusion: ArtistOcclusionProfile = {};\n const occlusionTexture = normalizeMaterialTextureRef(profile.occlusion?.texture);\n if (occlusionTexture !== undefined) occlusion.texture = occlusionTexture;\n if (isFiniteNumber(profile.occlusion?.strength)) occlusion.strength = profile.occlusion.strength;\n if (Object.keys(occlusion).length > 0) normalized.occlusion = occlusion;\n\n const emission: ArtistEmissionProfile = {};\n const emissionColor = normalizeColorRGB(profile.emission?.color);\n if (emissionColor) emission.color = emissionColor;\n if (isFiniteNumber(profile.emission?.intensity)) emission.intensity = profile.emission.intensity;\n const emissionTexture = normalizeMaterialTextureRef(profile.emission?.texture);\n if (emissionTexture !== undefined) emission.texture = emissionTexture;\n const maskTexture = normalizeMaterialTextureRef(profile.emission?.maskTexture);\n if (maskTexture !== undefined) emission.maskTexture = maskTexture;\n if (Object.keys(emission).length > 0) normalized.emission = emission;\n\n const alpha: ArtistAlphaProfile = {};\n const alphaMode = normalizeArtistMaterialAlphaMode(profile.alpha?.mode);\n if (alphaMode) alpha.mode = alphaMode;\n if (isFiniteNumber(profile.alpha?.opacity)) alpha.opacity = profile.alpha.opacity;\n if (isFiniteNumber(profile.alpha?.cutoff)) alpha.cutoff = profile.alpha.cutoff;\n const alphaTexture = normalizeMaterialTextureRef(profile.alpha?.texture);\n if (alphaTexture !== undefined) alpha.texture = alphaTexture;\n if (Object.keys(alpha).length > 0) normalized.alpha = alpha;\n\n return Object.keys(normalized).length > 0 ? normalized : undefined;\n}\n\nexport function normalizeSceneMaterialAssetConfig(\n materialAsset: SceneMaterialAssetConfig | null | undefined,\n): SceneMaterialAssetConfig | undefined {\n if (!materialAsset || typeof materialAsset !== 'object') return undefined;\n const id = typeof materialAsset.id === 'string' ? materialAsset.id.trim() : '';\n const guid = typeof materialAsset.guid === 'string' ? materialAsset.guid.trim() : '';\n const name = typeof materialAsset.name === 'string' ? materialAsset.name.trim() : '';\n const profile = normalizeArtistMaterialProfile(materialAsset.profile);\n if (!id || !name || !profile) return undefined;\n const system = normalizeSceneMaterialAssetSystemConfig(materialAsset.system);\n const origin = normalizeSceneMaterialAssetOriginConfig(materialAsset.origin);\n const materialKind = normalizeSceneMaterialAssetKind(materialAsset.materialKind);\n const presetKind = inferSceneMaterialAssetKindFromSystemPreset(system?.preset);\n if (materialKind && presetKind && materialKind !== presetKind) return undefined;\n return {\n id,\n ...(guid ? { guid } : {}),\n name,\n profile,\n ...(materialKind ?? presetKind ? { materialKind: materialKind ?? presetKind } : {}),\n ...(system ? { system } : {}),\n ...(origin ? { origin } : {}),\n };\n}\n\nexport function sceneMaterialGuidToStableToken(guid: string): string {\n return String(guid ?? '').trim().toLowerCase().replace(/[^a-z0-9]+/g, '');\n}\n\nexport function createSceneMaterialAssetId(guid: string): string {\n const token = sceneMaterialGuidToStableToken(guid);\n return `mat_${token || 'material'}`;\n}\n\nexport function mergeArtistMaterialProfiles(\n ...profiles: Array<ArtistMaterialProfile | null | undefined>\n): ArtistMaterialProfile {\n const merged: ArtistMaterialProfile = {};\n for (const profile of profiles) {\n const normalized = normalizeArtistMaterialProfile(profile);\n if (!normalized) continue;\n if (normalized.lightingModel) merged.lightingModel = normalized.lightingModel;\n if (normalized.baseColor) {\n merged.baseColor = {\n ...(merged.baseColor ?? {}),\n ...normalized.baseColor,\n };\n }\n if (normalized.normal) {\n merged.normal = {\n ...(merged.normal ?? {}),\n ...normalized.normal,\n };\n }\n if (normalized.metallic !== undefined) merged.metallic = normalized.metallic;\n if (normalized.roughness !== undefined) merged.roughness = normalized.roughness;\n if (normalized.metallicRoughness) {\n merged.metallicRoughness = {\n ...(merged.metallicRoughness ?? {}),\n ...normalized.metallicRoughness,\n };\n }\n if (normalized.occlusion) {\n merged.occlusion = {\n ...(merged.occlusion ?? {}),\n ...normalized.occlusion,\n };\n }\n if (normalized.emission) {\n merged.emission = {\n ...(merged.emission ?? {}),\n ...normalized.emission,\n };\n }\n if (normalized.alpha) {\n merged.alpha = {\n ...(merged.alpha ?? {}),\n ...normalized.alpha,\n };\n }\n }\n return normalizedOrEmpty(merged);\n}\n\nexport function findSceneMaterialAsset(\n materialAssets: readonly SceneMaterialAssetConfig[] | null | undefined,\n materialAssetId: string | null | undefined,\n): SceneMaterialAssetConfig | null {\n const id = typeof materialAssetId === 'string' ? materialAssetId.trim() : '';\n if (!id || !materialAssets) return null;\n return materialAssets.find(asset => asset.id === id) ?? null;\n}\n\nexport function resolveArtistMaterialProfile(\n input: ResolveArtistMaterialProfileInput,\n): ResolveArtistMaterialProfileResult {\n const materialAssetId = typeof input.binding?.materialAssetId === 'string'\n ? input.binding.materialAssetId.trim()\n : '';\n const materialAsset = findSceneMaterialAsset(input.materialAssets, materialAssetId);\n const profile = mergeArtistMaterialProfiles(\n input.originalProfile,\n materialAsset?.profile,\n input.binding?.override,\n );\n return {\n profile,\n materialAsset,\n ...(materialAssetId && !materialAsset ? { missingMaterialAssetId: materialAssetId } : {}),\n };\n}\n\nfunction normalizedOrEmpty(profile: ArtistMaterialProfile): ArtistMaterialProfile {\n return normalizeArtistMaterialProfile(profile) ?? {};\n}\n\nexport type OutlineProp =\n | 'outline.renderOutline'\n | 'outline.outlineWidth'\n | 'outline.outlineColor';\n\nexport type OutlineValue = ColorRGB | number | boolean | null;\n\nexport interface EditorDocumentExport {\n sceneJsonText: string;\n expectedVersion?: number;\n version?: number;\n}\n\nexport interface EditorDocumentCommitArgs {\n version?: number;\n updatedAt?: string;\n sceneJsonText?: string;\n scenePath?: string;\n}\n\nexport interface EditorDuplicateResult {\n rootNode?: unknown;\n}\n\nexport type EditorTool = 'pick' | 'move' | 'rotate' | 'scale';\nexport type EditorMode = 'edit' | 'play';\nexport type RuntimeOwner = 'project' | 'unknown';\nexport type SelectionSource = 'viewport' | 'tree' | 'programmatic' | 'unknown';\n\nexport interface EditorRuntimeApi {\n active?: boolean;\n init(scene: unknown): void;\n showInspector(): Promise<void> | void;\n hideInspector(): void;\n setTool?(tool: EditorTool): void;\n getSelectedEntity?(): unknown | null;\n selectEntity?(entity: unknown | null, syncInspector?: boolean): void;\n duplicateSelected?(): Promise<boolean> | boolean;\n undo(): boolean;\n redo(): boolean;\n exportDocument(): EditorDocumentExport | null;\n commitSavedDocument(args: EditorDocumentCommitArgs): boolean;\n}\n\nexport interface EditRuntimeApi {\n active?: boolean;\n enter(): Promise<void>;\n exit(save?: boolean): Promise<void>;\n _focusSelected(): void;\n isViewportNavigationActive(): boolean;\n}\n\nexport interface EditorRuntime {\n owner?: RuntimeOwner;\n Editor: EditorRuntimeApi;\n Edit: EditRuntimeApi;\n handleCommand(name: string, params: Record<string, unknown>): Promise<void> | void;\n}\n\nexport interface SelectionController {\n createV2SelectionBridge?(v2: unknown): unknown;\n bindSelectionSourceTracking?(): void;\n unbindSelectionSourceTracking?(): void;\n enablePicking?(): void;\n reset?(): void;\n getSelectedEntity?(): unknown | null;\n getSelectedEntities?(): unknown[];\n selectEntity?(\n entity: unknown | null,\n syncInspector?: boolean,\n options?: { additive?: boolean; toggle?: boolean },\n ): void;\n}\n\nexport type EditorRuntimeChange =\n | {\n kind: 'transform';\n binding: PersistentBindingSnapshot;\n prop: RuntimeProp;\n value: Position3D | Scale3D | Rotation3D;\n rootNode?: unknown;\n selectedRootNode?: unknown | null;\n }\n | {\n kind: 'material';\n binding: PersistentBindingSnapshot;\n prop: MaterialProp;\n value: MaterialValue;\n ownerNodePath: string;\n rootNode?: unknown;\n selectedRootNode?: unknown | null;\n }\n | {\n kind: 'outline';\n binding: PersistentBindingSnapshot;\n prop: OutlineProp;\n value: OutlineValue;\n ownerNodePath: string;\n rootNode?: unknown;\n selectedRootNode?: unknown | null;\n }\n | {\n kind: 'selection';\n selectedRootNode?: unknown | null;\n };\n\nexport interface EditorPluginContext {\n scene: unknown | null;\n game: unknown | null;\n}\n\nexport interface EditorPlugin {\n id: string;\n normalizeSelection?(args: {\n source: SelectionSource;\n rawEntity: unknown;\n context: EditorPluginContext;\n }): unknown | null;\n resolvePersistentBinding?(node: unknown, context: EditorPluginContext): PersistentBinding | null;\n applyDocumentChange?(args: {\n binding: PersistentBinding;\n node: unknown;\n prop: string;\n context: EditorPluginContext;\n oldValue?: unknown;\n newValue?: unknown;\n }): boolean;\n duplicateSelection?(args: {\n binding: PersistentBinding;\n node: unknown;\n context: EditorPluginContext;\n }): EditorDuplicateResult | Promise<EditorDuplicateResult | null> | null;\n isDirty?(): boolean;\n canUndo?(): boolean;\n canRedo?(): boolean;\n undoDocumentChange?(context: EditorPluginContext): EditorRuntimeChange | null;\n redoDocumentChange?(context: EditorPluginContext): EditorRuntimeChange | null;\n exportDocument?(): EditorDocumentExport | null;\n commitSavedDocument?(args: EditorDocumentCommitArgs, context: EditorPluginContext): boolean;\n}\n\nexport interface EditorMessenger {\n event?(eventName: string, payload: Record<string, unknown>): void;\n send?(type: string, payload: Record<string, unknown>): void;\n}\n\nexport interface EditorBridgeLike {\n registerEditorPlugin?: (plugin: EditorPlugin) => void;\n registerEditorRuntime?: (runtime: EditorRuntime) => void;\n messenger?: EditorMessenger;\n editor?: unknown;\n}\n\nexport const EDITOR_COMMAND_NAME = {\n MODE_CHANGE: 'mode.change',\n UNDO: 'history.undo',\n REDO: 'history.redo',\n DOCUMENT_EXPORT: 'document.export',\n DOCUMENT_COMMIT: 'document.commit',\n INSPECTOR_FLUSH: 'inspector.flush',\n ASSET_REGISTRATION_PLAN: 'asset.registration.plan',\n ASSET_UNREGISTRATION_PLAN: 'asset.unregistration.plan',\n ASSET_LIBRARY_REFRESH: 'asset.library.refresh',\n ASSET_IMPORT: 'asset.import',\n EDITOR_ASSET_PLACE: 'editor.asset.place',\n ASSET_REMOVE: 'asset.remove',\n SCENE_NODE_CREATE: 'scene.node.create',\n SCENE_NODE_PATCH: 'scene.node.patch',\n SCENE_NODE_REMOVE: 'scene.node.remove',\n SELECTION_DUPLICATE: 'selection.duplicate',\n} as const;\n\nexport type EditorCommandName = typeof EDITOR_COMMAND_NAME[keyof typeof EDITOR_COMMAND_NAME];\n\nexport const EDITOR_EVENT_NAME = {\n DOCUMENT_EXPORTED: 'document.exported',\n UNDO_RESULT: 'history.undo.result',\n REDO_RESULT: 'history.redo.result',\n INSPECTOR_FLUSHED: 'inspector.flushed',\n ASSET_REGISTRATION_PLANNED: 'asset.registration.planned',\n ASSET_REGISTRATION_FAILED: 'asset.registration.failed',\n ASSET_UNREGISTRATION_PLANNED: 'asset.unregistration.planned',\n ASSET_UNREGISTRATION_FAILED: 'asset.unregistration.failed',\n ASSET_LIBRARY_REFRESHED: 'asset.library.refreshed',\n ASSET_IMPORT_RESULT: 'asset.import.result',\n EDITOR_ASSET_PLACE_RESULT: 'editor.asset.place.result',\n ASSET_REMOVE_RESULT: 'asset.remove.result',\n SCENE_NODE_CREATE_RESULT: 'scene.node.create.result',\n SCENE_NODE_PATCH_RESULT: 'scene.node.patch.result',\n SCENE_NODE_REMOVE_RESULT: 'scene.node.remove.result',\n MODE_READY: 'mode.ready',\n SELECTION_DUPLICATE_RESULT: 'selection.duplicate.result',\n} as const;\n\nexport type EditorEventName = typeof EDITOR_EVENT_NAME[keyof typeof EDITOR_EVENT_NAME];\n\nexport const EDITOR_POST_MESSAGE = {\n CONTEXT_CHANGE: 'context:change',\n} as const;\n\nexport type EditorPostMessageType = typeof EDITOR_POST_MESSAGE[keyof typeof EDITOR_POST_MESSAGE];\n\nexport const EDITOR_CAPABILITY = {\n SCENE_TREE: 'sceneTree',\n ASSET_IMPORT: 'assetImport',\n ASSET_REGISTRY_WRITE: 'assetRegistryWrite',\n TRANSFORM_GIZMO: 'transformGizmo',\n MATERIAL_EDITING: 'materialEditing',\n OUTLINE_EDITING: 'outlineEditing',\n DOCUMENT_EXPORT: 'documentExport',\n DOCUMENT_COMMIT: 'documentCommit',\n UNDO_REDO: 'undoRedo',\n INSPECTOR: 'inspector',\n} as const;\n\nexport type EditorCapabilityName = typeof EDITOR_CAPABILITY[keyof typeof EDITOR_CAPABILITY];\nexport type EditorCapabilities = Partial<Record<EditorCapabilityName, boolean>>;\n\n// Migration aliases matching the current project-side editor-package type names.\nexport type ProjectPersistentBinding = PersistentBinding;\nexport type ProjectPersistentBindingSnapshot = PersistentBindingSnapshot;\nexport type ProjectRuntimeProp = RuntimeProp;\nexport type ProjectMaterialRuntimeKind = MaterialRuntimeKind;\nexport type ProjectMaterialProp = MaterialProp;\nexport type ProjectMaterialValue = MaterialValue;\nexport type ProjectOutlineProp = OutlineProp;\nexport type ProjectOutlineValue = OutlineValue;\nexport type ProjectRotation3D = Rotation3D;\nexport type ProjectEditorDocumentExport = EditorDocumentExport;\nexport type ProjectEditorDocumentCommitArgs = EditorDocumentCommitArgs;\nexport type ProjectEditorDuplicateResult = EditorDuplicateResult;\nexport type ProjectEditorRuntimeApi = EditorRuntimeApi;\nexport type ProjectEditRuntimeApi = EditRuntimeApi;\nexport type ProjectEditorRuntime = EditorRuntime;\nexport type ProjectSelectionController = SelectionController;\nexport type ProjectEditorRuntimeChange = EditorRuntimeChange;\nexport type ProjectEditorPluginContext = EditorPluginContext;\nexport type ProjectEditorPlugin = EditorPlugin;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAmNjC,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,iBAAiB,CAAC,KAA2B;IACpD,IAAI,CAAC,KAAK,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACjH,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED,SAAS,2BAA2B,CAAC,KAAkD;IACrF,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,CAAC,KAAK;QAAE,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AAiB,EAAE,mBAAmB;IACtC,0BAA0B,EAAE,4BAA4B;IACxD,yBAAyB,EAAE,2BAA2B;IACtD,4BAA4B,EAAE,8BAA8B;IAC5D,2BAA2B,EAAE,6BAA6B;IAC1D,uBAAuB,EAAE,yBAAyB;IAClD,mBAAmB,EAAE,qBAAqB;IAC1C,yBAAyB,EAAE,2BAA2B;IACtD,mBAAmB,EAAE,qBAAqB;IAC1C,wBAAwB,EAAE,0BAA0B;IACpD,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,UAAU,EAAE,YAAY;IACxB,0BAA0B,EAAE,4BAA4B;CAChD,CAAC;AAIX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAIX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU,EAAE,WAAW;IACvB,YAAY,EAAE,aAAa;IAC3B,oBAAoB,EAAE,oBAAoB;IAC1C,eAAe,EAAE,gBAAgB;IACjC,gBAAgB,EAAE,iBAAiB;IACnC,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;IACjC,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,WAAW;CACd,CAAC","sourcesContent":["/**\n * Shared protocol surface for fps-game-editor packages and project adapters.\n *\n * This package intentionally contains no project schema, Babylon import, or\n * Forge Play implementation dependency. Runtime packages may depend on these\n * contracts; game projects provide adapters for project-specific semantics.\n */\n\nimport type { MaterialSlotSourceDescriptor } from '@fps-games/playable-contracts';\nexport type { MaterialSlotSourceDescriptor } from '@fps-games/playable-contracts';\n\nexport * from './editor-command-capabilities';\nexport * from './editor-command-trace';\nexport * from './marker-graph';\nexport * from './editor-diagnostics';\nexport * from './editor-command';\nexport * from './editor-service';\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport type JsonValue = JsonPrimitive | JsonObject | JsonValue[];\nexport interface JsonObject { [key: string]: JsonValue | undefined }\n\nexport interface Vec3 {\n x: number;\n y: number;\n z: number;\n}\n\nexport type Position3D = Vec3;\nexport type Scale3D = Vec3;\nexport type Rotation3D = Vec3;\n\nexport interface ColorRGB {\n r: number;\n g: number;\n b: number;\n}\n\nexport type PersistentBinding = {\n kind: 'sceneNode';\n nodeId: string;\n rootNode: unknown;\n};\n\nexport type PersistentBindingSnapshot = {\n kind: 'sceneNode';\n nodeId: string;\n};\n\nexport type RuntimeProp = 'position' | 'rotation' | 'scaling';\n\nexport type MaterialRuntimeKind = 'pbr' | 'standard' | 'unknown';\n\nexport interface ArtistMaterialTextureRef {\n url?: string;\n textureAssetId?: string;\n}\n\nexport type ArtistMaterialAlphaMode = 'opaque' | 'mask' | 'blend';\nexport type ArtistMaterialLightingModel = 'lit' | 'unlit';\n\nexport interface ArtistBaseColorProfile {\n color?: ColorRGB;\n texture?: ArtistMaterialTextureRef | null;\n brightness?: number;\n saturation?: number;\n contrast?: number;\n hue?: number;\n}\n\nexport interface ArtistNormalProfile {\n texture?: ArtistMaterialTextureRef | null;\n strength?: number;\n}\n\nexport interface ArtistMetallicRoughnessProfile {\n texture?: ArtistMaterialTextureRef | null;\n}\n\nexport interface ArtistOcclusionProfile {\n texture?: ArtistMaterialTextureRef | null;\n strength?: number;\n}\n\nexport interface ArtistEmissionProfile {\n color?: ColorRGB;\n intensity?: number;\n texture?: ArtistMaterialTextureRef | null;\n maskTexture?: ArtistMaterialTextureRef | null;\n}\n\nexport interface ArtistAlphaProfile {\n mode?: ArtistMaterialAlphaMode;\n opacity?: number;\n cutoff?: number;\n texture?: ArtistMaterialTextureRef | null;\n}\n\nexport interface ArtistMaterialProfile {\n lightingModel?: ArtistMaterialLightingModel;\n baseColor?: ArtistBaseColorProfile;\n normal?: ArtistNormalProfile;\n metallic?: number;\n roughness?: number;\n metallicRoughness?: ArtistMetallicRoughnessProfile;\n occlusion?: ArtistOcclusionProfile;\n emission?: ArtistEmissionProfile;\n alpha?: ArtistAlphaProfile;\n}\n\nexport type SceneMaterialAssetKind = 'pbr' | 'standard';\nexport type SceneMaterialAssetSystemPreset = 'default-pbr' | 'default-standard';\n\nexport interface SceneMaterialAssetSystemConfig {\n readonly?: boolean;\n preset?: SceneMaterialAssetSystemPreset;\n}\n\nexport type SceneMaterialAssetOriginType = 'imported' | 'created' | 'duplicated' | 'preset';\n\nexport interface SceneMaterialAssetOriginConfig {\n type: SceneMaterialAssetOriginType;\n sourceAssetGuid?: string;\n sourceAssetId?: string;\n sourceSlotId?: string;\n sourceMaterialIndex?: number;\n sourceMaterialName?: string;\n sourceMaterialAssetId?: string;\n}\n\nexport interface SceneMaterialAssetConfig {\n id: string;\n guid?: string;\n name: string;\n profile: ArtistMaterialProfile;\n materialKind?: SceneMaterialAssetKind;\n system?: SceneMaterialAssetSystemConfig;\n origin?: SceneMaterialAssetOriginConfig;\n}\n\nexport interface SceneNodeMaterialBindingConfig {\n materialAssetId?: string;\n override?: ArtistMaterialProfile;\n}\n\nexport interface ArtistMaterialSlotBinding {\n slot: MaterialSlotSourceDescriptor;\n profile: ArtistMaterialProfile;\n materialKind?: SceneMaterialAssetKind;\n}\n\nexport type ArtistMaterialProp =\n | 'material.lightingModel'\n | 'material.baseColor.color'\n | 'material.baseColor.texture.url'\n | 'material.baseColor.texture.textureAssetId'\n | 'material.baseColor.brightness'\n | 'material.baseColor.saturation'\n | 'material.baseColor.contrast'\n | 'material.baseColor.hue'\n | 'material.normal.texture.url'\n | 'material.normal.texture.textureAssetId'\n | 'material.normal.strength'\n | 'material.emission.color'\n | 'material.emission.intensity'\n | 'material.emission.texture.url'\n | 'material.emission.texture.textureAssetId'\n | 'material.emission.maskTexture.url'\n | 'material.emission.maskTexture.textureAssetId'\n | 'material.metallic'\n | 'material.roughness'\n | 'material.metallicRoughness.texture.url'\n | 'material.metallicRoughness.texture.textureAssetId'\n | 'material.occlusion.texture.url'\n | 'material.occlusion.texture.textureAssetId'\n | 'material.occlusion.strength'\n | 'material.alpha.mode'\n | 'material.alpha.opacity'\n | 'material.alpha.cutoff'\n | 'material.alpha.texture.url'\n | 'material.alpha.texture.textureAssetId';\n\nexport type MaterialProp =\n | 'material.albedoColor'\n | 'material.emissiveColor'\n | 'material.metallic'\n | 'material.roughness'\n | 'material.alpha'\n | 'material.alphaCutOff'\n | 'material.transparencyMode'\n | 'material.backFaceCulling'\n | 'material.albedoTexture.url'\n | 'material.normalTexture.url'\n | 'material.normalTexture.level'\n | 'material.metallicTexture.url'\n | 'material.occlusionTexture.url'\n | 'material.emissiveTexture.url'\n | 'material.opacityTexture.url'\n | 'material.pbr.albedoColor'\n | 'material.pbr.baseWeight'\n | 'material.pbr.reflectivityColor'\n | 'material.pbr.microSurface'\n | 'material.pbr.emissiveColor'\n | 'material.pbr.emissiveIntensity'\n | 'material.pbr.ambientColor'\n | 'material.pbr.lightFalloff'\n | 'material.standard.diffuseColor'\n | 'material.standard.specularColor'\n | 'material.standard.specularPower'\n | 'material.standard.emissiveColor'\n | 'material.standard.ambientColor'\n | 'material.standard.useSpecularOverAlpha';\n\nexport type MaterialValue = ColorRGB | number | boolean | string | null;\n\nexport interface ResolveArtistMaterialProfileInput {\n originalProfile?: ArtistMaterialProfile | null;\n materialAssets?: readonly SceneMaterialAssetConfig[] | null;\n binding?: SceneNodeMaterialBindingConfig | null;\n}\n\nexport interface ResolveArtistMaterialProfileResult {\n profile: ArtistMaterialProfile;\n materialAsset: SceneMaterialAssetConfig | null;\n missingMaterialAssetId?: string;\n}\n\nfunction isFiniteNumber(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value);\n}\n\nfunction normalizeColorRGB(value: ColorRGB | undefined): ColorRGB | undefined {\n if (!value || !isFiniteNumber(value.r) || !isFiniteNumber(value.g) || !isFiniteNumber(value.b)) return undefined;\n return { r: value.r, g: value.g, b: value.b };\n}\n\nfunction normalizeMaterialTextureRef(value: ArtistMaterialTextureRef | null | undefined): ArtistMaterialTextureRef | null | undefined {\n if (value === null) return null;\n if (!value) return undefined;\n const url = typeof value.url === 'string' ? value.url.trim() : '';\n const textureAssetId = typeof value.textureAssetId === 'string' ? value.textureAssetId.trim() : '';\n if (!url && !textureAssetId) return undefined;\n return {\n ...(url ? { url } : {}),\n ...(textureAssetId ? { textureAssetId } : {}),\n };\n}\n\nfunction normalizeArtistMaterialAlphaMode(value: unknown): ArtistMaterialAlphaMode | undefined {\n return value === 'opaque' || value === 'mask' || value === 'blend' ? value : undefined;\n}\n\nfunction normalizeArtistMaterialLightingModel(value: unknown): ArtistMaterialLightingModel | undefined {\n return value === 'lit' || value === 'unlit' ? value : undefined;\n}\n\nexport function normalizeSceneMaterialAssetKind(value: unknown): SceneMaterialAssetKind | undefined {\n return value === 'pbr' || value === 'standard' ? value : undefined;\n}\n\nexport function resolveSceneMaterialAssetKind(\n materialAsset: Pick<SceneMaterialAssetConfig, 'materialKind' | 'system'> | null | undefined,\n): SceneMaterialAssetKind {\n return normalizeSceneMaterialAssetKind(materialAsset?.materialKind)\n ?? inferSceneMaterialAssetKindFromSystemPreset(materialAsset?.system?.preset)\n ?? 'pbr';\n}\n\nexport function normalizeSceneMaterialAssetSystemConfig(\n value: SceneMaterialAssetSystemConfig | null | undefined,\n): SceneMaterialAssetSystemConfig | undefined {\n if (!value || typeof value !== 'object') return undefined;\n const preset = value.preset === 'default-pbr' || value.preset === 'default-standard'\n ? value.preset\n : undefined;\n const readonly = value.readonly === true;\n if (!preset && !readonly) return undefined;\n return {\n ...(readonly ? { readonly } : {}),\n ...(preset ? { preset } : {}),\n };\n}\n\nexport function normalizeSceneMaterialAssetOriginConfig(\n value: SceneMaterialAssetOriginConfig | null | undefined,\n): SceneMaterialAssetOriginConfig | undefined {\n if (!value || typeof value !== 'object') return undefined;\n const type = value.type === 'imported'\n || value.type === 'created'\n || value.type === 'duplicated'\n || value.type === 'preset'\n ? value.type\n : undefined;\n if (!type) return undefined;\n const sourceAssetGuid = typeof value.sourceAssetGuid === 'string' ? value.sourceAssetGuid.trim() : '';\n const sourceAssetId = typeof value.sourceAssetId === 'string' ? value.sourceAssetId.trim() : '';\n const sourceSlotId = typeof value.sourceSlotId === 'string' ? value.sourceSlotId.trim() : '';\n const sourceMaterialName = typeof value.sourceMaterialName === 'string' ? value.sourceMaterialName.trim() : '';\n const sourceMaterialAssetId = typeof value.sourceMaterialAssetId === 'string' ? value.sourceMaterialAssetId.trim() : '';\n return {\n type,\n ...(sourceAssetGuid ? { sourceAssetGuid } : {}),\n ...(sourceAssetId ? { sourceAssetId } : {}),\n ...(sourceSlotId ? { sourceSlotId } : {}),\n ...(Number.isInteger(value.sourceMaterialIndex) ? { sourceMaterialIndex: value.sourceMaterialIndex } : {}),\n ...(sourceMaterialName ? { sourceMaterialName } : {}),\n ...(sourceMaterialAssetId ? { sourceMaterialAssetId } : {}),\n };\n}\n\nexport function isReadonlySceneMaterialAsset(\n materialAsset: Pick<SceneMaterialAssetConfig, 'system'> | null | undefined,\n): boolean {\n return materialAsset?.system?.readonly === true;\n}\n\nfunction inferSceneMaterialAssetKindFromSystemPreset(\n preset: unknown,\n): SceneMaterialAssetKind | undefined {\n if (preset === 'default-pbr') return 'pbr';\n if (preset === 'default-standard') return 'standard';\n return undefined;\n}\n\nexport function normalizeArtistMaterialProfile(profile: ArtistMaterialProfile | null | undefined): ArtistMaterialProfile | undefined {\n if (!profile || typeof profile !== 'object') return undefined;\n\n const normalized: ArtistMaterialProfile = {};\n const lightingModel = normalizeArtistMaterialLightingModel(profile.lightingModel);\n if (lightingModel) normalized.lightingModel = lightingModel;\n const baseColor: ArtistBaseColorProfile = {};\n const color = normalizeColorRGB(profile.baseColor?.color);\n if (color) baseColor.color = color;\n const texture = normalizeMaterialTextureRef(profile.baseColor?.texture);\n if (texture !== undefined) baseColor.texture = texture;\n if (isFiniteNumber(profile.baseColor?.brightness)) baseColor.brightness = profile.baseColor.brightness;\n if (isFiniteNumber(profile.baseColor?.saturation)) baseColor.saturation = profile.baseColor.saturation;\n if (isFiniteNumber(profile.baseColor?.contrast)) baseColor.contrast = profile.baseColor.contrast;\n if (isFiniteNumber(profile.baseColor?.hue)) baseColor.hue = profile.baseColor.hue;\n if (Object.keys(baseColor).length > 0) normalized.baseColor = baseColor;\n\n const normal: ArtistNormalProfile = {};\n const normalTexture = normalizeMaterialTextureRef(profile.normal?.texture);\n if (normalTexture !== undefined) normal.texture = normalTexture;\n if (isFiniteNumber(profile.normal?.strength)) normal.strength = profile.normal.strength;\n if (Object.keys(normal).length > 0) normalized.normal = normal;\n\n if (isFiniteNumber(profile.metallic)) normalized.metallic = profile.metallic;\n if (isFiniteNumber(profile.roughness)) normalized.roughness = profile.roughness;\n\n const metallicRoughness: ArtistMetallicRoughnessProfile = {};\n const metallicRoughnessTexture = normalizeMaterialTextureRef(profile.metallicRoughness?.texture);\n if (metallicRoughnessTexture !== undefined) metallicRoughness.texture = metallicRoughnessTexture;\n if (Object.keys(metallicRoughness).length > 0) normalized.metallicRoughness = metallicRoughness;\n\n const occlusion: ArtistOcclusionProfile = {};\n const occlusionTexture = normalizeMaterialTextureRef(profile.occlusion?.texture);\n if (occlusionTexture !== undefined) occlusion.texture = occlusionTexture;\n if (isFiniteNumber(profile.occlusion?.strength)) occlusion.strength = profile.occlusion.strength;\n if (Object.keys(occlusion).length > 0) normalized.occlusion = occlusion;\n\n const emission: ArtistEmissionProfile = {};\n const emissionColor = normalizeColorRGB(profile.emission?.color);\n if (emissionColor) emission.color = emissionColor;\n if (isFiniteNumber(profile.emission?.intensity)) emission.intensity = profile.emission.intensity;\n const emissionTexture = normalizeMaterialTextureRef(profile.emission?.texture);\n if (emissionTexture !== undefined) emission.texture = emissionTexture;\n const maskTexture = normalizeMaterialTextureRef(profile.emission?.maskTexture);\n if (maskTexture !== undefined) emission.maskTexture = maskTexture;\n if (Object.keys(emission).length > 0) normalized.emission = emission;\n\n const alpha: ArtistAlphaProfile = {};\n const alphaMode = normalizeArtistMaterialAlphaMode(profile.alpha?.mode);\n if (alphaMode) alpha.mode = alphaMode;\n if (isFiniteNumber(profile.alpha?.opacity)) alpha.opacity = profile.alpha.opacity;\n if (isFiniteNumber(profile.alpha?.cutoff)) alpha.cutoff = profile.alpha.cutoff;\n const alphaTexture = normalizeMaterialTextureRef(profile.alpha?.texture);\n if (alphaTexture !== undefined) alpha.texture = alphaTexture;\n if (Object.keys(alpha).length > 0) normalized.alpha = alpha;\n\n return Object.keys(normalized).length > 0 ? normalized : undefined;\n}\n\nexport function normalizeSceneMaterialAssetConfig(\n materialAsset: SceneMaterialAssetConfig | null | undefined,\n): SceneMaterialAssetConfig | undefined {\n if (!materialAsset || typeof materialAsset !== 'object') return undefined;\n const id = typeof materialAsset.id === 'string' ? materialAsset.id.trim() : '';\n const guid = typeof materialAsset.guid === 'string' ? materialAsset.guid.trim() : '';\n const name = typeof materialAsset.name === 'string' ? materialAsset.name.trim() : '';\n const profile = normalizeArtistMaterialProfile(materialAsset.profile);\n if (!id || !name || !profile) return undefined;\n const system = normalizeSceneMaterialAssetSystemConfig(materialAsset.system);\n const origin = normalizeSceneMaterialAssetOriginConfig(materialAsset.origin);\n const materialKind = normalizeSceneMaterialAssetKind(materialAsset.materialKind);\n const presetKind = inferSceneMaterialAssetKindFromSystemPreset(system?.preset);\n if (materialKind && presetKind && materialKind !== presetKind) return undefined;\n return {\n id,\n ...(guid ? { guid } : {}),\n name,\n profile,\n ...(materialKind ?? presetKind ? { materialKind: materialKind ?? presetKind } : {}),\n ...(system ? { system } : {}),\n ...(origin ? { origin } : {}),\n };\n}\n\nexport function sceneMaterialGuidToStableToken(guid: string): string {\n return String(guid ?? '').trim().toLowerCase().replace(/[^a-z0-9]+/g, '');\n}\n\nexport function createSceneMaterialAssetId(guid: string): string {\n const token = sceneMaterialGuidToStableToken(guid);\n return `mat_${token || 'material'}`;\n}\n\nexport function mergeArtistMaterialProfiles(\n ...profiles: Array<ArtistMaterialProfile | null | undefined>\n): ArtistMaterialProfile {\n const merged: ArtistMaterialProfile = {};\n for (const profile of profiles) {\n const normalized = normalizeArtistMaterialProfile(profile);\n if (!normalized) continue;\n if (normalized.lightingModel) merged.lightingModel = normalized.lightingModel;\n if (normalized.baseColor) {\n merged.baseColor = {\n ...(merged.baseColor ?? {}),\n ...normalized.baseColor,\n };\n }\n if (normalized.normal) {\n merged.normal = {\n ...(merged.normal ?? {}),\n ...normalized.normal,\n };\n }\n if (normalized.metallic !== undefined) merged.metallic = normalized.metallic;\n if (normalized.roughness !== undefined) merged.roughness = normalized.roughness;\n if (normalized.metallicRoughness) {\n merged.metallicRoughness = {\n ...(merged.metallicRoughness ?? {}),\n ...normalized.metallicRoughness,\n };\n }\n if (normalized.occlusion) {\n merged.occlusion = {\n ...(merged.occlusion ?? {}),\n ...normalized.occlusion,\n };\n }\n if (normalized.emission) {\n merged.emission = {\n ...(merged.emission ?? {}),\n ...normalized.emission,\n };\n }\n if (normalized.alpha) {\n merged.alpha = {\n ...(merged.alpha ?? {}),\n ...normalized.alpha,\n };\n }\n }\n return normalizedOrEmpty(merged);\n}\n\nexport function findSceneMaterialAsset(\n materialAssets: readonly SceneMaterialAssetConfig[] | null | undefined,\n materialAssetId: string | null | undefined,\n): SceneMaterialAssetConfig | null {\n const id = typeof materialAssetId === 'string' ? materialAssetId.trim() : '';\n if (!id || !materialAssets) return null;\n return materialAssets.find(asset => asset.id === id) ?? null;\n}\n\nexport function resolveArtistMaterialProfile(\n input: ResolveArtistMaterialProfileInput,\n): ResolveArtistMaterialProfileResult {\n const materialAssetId = typeof input.binding?.materialAssetId === 'string'\n ? input.binding.materialAssetId.trim()\n : '';\n const materialAsset = findSceneMaterialAsset(input.materialAssets, materialAssetId);\n const profile = mergeArtistMaterialProfiles(\n input.originalProfile,\n materialAsset?.profile,\n input.binding?.override,\n );\n return {\n profile,\n materialAsset,\n ...(materialAssetId && !materialAsset ? { missingMaterialAssetId: materialAssetId } : {}),\n };\n}\n\nfunction normalizedOrEmpty(profile: ArtistMaterialProfile): ArtistMaterialProfile {\n return normalizeArtistMaterialProfile(profile) ?? {};\n}\n\nexport type OutlineProp =\n | 'outline.renderOutline'\n | 'outline.outlineWidth'\n | 'outline.outlineColor';\n\nexport type OutlineValue = ColorRGB | number | boolean | null;\n\nexport interface EditorDocumentExport {\n sceneJsonText: string;\n expectedVersion?: number;\n version?: number;\n}\n\nexport interface EditorDocumentCommitArgs {\n version?: number;\n updatedAt?: string;\n sceneJsonText?: string;\n scenePath?: string;\n}\n\nexport interface EditorDuplicateResult {\n rootNode?: unknown;\n}\n\nexport type EditorTool = 'pick' | 'move' | 'rotate' | 'scale';\nexport type EditorMode = 'edit' | 'play';\nexport type RuntimeOwner = 'project' | 'unknown';\nexport type SelectionSource = 'viewport' | 'tree' | 'programmatic' | 'unknown';\n\nexport interface EditorRuntimeApi {\n active?: boolean;\n init(scene: unknown): void;\n showInspector(): Promise<void> | void;\n hideInspector(): void;\n setTool?(tool: EditorTool): void;\n getSelectedEntity?(): unknown | null;\n selectEntity?(entity: unknown | null, syncInspector?: boolean): void;\n duplicateSelected?(): Promise<boolean> | boolean;\n undo(): boolean;\n redo(): boolean;\n exportDocument(): EditorDocumentExport | null;\n commitSavedDocument(args: EditorDocumentCommitArgs): boolean;\n}\n\nexport interface EditRuntimeApi {\n active?: boolean;\n enter(): Promise<void>;\n exit(save?: boolean): Promise<void>;\n _focusSelected(): void;\n isViewportNavigationActive(): boolean;\n}\n\nexport interface EditorRuntime {\n owner?: RuntimeOwner;\n Editor: EditorRuntimeApi;\n Edit: EditRuntimeApi;\n handleCommand(name: string, params: Record<string, unknown>): Promise<void> | void;\n}\n\nexport interface SelectionController {\n createV2SelectionBridge?(v2: unknown): unknown;\n bindSelectionSourceTracking?(): void;\n unbindSelectionSourceTracking?(): void;\n enablePicking?(): void;\n reset?(): void;\n getSelectedEntity?(): unknown | null;\n getSelectedEntities?(): unknown[];\n selectEntity?(\n entity: unknown | null,\n syncInspector?: boolean,\n options?: { additive?: boolean; toggle?: boolean },\n ): void;\n}\n\nexport type EditorRuntimeChange =\n | {\n kind: 'transform';\n binding: PersistentBindingSnapshot;\n prop: RuntimeProp;\n value: Position3D | Scale3D | Rotation3D;\n rootNode?: unknown;\n selectedRootNode?: unknown | null;\n }\n | {\n kind: 'material';\n binding: PersistentBindingSnapshot;\n prop: MaterialProp;\n value: MaterialValue;\n ownerNodePath: string;\n rootNode?: unknown;\n selectedRootNode?: unknown | null;\n }\n | {\n kind: 'outline';\n binding: PersistentBindingSnapshot;\n prop: OutlineProp;\n value: OutlineValue;\n ownerNodePath: string;\n rootNode?: unknown;\n selectedRootNode?: unknown | null;\n }\n | {\n kind: 'selection';\n selectedRootNode?: unknown | null;\n };\n\nexport interface EditorPluginContext {\n scene: unknown | null;\n game: unknown | null;\n}\n\nexport interface EditorPlugin {\n id: string;\n normalizeSelection?(args: {\n source: SelectionSource;\n rawEntity: unknown;\n context: EditorPluginContext;\n }): unknown | null;\n resolvePersistentBinding?(node: unknown, context: EditorPluginContext): PersistentBinding | null;\n applyDocumentChange?(args: {\n binding: PersistentBinding;\n node: unknown;\n prop: string;\n context: EditorPluginContext;\n oldValue?: unknown;\n newValue?: unknown;\n }): boolean;\n duplicateSelection?(args: {\n binding: PersistentBinding;\n node: unknown;\n context: EditorPluginContext;\n }): EditorDuplicateResult | Promise<EditorDuplicateResult | null> | null;\n isDirty?(): boolean;\n canUndo?(): boolean;\n canRedo?(): boolean;\n undoDocumentChange?(context: EditorPluginContext): EditorRuntimeChange | null;\n redoDocumentChange?(context: EditorPluginContext): EditorRuntimeChange | null;\n exportDocument?(): EditorDocumentExport | null;\n commitSavedDocument?(args: EditorDocumentCommitArgs, context: EditorPluginContext): boolean;\n}\n\nexport interface EditorMessenger {\n event?(eventName: string, payload: Record<string, unknown>): void;\n send?(type: string, payload: Record<string, unknown>): void;\n}\n\nexport interface EditorBridgeLike {\n registerEditorPlugin?: (plugin: EditorPlugin) => void;\n registerEditorRuntime?: (runtime: EditorRuntime) => void;\n messenger?: EditorMessenger;\n editor?: unknown;\n}\n\nexport const EDITOR_COMMAND_NAME = {\n MODE_CHANGE: 'mode.change',\n UNDO: 'history.undo',\n REDO: 'history.redo',\n DOCUMENT_EXPORT: 'document.export',\n DOCUMENT_COMMIT: 'document.commit',\n INSPECTOR_FLUSH: 'inspector.flush',\n ASSET_REGISTRATION_PLAN: 'asset.registration.plan',\n ASSET_UNREGISTRATION_PLAN: 'asset.unregistration.plan',\n ASSET_LIBRARY_REFRESH: 'asset.library.refresh',\n ASSET_IMPORT: 'asset.import',\n EDITOR_ASSET_PLACE: 'editor.asset.place',\n ASSET_REMOVE: 'asset.remove',\n SCENE_NODE_CREATE: 'scene.node.create',\n SCENE_NODE_PATCH: 'scene.node.patch',\n SCENE_NODE_REMOVE: 'scene.node.remove',\n SELECTION_DUPLICATE: 'selection.duplicate',\n} as const;\n\nexport type EditorCommandName = typeof EDITOR_COMMAND_NAME[keyof typeof EDITOR_COMMAND_NAME];\n\nexport const EDITOR_EVENT_NAME = {\n EDITOR_SESSION_READY: 'editor.session.ready',\n DOCUMENT_COMMITTED: 'document.committed',\n DOCUMENT_EXPORTED: 'document.exported',\n UNDO_RESULT: 'history.undo.result',\n REDO_RESULT: 'history.redo.result',\n INSPECTOR_FLUSHED: 'inspector.flushed',\n ASSET_REGISTRATION_PLANNED: 'asset.registration.planned',\n ASSET_REGISTRATION_FAILED: 'asset.registration.failed',\n ASSET_UNREGISTRATION_PLANNED: 'asset.unregistration.planned',\n ASSET_UNREGISTRATION_FAILED: 'asset.unregistration.failed',\n ASSET_LIBRARY_REFRESHED: 'asset.library.refreshed',\n ASSET_IMPORT_RESULT: 'asset.import.result',\n EDITOR_ASSET_PLACE_RESULT: 'editor.asset.place.result',\n ASSET_REMOVE_RESULT: 'asset.remove.result',\n SCENE_NODE_CREATE_RESULT: 'scene.node.create.result',\n SCENE_NODE_PATCH_RESULT: 'scene.node.patch.result',\n SCENE_NODE_REMOVE_RESULT: 'scene.node.remove.result',\n MODE_READY: 'mode.ready',\n SELECTION_DUPLICATE_RESULT: 'selection.duplicate.result',\n} as const;\n\nexport type EditorEventName = typeof EDITOR_EVENT_NAME[keyof typeof EDITOR_EVENT_NAME];\n\nexport const EDITOR_POST_MESSAGE = {\n CONTEXT_CHANGE: 'context:change',\n} as const;\n\nexport type EditorPostMessageType = typeof EDITOR_POST_MESSAGE[keyof typeof EDITOR_POST_MESSAGE];\n\nexport const EDITOR_CAPABILITY = {\n SCENE_TREE: 'sceneTree',\n ASSET_IMPORT: 'assetImport',\n ASSET_REGISTRY_WRITE: 'assetRegistryWrite',\n TRANSFORM_GIZMO: 'transformGizmo',\n MATERIAL_EDITING: 'materialEditing',\n OUTLINE_EDITING: 'outlineEditing',\n DOCUMENT_EXPORT: 'documentExport',\n DOCUMENT_COMMIT: 'documentCommit',\n UNDO_REDO: 'undoRedo',\n INSPECTOR: 'inspector',\n} as const;\n\nexport type EditorCapabilityName = typeof EDITOR_CAPABILITY[keyof typeof EDITOR_CAPABILITY];\nexport type EditorCapabilities = Partial<Record<EditorCapabilityName, boolean>>;\n\n// Migration aliases matching the current project-side editor-package type names.\nexport type ProjectPersistentBinding = PersistentBinding;\nexport type ProjectPersistentBindingSnapshot = PersistentBindingSnapshot;\nexport type ProjectRuntimeProp = RuntimeProp;\nexport type ProjectMaterialRuntimeKind = MaterialRuntimeKind;\nexport type ProjectMaterialProp = MaterialProp;\nexport type ProjectMaterialValue = MaterialValue;\nexport type ProjectOutlineProp = OutlineProp;\nexport type ProjectOutlineValue = OutlineValue;\nexport type ProjectRotation3D = Rotation3D;\nexport type ProjectEditorDocumentExport = EditorDocumentExport;\nexport type ProjectEditorDocumentCommitArgs = EditorDocumentCommitArgs;\nexport type ProjectEditorDuplicateResult = EditorDuplicateResult;\nexport type ProjectEditorRuntimeApi = EditorRuntimeApi;\nexport type ProjectEditRuntimeApi = EditRuntimeApi;\nexport type ProjectEditorRuntime = EditorRuntime;\nexport type ProjectSelectionController = SelectionController;\nexport type ProjectEditorRuntimeChange = EditorRuntimeChange;\nexport type ProjectEditorPluginContext = EditorPluginContext;\nexport type ProjectEditorPlugin = EditorPlugin;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/editor-protocol",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Shared protocol types for fps-game-editor runtimes, adapters, and Forge Play bridges.",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fps-games/playable-contracts": "0.2.1-beta.
|
|
17
|
+
"@fps-games/playable-contracts": "0.2.1-beta.4"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/editor-tooling",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Static Plugin manifest planning and tooling host for fps-game-editor.",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fps-games/plugin-api": "0.2.1-beta.
|
|
26
|
-
"@fps-games/plugin-host": "0.2.1-beta.
|
|
25
|
+
"@fps-games/plugin-api": "0.2.1-beta.4",
|
|
26
|
+
"@fps-games/plugin-host": "0.2.1-beta.4"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"vite": "^5.4.21"
|
|
@@ -15,6 +15,7 @@ export declare function guidToPlayableEditorAssetStableToken(guid: unknown): str
|
|
|
15
15
|
export declare function createPlayableEditorAssetId(kind: PlayableEditorAssetKind, guid: string): string;
|
|
16
16
|
export declare function toPlayableEditorAssetImportName(value: unknown): string;
|
|
17
17
|
export declare function normalizePlayableEditorAssetKind(value: unknown, filePath?: string): PlayableEditorAssetKind | null;
|
|
18
|
+
export declare function getPlayableEditorAssetPathExtension(filePath: string): string;
|
|
18
19
|
export declare function stripKnownPlayableEditorAssetExtension(value: unknown): string;
|
|
19
20
|
export declare function normalizePlayableEditorAssetDisplayName(value: unknown, fallback: unknown): string;
|
|
20
21
|
export declare function normalizePlayableEditorAssetCodeKey(value: unknown, fallback: unknown): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE9E,eAAO,MAAM,mCAAmC,iDAAkD,CAAC;AAEnG,eAAO,MAAM,gCAAgC,4BAA6B,CAAC;AAC3E,eAAO,MAAM,gCAAgC,6CAA8C,CAAC;AAC5F,eAAO,MAAM,8CAA8C,oDAAqD,CAAC;AACjH,eAAO,MAAM,kCAAkC,sFAGrC,CAAC;AACX,eAAO,MAAM,gCAAgC,4DAA6D,CAAC;AAC3G,eAAO,MAAM,kCAAkC,wJAIrC,CAAC;AAEX,MAAM,WAAW,yBAAyB;IACxC,UAAU,CAAC,IAAI,MAAM,CAAC;IACtB,eAAe,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC3C;AAED,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,yBAAyB,GAAG,MAAM,CAG7F;AAED,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAE1E;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/F;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUtE;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,EACd,QAAQ,SAAK,GACZ,uBAAuB,GAAG,IAAI,CAYhC;
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","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AAI,CASpG;AAED,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,uBAAuB,GAAG,SAAS,MAAM,EAAE,CAMrG"}
|
|
@@ -61,7 +61,7 @@ export function normalizePlayableEditorAssetKind(value, filePath = '') {
|
|
|
61
61
|
return 'texture';
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
function getPlayableEditorAssetPathExtension(filePath) {
|
|
64
|
+
export function getPlayableEditorAssetPathExtension(filePath) {
|
|
65
65
|
const cleanPath = filePath.split(/[?#]/, 1)[0] ?? '';
|
|
66
66
|
const slashIndex = Math.max(cleanPath.lastIndexOf('/'), cleanPath.lastIndexOf('\\'));
|
|
67
67
|
const fileName = cleanPath.slice(slashIndex + 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAEnG,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAC3E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAC5F,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AACjH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,gCAAgC;IACnC,GAAG,8CAA8C;CACzC,CAAC;AACX,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAC3G,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,gCAAgC;IACnC,GAAG,kCAAkC;IACrC,GAAG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G,GAAG,sCAAsC,CAAC,KAAK,IAAI,QAAQ,CAAC;SAClE,IAAI,EAAE;SACN,WAAW,EAAE;SACb,SAAS,CAAC,MAAM,CAAC;SACjB,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC1B,OAAO,GAAG,IAAI,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,IAA6B;IAChF,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,gCAAgC,CAAC;IAC9D,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,gCAAgC,CAAC;IAC9D,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,kCAAkC,CAAC;IAClE,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,gCAAgC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["export type PlayableEditorAssetKind = 'model' | 'texture' | 'image' | 'sound';\n\nexport const PLAYABLE_EDITOR_ASSET_CATALOG_KINDS = ['model', 'texture', 'image', 'sound'] as const;\n\nexport const PLAYABLE_EDITOR_MODEL_EXTENSIONS = ['.glb', '.gltf'] as const;\nexport const PLAYABLE_EDITOR_IMAGE_EXTENSIONS = ['.png', '.jpg', '.jpeg', '.webp'] as const;\nexport const PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS = ['.env', '.hdr', '.dds', '.ktx', '.ktx2'] as const;\nexport const PLAYABLE_EDITOR_TEXTURE_EXTENSIONS = [\n ...PLAYABLE_EDITOR_IMAGE_EXTENSIONS,\n ...PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,\n] as const;\nexport const PLAYABLE_EDITOR_SOUND_EXTENSIONS = ['.mp3', '.wav', '.ogg', '.flac', '.aac', '.m4a'] as const;\nexport const PLAYABLE_EDITOR_DEFAULT_EXTENSIONS = [\n ...PLAYABLE_EDITOR_MODEL_EXTENSIONS,\n ...PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,\n ...PLAYABLE_EDITOR_SOUND_EXTENSIONS,\n] as const;\n\nexport interface PlayableAssetRandomSource {\n randomUUID?(): string;\n fillRandomBytes?(bytes: Uint8Array): void;\n}\n\nexport function createPlayableEditorAssetGuid(randomSource: PlayableAssetRandomSource): string {\n if (randomSource.randomUUID) return randomSource.randomUUID();\n return createFallbackPlayableEditorAssetGuid(randomSource);\n}\n\nexport function guidToPlayableEditorAssetStableToken(guid: unknown): string {\n return String(guid ?? '').trim().toLowerCase().replace(/-/g, '');\n}\n\nexport function createPlayableEditorAssetId(kind: PlayableEditorAssetKind, guid: string): string {\n const token = guidToPlayableEditorAssetStableToken(guid);\n const prefix = kind === 'model'\n ? 'asset'\n : kind === 'texture'\n ? 'texture'\n : kind === 'sound'\n ? 'sound'\n : 'image';\n return `${prefix}_${token}`;\n}\n\nexport function toPlayableEditorAssetImportName(value: unknown): string {\n const raw = String(value ?? '').trim();\n const segments = raw.split(/[^a-zA-Z0-9_$]+/).filter(Boolean);\n const camel = segments\n .map((segment, index) => index === 0\n ? segment\n : `${segment.charAt(0).toUpperCase()}${segment.slice(1)}`)\n .join('');\n const safe = camel.replace(/[^a-zA-Z0-9_$]/g, '') || 'assetUrl';\n return /^[a-zA-Z_$]/.test(safe) ? safe : `asset${safe}`;\n}\n\nexport function normalizePlayableEditorAssetKind(\n value: unknown,\n filePath = '',\n): PlayableEditorAssetKind | null {\n const raw = String(value ?? '').trim().toLowerCase();\n if (raw === 'glb' || raw === 'gltf' || raw === 'model') return 'model';\n if (raw === 'groundtexture' || raw === 'ground-texture' || raw === 'texture') return 'texture';\n if (raw === 'ui' || raw === 'image' || raw === 'img') return 'image';\n if (raw === 'audio' || raw === 'sound') return 'sound';\n\n const extension = getPlayableEditorAssetPathExtension(filePath);\n if ((PLAYABLE_EDITOR_MODEL_EXTENSIONS as readonly string[]).includes(extension)) return 'model';\n if ((PLAYABLE_EDITOR_SOUND_EXTENSIONS as readonly string[]).includes(extension)) return 'sound';\n if ((PLAYABLE_EDITOR_TEXTURE_EXTENSIONS as readonly string[]).includes(extension)) return 'texture';\n return null;\n}\n\nfunction getPlayableEditorAssetPathExtension(filePath: string): string {\n const cleanPath = filePath.split(/[?#]/, 1)[0] ?? '';\n const slashIndex = Math.max(cleanPath.lastIndexOf('/'), cleanPath.lastIndexOf('\\\\'));\n const fileName = cleanPath.slice(slashIndex + 1);\n const dotIndex = fileName.lastIndexOf('.');\n return dotIndex >= 0 ? fileName.slice(dotIndex).toLowerCase() : '';\n}\n\nfunction createFallbackPlayableEditorAssetGuid(randomSource: PlayableAssetRandomSource): string {\n const bytes = new Uint8Array(16);\n if (!randomSource.fillRandomBytes) throw new Error('Asset GUID random source must provide randomUUID or fillRandomBytes.');\n randomSource.fillRandomBytes(bytes);\n if (bytes.every((byte) => byte === 0)) {\n throw new Error('Asset GUID random source returned no entropy.');\n }\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const hex = [...bytes].map((byte) => byte.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n\nexport function stripKnownPlayableEditorAssetExtension(value: unknown): string {\n let raw = String(value ?? '').trim();\n const lower = raw.toLowerCase();\n for (const extension of [...PLAYABLE_EDITOR_DEFAULT_EXTENSIONS].sort((a, b) => b.length - a.length)) {\n if (lower.endsWith(extension)) {\n raw = raw.slice(0, -extension.length);\n break;\n }\n }\n return raw;\n}\n\nexport function normalizePlayableEditorAssetDisplayName(value: unknown, fallback: unknown): string {\n const displayName = String(value ?? '').trim() || stripKnownPlayableEditorAssetExtension(fallback);\n return displayName || 'Asset';\n}\n\nexport function normalizePlayableEditorAssetCodeKey(value: unknown, fallback: unknown): string | null {\n const raw = stripKnownPlayableEditorAssetExtension(value || fallback)\n .trim()\n .toLowerCase()\n .normalize('NFKD')\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_{2,}/g, '_');\n return raw || null;\n}\n\nexport function getPlayableEditorAssetKindExtensions(kind: PlayableEditorAssetKind): readonly string[] {\n if (kind === 'model') return PLAYABLE_EDITOR_MODEL_EXTENSIONS;\n if (kind === 'sound') return PLAYABLE_EDITOR_SOUND_EXTENSIONS;\n if (kind === 'texture') return PLAYABLE_EDITOR_TEXTURE_EXTENSIONS;\n if (kind === 'image') return PLAYABLE_EDITOR_IMAGE_EXTENSIONS;\n return [];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAEnG,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AAC3E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAC5F,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AACjH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,gCAAgC;IACnC,GAAG,8CAA8C;CACzC,CAAC;AACX,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAC3G,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,gCAAgC;IACnC,GAAG,kCAAkC;IACrC,GAAG,gCAAgC;CAC3B,CAAC;AAOX,MAAM,UAAU,6BAA6B,CAAC,YAAuC;IACnF,IAAI,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,WAAW,EAAE;SACb,SAAS,CAAC,MAAM,CAAC;SACjB,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC1B,OAAO,GAAG,IAAI,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,IAA6B;IAChF,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,gCAAgC,CAAC;IAC9D,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,gCAAgC,CAAC;IAC9D,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,kCAAkC,CAAC;IAClE,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,gCAAgC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["export type PlayableEditorAssetKind = 'model' | 'texture' | 'image' | 'sound';\n\nexport const PLAYABLE_EDITOR_ASSET_CATALOG_KINDS = ['model', 'texture', 'image', 'sound'] as const;\n\nexport const PLAYABLE_EDITOR_MODEL_EXTENSIONS = ['.glb', '.gltf'] as const;\nexport const PLAYABLE_EDITOR_IMAGE_EXTENSIONS = ['.png', '.jpg', '.jpeg', '.webp'] as const;\nexport const PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS = ['.env', '.hdr', '.dds', '.ktx', '.ktx2'] as const;\nexport const PLAYABLE_EDITOR_TEXTURE_EXTENSIONS = [\n ...PLAYABLE_EDITOR_IMAGE_EXTENSIONS,\n ...PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,\n] as const;\nexport const PLAYABLE_EDITOR_SOUND_EXTENSIONS = ['.mp3', '.wav', '.ogg', '.flac', '.aac', '.m4a'] as const;\nexport const PLAYABLE_EDITOR_DEFAULT_EXTENSIONS = [\n ...PLAYABLE_EDITOR_MODEL_EXTENSIONS,\n ...PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,\n ...PLAYABLE_EDITOR_SOUND_EXTENSIONS,\n] as const;\n\nexport interface PlayableAssetRandomSource {\n randomUUID?(): string;\n fillRandomBytes?(bytes: Uint8Array): void;\n}\n\nexport function createPlayableEditorAssetGuid(randomSource: PlayableAssetRandomSource): string {\n if (randomSource.randomUUID) return randomSource.randomUUID();\n return createFallbackPlayableEditorAssetGuid(randomSource);\n}\n\nexport function guidToPlayableEditorAssetStableToken(guid: unknown): string {\n return String(guid ?? '').trim().toLowerCase().replace(/-/g, '');\n}\n\nexport function createPlayableEditorAssetId(kind: PlayableEditorAssetKind, guid: string): string {\n const token = guidToPlayableEditorAssetStableToken(guid);\n const prefix = kind === 'model'\n ? 'asset'\n : kind === 'texture'\n ? 'texture'\n : kind === 'sound'\n ? 'sound'\n : 'image';\n return `${prefix}_${token}`;\n}\n\nexport function toPlayableEditorAssetImportName(value: unknown): string {\n const raw = String(value ?? '').trim();\n const segments = raw.split(/[^a-zA-Z0-9_$]+/).filter(Boolean);\n const camel = segments\n .map((segment, index) => index === 0\n ? segment\n : `${segment.charAt(0).toUpperCase()}${segment.slice(1)}`)\n .join('');\n const safe = camel.replace(/[^a-zA-Z0-9_$]/g, '') || 'assetUrl';\n return /^[a-zA-Z_$]/.test(safe) ? safe : `asset${safe}`;\n}\n\nexport function normalizePlayableEditorAssetKind(\n value: unknown,\n filePath = '',\n): PlayableEditorAssetKind | null {\n const raw = String(value ?? '').trim().toLowerCase();\n if (raw === 'glb' || raw === 'gltf' || raw === 'model') return 'model';\n if (raw === 'groundtexture' || raw === 'ground-texture' || raw === 'texture') return 'texture';\n if (raw === 'ui' || raw === 'image' || raw === 'img') return 'image';\n if (raw === 'audio' || raw === 'sound') return 'sound';\n\n const extension = getPlayableEditorAssetPathExtension(filePath);\n if ((PLAYABLE_EDITOR_MODEL_EXTENSIONS as readonly string[]).includes(extension)) return 'model';\n if ((PLAYABLE_EDITOR_SOUND_EXTENSIONS as readonly string[]).includes(extension)) return 'sound';\n if ((PLAYABLE_EDITOR_TEXTURE_EXTENSIONS as readonly string[]).includes(extension)) return 'texture';\n return null;\n}\n\nexport function getPlayableEditorAssetPathExtension(filePath: string): string {\n const cleanPath = filePath.split(/[?#]/, 1)[0] ?? '';\n const slashIndex = Math.max(cleanPath.lastIndexOf('/'), cleanPath.lastIndexOf('\\\\'));\n const fileName = cleanPath.slice(slashIndex + 1);\n const dotIndex = fileName.lastIndexOf('.');\n return dotIndex >= 0 ? fileName.slice(dotIndex).toLowerCase() : '';\n}\n\nfunction createFallbackPlayableEditorAssetGuid(randomSource: PlayableAssetRandomSource): string {\n const bytes = new Uint8Array(16);\n if (!randomSource.fillRandomBytes) throw new Error('Asset GUID random source must provide randomUUID or fillRandomBytes.');\n randomSource.fillRandomBytes(bytes);\n if (bytes.every((byte) => byte === 0)) {\n throw new Error('Asset GUID random source returned no entropy.');\n }\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const hex = [...bytes].map((byte) => byte.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n\nexport function stripKnownPlayableEditorAssetExtension(value: unknown): string {\n let raw = String(value ?? '').trim();\n const lower = raw.toLowerCase();\n for (const extension of [...PLAYABLE_EDITOR_DEFAULT_EXTENSIONS].sort((a, b) => b.length - a.length)) {\n if (lower.endsWith(extension)) {\n raw = raw.slice(0, -extension.length);\n break;\n }\n }\n return raw;\n}\n\nexport function normalizePlayableEditorAssetDisplayName(value: unknown, fallback: unknown): string {\n const displayName = String(value ?? '').trim() || stripKnownPlayableEditorAssetExtension(fallback);\n return displayName || 'Asset';\n}\n\nexport function normalizePlayableEditorAssetCodeKey(value: unknown, fallback: unknown): string | null {\n const raw = stripKnownPlayableEditorAssetExtension(value || fallback)\n .trim()\n .toLowerCase()\n .normalize('NFKD')\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_{2,}/g, '_');\n return raw || null;\n}\n\nexport function getPlayableEditorAssetKindExtensions(kind: PlayableEditorAssetKind): readonly string[] {\n if (kind === 'model') return PLAYABLE_EDITOR_MODEL_EXTENSIONS;\n if (kind === 'sound') return PLAYABLE_EDITOR_SOUND_EXTENSIONS;\n if (kind === 'texture') return PLAYABLE_EDITOR_TEXTURE_EXTENSIONS;\n if (kind === 'image') return PLAYABLE_EDITOR_IMAGE_EXTENSIONS;\n return [];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './identity.js';\nexport * from './portable-path.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './identity.js';\nexport * from './portable-path.js';\nexport * from './resource-resolver.js';\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type PlayableAssetFormat = `.${string}`;
|
|
2
|
+
export type PlayableAssetResourceTransport = 'path-url' | 'http-url' | 'data-url' | 'blob-url';
|
|
3
|
+
/** The browser-safe subset emitted by the generated project asset catalog. */
|
|
4
|
+
export interface PlayableGeneratedAssetCatalogEntry {
|
|
5
|
+
readonly assetId: string;
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly format: PlayableAssetFormat;
|
|
8
|
+
readonly relativePath: string;
|
|
9
|
+
readonly originalFileName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PlayableResolvedAssetResource {
|
|
12
|
+
readonly assetId: string | null;
|
|
13
|
+
readonly url: string;
|
|
14
|
+
readonly format: PlayableAssetFormat;
|
|
15
|
+
readonly transport: PlayableAssetResourceTransport;
|
|
16
|
+
readonly relativePath: string | null;
|
|
17
|
+
readonly originalFileName: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface PlayableAssetResourceReference {
|
|
20
|
+
readonly assetId?: string | null;
|
|
21
|
+
readonly url?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export type PlayableAssetResourceResolutionCode = 'asset.resource.not-found' | 'asset.resource.format-missing' | 'asset.resource.format-unsupported' | 'asset.resource.invalid-reference';
|
|
24
|
+
export interface PlayableAssetResourceResolutionDiagnostic {
|
|
25
|
+
readonly code: PlayableAssetResourceResolutionCode;
|
|
26
|
+
readonly assetId: string | null;
|
|
27
|
+
readonly format: PlayableAssetFormat | null;
|
|
28
|
+
readonly transport: PlayableAssetResourceTransport | null;
|
|
29
|
+
/** A safe bounded URL description. It never includes a data/blob payload. */
|
|
30
|
+
readonly urlSummary: string | null;
|
|
31
|
+
}
|
|
32
|
+
export type PlayableAssetResourceResolution = Readonly<{
|
|
33
|
+
ok: true;
|
|
34
|
+
resource: PlayableResolvedAssetResource;
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
ok: false;
|
|
37
|
+
diagnostic: PlayableAssetResourceResolutionDiagnostic;
|
|
38
|
+
}>;
|
|
39
|
+
export interface PlayableAssetResourceResolver {
|
|
40
|
+
resolve(reference: PlayableAssetResourceReference): PlayableAssetResourceResolution;
|
|
41
|
+
}
|
|
42
|
+
export declare function createPlayableAssetResourceResolver(catalog: Readonly<Record<string, PlayableGeneratedAssetCatalogEntry>>): PlayableAssetResourceResolver;
|
|
43
|
+
export declare function getPlayableAssetFormat(value: unknown): PlayableAssetFormat | null;
|
|
44
|
+
export declare function isPlayableAssetFormatSupported(format: PlayableAssetFormat): boolean;
|
|
45
|
+
export declare function getPlayableAssetResourceTransport(url: string): PlayableAssetResourceTransport;
|
|
46
|
+
//# sourceMappingURL=resource-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-resolver.d.ts","sourceRoot":"","sources":["../src/resource-resolver.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,mBAAmB,GAAG,IAAI,MAAM,EAAE,CAAC;AAC/C,MAAM,MAAM,8BAA8B,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAE/F,8EAA8E;AAC9E,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,8BAA8B,CAAC;IACnD,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,C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
3
|
+
const entries = new Map();
|
|
4
|
+
for (const [catalogAssetId, input] of Object.entries(catalog)) {
|
|
5
|
+
const entry = normalizeCatalogEntry(catalogAssetId, input);
|
|
6
|
+
if (entries.has(entry.assetId))
|
|
7
|
+
throw new Error(`Duplicate generated asset catalog id: ${entry.assetId}`);
|
|
8
|
+
entries.set(entry.assetId, entry);
|
|
9
|
+
}
|
|
10
|
+
return Object.freeze({
|
|
11
|
+
resolve(reference) {
|
|
12
|
+
const assetId = normalizeOptionalString(reference.assetId);
|
|
13
|
+
const url = normalizeOptionalString(reference.url);
|
|
14
|
+
if (assetId) {
|
|
15
|
+
const entry = entries.get(assetId);
|
|
16
|
+
if (!entry)
|
|
17
|
+
return failed('asset.resource.not-found', assetId, null, null, url);
|
|
18
|
+
return resolved({
|
|
19
|
+
assetId: entry.assetId,
|
|
20
|
+
url: entry.url,
|
|
21
|
+
format: entry.format,
|
|
22
|
+
transport: getPlayableAssetResourceTransport(entry.url),
|
|
23
|
+
relativePath: entry.relativePath,
|
|
24
|
+
originalFileName: entry.originalFileName ?? null,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (!url)
|
|
28
|
+
return failed('asset.resource.invalid-reference', null, null, null, null);
|
|
29
|
+
const transport = getPlayableAssetResourceTransport(url);
|
|
30
|
+
if (transport === 'data-url' || transport === 'blob-url') {
|
|
31
|
+
return failed('asset.resource.format-missing', null, null, transport, url);
|
|
32
|
+
}
|
|
33
|
+
const format = getPlayableAssetFormat(url);
|
|
34
|
+
if (!format)
|
|
35
|
+
return failed('asset.resource.format-missing', null, null, transport, url);
|
|
36
|
+
if (!isPlayableAssetFormatSupported(format)) {
|
|
37
|
+
return failed('asset.resource.format-unsupported', null, format, transport, url);
|
|
38
|
+
}
|
|
39
|
+
return resolved({ assetId: null, url, format, transport, relativePath: null, originalFileName: null });
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export function getPlayableAssetFormat(value) {
|
|
44
|
+
const extension = getPlayableEditorAssetPathExtension(String(value ?? ''));
|
|
45
|
+
return extension ? extension : null;
|
|
46
|
+
}
|
|
47
|
+
export function isPlayableAssetFormatSupported(format) {
|
|
48
|
+
return PLAYABLE_EDITOR_DEFAULT_EXTENSIONS.includes(format);
|
|
49
|
+
}
|
|
50
|
+
export function getPlayableAssetResourceTransport(url) {
|
|
51
|
+
if (/^data:/i.test(url))
|
|
52
|
+
return 'data-url';
|
|
53
|
+
if (/^blob:/i.test(url))
|
|
54
|
+
return 'blob-url';
|
|
55
|
+
if (/^https?:/i.test(url))
|
|
56
|
+
return 'http-url';
|
|
57
|
+
return 'path-url';
|
|
58
|
+
}
|
|
59
|
+
function normalizeCatalogEntry(catalogAssetId, input) {
|
|
60
|
+
const assetId = normalizeRequiredString(input?.assetId, `Generated asset catalog entry ${catalogAssetId} assetId`);
|
|
61
|
+
if (assetId !== catalogAssetId)
|
|
62
|
+
throw new Error(`Generated asset catalog key/id mismatch: ${catalogAssetId}`);
|
|
63
|
+
const url = normalizeRequiredString(input.url, `Generated asset catalog entry ${assetId} url`);
|
|
64
|
+
const relativePath = normalizeRequiredString(input.relativePath, `Generated asset catalog entry ${assetId} relativePath`);
|
|
65
|
+
const format = normalizeFormat(input.format, `Generated asset catalog entry ${assetId} format`);
|
|
66
|
+
const derivedFormat = getPlayableAssetFormat(relativePath);
|
|
67
|
+
if (derivedFormat !== format)
|
|
68
|
+
throw new Error(`Generated asset catalog entry ${assetId} format must match relativePath.`);
|
|
69
|
+
if (!isPlayableAssetFormatSupported(format))
|
|
70
|
+
throw new Error(`Generated asset catalog entry ${assetId} has unsupported format: ${format}`);
|
|
71
|
+
const originalFileName = normalizeOptionalString(input.originalFileName);
|
|
72
|
+
return Object.freeze({ assetId, url, format, relativePath, ...(originalFileName ? { originalFileName } : {}) });
|
|
73
|
+
}
|
|
74
|
+
function normalizeFormat(value, label) {
|
|
75
|
+
const format = getPlayableAssetFormat(String(value ?? ''));
|
|
76
|
+
if (!format || format !== String(value).trim().toLowerCase())
|
|
77
|
+
throw new Error(`${label} must be a normalized file extension.`);
|
|
78
|
+
return format;
|
|
79
|
+
}
|
|
80
|
+
function normalizeRequiredString(value, label) {
|
|
81
|
+
const result = normalizeOptionalString(value);
|
|
82
|
+
if (!result)
|
|
83
|
+
throw new Error(`${label} is required.`);
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
function normalizeOptionalString(value) {
|
|
87
|
+
if (typeof value !== 'string')
|
|
88
|
+
return null;
|
|
89
|
+
const result = value.trim();
|
|
90
|
+
return result || null;
|
|
91
|
+
}
|
|
92
|
+
function resolved(resource) {
|
|
93
|
+
return Object.freeze({ ok: true, resource: Object.freeze(resource) });
|
|
94
|
+
}
|
|
95
|
+
function failed(code, assetId, format, transport, url) {
|
|
96
|
+
return Object.freeze({ ok: false, diagnostic: Object.freeze({
|
|
97
|
+
code, assetId, format, transport, urlSummary: summarizeUrl(url),
|
|
98
|
+
}) });
|
|
99
|
+
}
|
|
100
|
+
function summarizeUrl(url) {
|
|
101
|
+
if (!url)
|
|
102
|
+
return null;
|
|
103
|
+
if (/^data:/i.test(url))
|
|
104
|
+
return 'data:<redacted>';
|
|
105
|
+
if (/^blob:/i.test(url))
|
|
106
|
+
return 'blob:<redacted>';
|
|
107
|
+
return url.length <= 160 ? url : `${url.slice(0, 157)}...`;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=resource-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-resolver.js","sourceRoot":"","sources":["../src/resource-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,eAAe,CAAC;AAmDvB,MAAM,UAAU,mCAAmC,CACjD,OAAqE;IAErE,MAAM,OAAO,GAAG,IAAI,GAAG,EAA8C,CAAC;IACtE,KAAK,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC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,CAAC;IACtB,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAClD,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,iBAAiB,CAAC;IAClD,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC;AAC7D,CAAC","sourcesContent":["import {\n PLAYABLE_EDITOR_DEFAULT_EXTENSIONS,\n getPlayableEditorAssetPathExtension,\n} from './identity.js';\n\nexport type PlayableAssetFormat = `.${string}`;\nexport type PlayableAssetResourceTransport = 'path-url' | 'http-url' | 'data-url' | 'blob-url';\n\n/** The browser-safe subset emitted by the generated project asset catalog. */\nexport interface PlayableGeneratedAssetCatalogEntry {\n readonly assetId: string;\n readonly url: string;\n readonly format: PlayableAssetFormat;\n readonly relativePath: string;\n readonly originalFileName?: string;\n}\n\nexport interface PlayableResolvedAssetResource {\n readonly assetId: string | null;\n readonly url: string;\n readonly format: PlayableAssetFormat;\n readonly transport: PlayableAssetResourceTransport;\n readonly relativePath: string | null;\n readonly originalFileName: string | null;\n}\n\nexport interface PlayableAssetResourceReference {\n readonly assetId?: string | null;\n readonly url?: string | null;\n}\n\nexport type PlayableAssetResourceResolutionCode =\n | 'asset.resource.not-found'\n | 'asset.resource.format-missing'\n | 'asset.resource.format-unsupported'\n | 'asset.resource.invalid-reference';\n\nexport interface PlayableAssetResourceResolutionDiagnostic {\n readonly code: PlayableAssetResourceResolutionCode;\n readonly assetId: string | null;\n readonly format: PlayableAssetFormat | null;\n readonly transport: PlayableAssetResourceTransport | null;\n /** A safe bounded URL description. It never includes a data/blob payload. */\n readonly urlSummary: string | null;\n}\n\nexport type PlayableAssetResourceResolution =\n | Readonly<{ ok: true; resource: PlayableResolvedAssetResource }>\n | Readonly<{ ok: false; diagnostic: PlayableAssetResourceResolutionDiagnostic }>;\n\nexport interface PlayableAssetResourceResolver {\n resolve(reference: PlayableAssetResourceReference): PlayableAssetResourceResolution;\n}\n\nexport function createPlayableAssetResourceResolver(\n catalog: Readonly<Record<string, PlayableGeneratedAssetCatalogEntry>>,\n): PlayableAssetResourceResolver {\n const entries = new Map<string, PlayableGeneratedAssetCatalogEntry>();\n for (const [catalogAssetId, input] of Object.entries(catalog)) {\n const entry = normalizeCatalogEntry(catalogAssetId, input);\n if (entries.has(entry.assetId)) throw new Error(`Duplicate generated asset catalog id: ${entry.assetId}`);\n entries.set(entry.assetId, entry);\n }\n return Object.freeze({\n resolve(reference: PlayableAssetResourceReference) {\n const assetId = normalizeOptionalString(reference.assetId);\n const url = normalizeOptionalString(reference.url);\n if (assetId) {\n const entry = entries.get(assetId);\n if (!entry) return failed('asset.resource.not-found', assetId, null, null, url);\n return resolved({\n assetId: entry.assetId,\n url: entry.url,\n format: entry.format,\n transport: getPlayableAssetResourceTransport(entry.url),\n relativePath: entry.relativePath,\n originalFileName: entry.originalFileName ?? null,\n });\n }\n if (!url) return failed('asset.resource.invalid-reference', null, null, null, null);\n const transport = getPlayableAssetResourceTransport(url);\n if (transport === 'data-url' || transport === 'blob-url') {\n return failed('asset.resource.format-missing', null, null, transport, url);\n }\n const format = getPlayableAssetFormat(url);\n if (!format) return failed('asset.resource.format-missing', null, null, transport, url);\n if (!isPlayableAssetFormatSupported(format)) {\n return failed('asset.resource.format-unsupported', null, format, transport, url);\n }\n return resolved({ assetId: null, url, format, transport, relativePath: null, originalFileName: null });\n },\n });\n}\n\nexport function getPlayableAssetFormat(value: unknown): PlayableAssetFormat | null {\n const extension = getPlayableEditorAssetPathExtension(String(value ?? ''));\n return extension ? extension as PlayableAssetFormat : null;\n}\n\nexport function isPlayableAssetFormatSupported(format: PlayableAssetFormat): boolean {\n return (PLAYABLE_EDITOR_DEFAULT_EXTENSIONS as readonly string[]).includes(format);\n}\n\nexport function getPlayableAssetResourceTransport(url: string): PlayableAssetResourceTransport {\n if (/^data:/i.test(url)) return 'data-url';\n if (/^blob:/i.test(url)) return 'blob-url';\n if (/^https?:/i.test(url)) return 'http-url';\n return 'path-url';\n}\n\nfunction normalizeCatalogEntry(\n catalogAssetId: string,\n input: PlayableGeneratedAssetCatalogEntry,\n): PlayableGeneratedAssetCatalogEntry {\n const assetId = normalizeRequiredString(input?.assetId, `Generated asset catalog entry ${catalogAssetId} assetId`);\n if (assetId !== catalogAssetId) throw new Error(`Generated asset catalog key/id mismatch: ${catalogAssetId}`);\n const url = normalizeRequiredString(input.url, `Generated asset catalog entry ${assetId} url`);\n const relativePath = normalizeRequiredString(input.relativePath, `Generated asset catalog entry ${assetId} relativePath`);\n const format = normalizeFormat(input.format, `Generated asset catalog entry ${assetId} format`);\n const derivedFormat = getPlayableAssetFormat(relativePath);\n if (derivedFormat !== format) throw new Error(`Generated asset catalog entry ${assetId} format must match relativePath.`);\n if (!isPlayableAssetFormatSupported(format)) throw new Error(`Generated asset catalog entry ${assetId} has unsupported format: ${format}`);\n const originalFileName = normalizeOptionalString(input.originalFileName);\n return Object.freeze({ assetId, url, format, relativePath, ...(originalFileName ? { originalFileName } : {}) });\n}\n\nfunction normalizeFormat(value: unknown, label: string): PlayableAssetFormat {\n const format = getPlayableAssetFormat(String(value ?? ''));\n if (!format || format !== String(value).trim().toLowerCase()) throw new Error(`${label} must be a normalized file extension.`);\n return format;\n}\n\nfunction normalizeRequiredString(value: unknown, label: string): string {\n const result = normalizeOptionalString(value);\n if (!result) throw new Error(`${label} is required.`);\n return result;\n}\n\nfunction normalizeOptionalString(value: unknown): string | null {\n if (typeof value !== 'string') return null;\n const result = value.trim();\n return result || null;\n}\n\nfunction resolved(resource: PlayableResolvedAssetResource): PlayableAssetResourceResolution {\n return Object.freeze({ ok: true, resource: Object.freeze(resource) });\n}\n\nfunction failed(\n code: PlayableAssetResourceResolutionCode,\n assetId: string | null,\n format: PlayableAssetFormat | null,\n transport: PlayableAssetResourceTransport | null,\n url: string | null,\n): PlayableAssetResourceResolution {\n return Object.freeze({ ok: false, diagnostic: Object.freeze({\n code, assetId, format, transport, urlSummary: summarizeUrl(url),\n }) });\n}\n\nfunction summarizeUrl(url: string | null): string | null {\n if (!url) return null;\n if (/^data:/i.test(url)) return 'data:<redacted>';\n if (/^blob:/i.test(url)) return 'blob:<redacted>';\n return url.length <= 160 ? url : `${url.slice(0, 157)}...`;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/playable-rendering",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Environment-neutral rendering and shadow contracts and resolution logic.",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@fps-games/playable-contracts": "0.2.1-beta.
|
|
21
|
+
"@fps-games/playable-contracts": "0.2.1-beta.4"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,0BAA0B,EAE3B,MAAM,YAAY,CAAC;AAEpB,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAa9F;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,0BAA0B,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAkC/G;AA+BD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,UAAU,CAiHvE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineFpsPluginEntry, defineFpsPluginManifest } from '@fps-games/plugin-api';
|
|
2
2
|
import { createFpsPluginHost } from '@fps-games/plugin-host';
|
|
3
|
+
import { FPS_ASSET_CATALOG_SOURCE } from '@fps-games/plugin-assets/resources';
|
|
3
4
|
import { assertFpsRuntimePluginDataContracts, createFpsRuntimeDataSnapshot } from './runtime-data.js';
|
|
4
5
|
import { createFpsStandardRuntimePlugins } from './standard-plugins.js';
|
|
5
6
|
import { FPS_RUNTIME_DATA, FPS_RUNTIME_PROJECT, FPS_RUNTIME_SCENE_ID, } from './tokens.js';
|
|
@@ -135,6 +136,10 @@ export function createFpsRuntime(options) {
|
|
|
135
136
|
initialServices: [
|
|
136
137
|
{ token: FPS_RUNTIME_PROJECT, value: project },
|
|
137
138
|
{ token: FPS_RUNTIME_DATA, value: runtimeData },
|
|
139
|
+
{
|
|
140
|
+
token: FPS_ASSET_CATALOG_SOURCE,
|
|
141
|
+
value: Object.freeze({ catalog: options.assetCatalog }),
|
|
142
|
+
},
|
|
138
143
|
],
|
|
139
144
|
loadEntry: async (manifest) => pluginById.get(manifest.id)?.runtime ?? null,
|
|
140
145
|
});
|