@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +44 -44
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1721 -367
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +1 -1
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +1 -1
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -2
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +1 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +6 -6
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +23 -23
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -5,13 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import {} from '@fps-games/editor-core';
|
|
7
7
|
import { createEditorSceneReadonlyInspectorProperty, } from '../inspector/readonly.js';
|
|
8
|
-
import { findEditorSceneMaterialAsset, hasEditorSceneMaterialAsset, } from './binding.js';
|
|
8
|
+
import { default as materialBindingInternals, findEditorSceneMaterialAsset, hasEditorSceneMaterialAsset, } from './binding.js';
|
|
9
9
|
import { DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_ID, DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_ID, } from './default-assets.js';
|
|
10
|
-
import { createEditorSceneMaterialAssetFieldInspectorPropertyInput as createPlayableEditorSceneMaterialAssetFieldInspectorPropertyInput,
|
|
10
|
+
import { createEditorSceneMaterialAssetFieldInspectorPropertyInput as createPlayableEditorSceneMaterialAssetFieldInspectorPropertyInput, createEditorSceneTexturePickerControlOptions as createPlayableEditorSceneTexturePickerControlOptions, findEditorSceneInspectorTextureAsset as findPlayableEditorSceneInspectorTextureAsset, getEditorSceneMaterialAssetDisplayName as getPlayableEditorSceneMaterialAssetDisplayName, } from './inspector.js';
|
|
11
11
|
import { EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX, normalizeEditorSceneMaterialAssetValue, parseEditorSceneDuplicateMaterialAssetValue, validateEditorSceneMaterialAssetFieldValue, } from './paths.js';
|
|
12
12
|
import { isReadonlyEditorSceneMaterialAsset, resolveEditorSceneMaterialAssetKind, } from './profile.js';
|
|
13
13
|
import {} from './types.js';
|
|
14
14
|
import { createMaterialAlphaModeOptions, createMaterialLightingModelOptions, } from './text.js';
|
|
15
|
+
// Inspector assembly evaluates many asset fields against one immutable document.
|
|
16
|
+
// Standalone public picker helpers intentionally remain fresh by default.
|
|
17
|
+
const NULL_MATERIAL_ASSET_CACHE_KEY = {};
|
|
18
|
+
const cachedMaterialPickerControlOptions = new WeakMap();
|
|
15
19
|
export function createMaterialAssetSelectorInspectorProperty(document, nodeKind, input) {
|
|
16
20
|
const currentAsset = input.currentAsset ?? findEditorSceneMaterialAsset(document, input.value);
|
|
17
21
|
return {
|
|
@@ -47,7 +51,7 @@ export function createMaterialAssetSelectorInspectorProperty(document, nodeKind,
|
|
|
47
51
|
}
|
|
48
52
|
export function createMaterialAssetPickerControlOptions(document, currentAsset, text, currentValue) {
|
|
49
53
|
return {
|
|
50
|
-
...
|
|
54
|
+
...materialBindingInternals.createPickerControlOptions({
|
|
51
55
|
materialAssets: document.scene.materialAssets ?? [],
|
|
52
56
|
currentAsset,
|
|
53
57
|
currentValue,
|
|
@@ -55,7 +59,7 @@ export function createMaterialAssetPickerControlOptions(document, currentAsset,
|
|
|
55
59
|
displayText: createEditorSceneMaterialDisplayText(text),
|
|
56
60
|
document,
|
|
57
61
|
ownershipText: createEditorSceneMaterialOwnershipText(text),
|
|
58
|
-
}),
|
|
62
|
+
}, materialBindingInternals.createUsageIndex(document)),
|
|
59
63
|
actionDisabledReason: text.batchReplaceUnsupported,
|
|
60
64
|
};
|
|
61
65
|
}
|
|
@@ -328,4 +332,86 @@ function createMaterialAssetFieldInspectorProperty(document, materialAsset, fiel
|
|
|
328
332
|
coerce: (inputValue) => normalizeEditorSceneMaterialAssetValue(fieldPath, inputValue),
|
|
329
333
|
};
|
|
330
334
|
}
|
|
335
|
+
function createMaterialAssetSelectorInspectorPropertyWithUsage(document, nodeKind, input, usageIndex) {
|
|
336
|
+
const currentAsset = input.currentAsset ?? findEditorSceneMaterialAsset(document, input.value);
|
|
337
|
+
return {
|
|
338
|
+
path: input.path,
|
|
339
|
+
label: input.label,
|
|
340
|
+
valueType: 'string',
|
|
341
|
+
control: 'custom',
|
|
342
|
+
customControl: 'asset-picker-card',
|
|
343
|
+
value: input.value,
|
|
344
|
+
readOnly: false,
|
|
345
|
+
persistence: 'document',
|
|
346
|
+
commitMode: 'change',
|
|
347
|
+
order: input.order,
|
|
348
|
+
controlOptions: createMaterialAssetPickerControlOptionsWithUsage(document, currentAsset, input.text, input.value, usageIndex),
|
|
349
|
+
tooltip: input.text.tooltips.materialAsset,
|
|
350
|
+
tags: ['ArtistMaterial', 'MaterialAsset'],
|
|
351
|
+
document,
|
|
352
|
+
validate: value => {
|
|
353
|
+
const duplicateMaterialAssetId = parseEditorSceneDuplicateMaterialAssetValue(value);
|
|
354
|
+
if (duplicateMaterialAssetId && hasEditorSceneMaterialAsset(document, duplicateMaterialAssetId)) {
|
|
355
|
+
return { ok: true, value };
|
|
356
|
+
}
|
|
357
|
+
if (value == null || value === '')
|
|
358
|
+
return { ok: true, value };
|
|
359
|
+
if (typeof value === 'string' && hasEditorSceneMaterialAsset(document, value)) {
|
|
360
|
+
return { ok: true, value };
|
|
361
|
+
}
|
|
362
|
+
return { ok: false, message: `Material asset not found: ${String(value)}` };
|
|
363
|
+
},
|
|
364
|
+
coerce: value => (typeof value === 'string' ? value.trim() : value),
|
|
365
|
+
effect: nodeKind === 'group' ? 'unsupported' : undefined,
|
|
366
|
+
disabledReason: nodeKind === 'group' ? 'Groups do not own materials.' : undefined,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
function createMaterialAssetSelectorInspectorPropertyWithCachedUsage(document, nodeKind, input) {
|
|
370
|
+
return createMaterialAssetSelectorInspectorPropertyWithUsage(document, nodeKind, input, materialBindingInternals.getCachedUsageIndex(document));
|
|
371
|
+
}
|
|
372
|
+
function createMaterialAssetPickerControlOptionsWithUsage(document, currentAsset, text, currentValue, usageIndex) {
|
|
373
|
+
return {
|
|
374
|
+
...materialBindingInternals.createPickerControlOptions({
|
|
375
|
+
materialAssets: document.scene.materialAssets ?? [],
|
|
376
|
+
currentAsset,
|
|
377
|
+
currentValue,
|
|
378
|
+
pickerText: createEditorSceneMaterialPickerText(text),
|
|
379
|
+
displayText: createEditorSceneMaterialDisplayText(text),
|
|
380
|
+
document,
|
|
381
|
+
ownershipText: createEditorSceneMaterialOwnershipText(text),
|
|
382
|
+
}, usageIndex),
|
|
383
|
+
actionDisabledReason: text.batchReplaceUnsupported,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
function createMaterialAssetPickerControlOptionsWithCachedUsage(document, currentAsset, text, currentValue) {
|
|
387
|
+
let byText = cachedMaterialPickerControlOptions.get(document);
|
|
388
|
+
if (!byText) {
|
|
389
|
+
byText = new WeakMap();
|
|
390
|
+
cachedMaterialPickerControlOptions.set(document, byText);
|
|
391
|
+
}
|
|
392
|
+
let byAsset = byText.get(text);
|
|
393
|
+
if (!byAsset) {
|
|
394
|
+
byAsset = new WeakMap();
|
|
395
|
+
byText.set(text, byAsset);
|
|
396
|
+
}
|
|
397
|
+
const assetKey = currentAsset ?? NULL_MATERIAL_ASSET_CACHE_KEY;
|
|
398
|
+
let byValue = byAsset.get(assetKey);
|
|
399
|
+
if (!byValue) {
|
|
400
|
+
byValue = new Map();
|
|
401
|
+
byAsset.set(assetKey, byValue);
|
|
402
|
+
}
|
|
403
|
+
const cached = byValue.get(currentValue);
|
|
404
|
+
if (cached)
|
|
405
|
+
return cached;
|
|
406
|
+
const options = createMaterialAssetPickerControlOptionsWithUsage(document, currentAsset, text, currentValue, materialBindingInternals.getCachedUsageIndex(document));
|
|
407
|
+
byValue.set(currentValue, options);
|
|
408
|
+
return options;
|
|
409
|
+
}
|
|
410
|
+
const materialAssetFieldInternals = {
|
|
411
|
+
createSelectorInspectorPropertyWithUsage: createMaterialAssetSelectorInspectorPropertyWithUsage,
|
|
412
|
+
createSelectorInspectorPropertyWithCachedUsage: createMaterialAssetSelectorInspectorPropertyWithCachedUsage,
|
|
413
|
+
createPickerControlOptionsWithUsage: createMaterialAssetPickerControlOptionsWithUsage,
|
|
414
|
+
createPickerControlOptionsWithCachedUsage: createMaterialAssetPickerControlOptionsWithCachedUsage,
|
|
415
|
+
};
|
|
416
|
+
export default materialAssetFieldInternals;
|
|
331
417
|
//# sourceMappingURL=asset-fields.js.map
|
package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-fields.js","sourceRoot":"","sources":["../../src/material-binding/asset-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAEN,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EACL,0CAA0C,GAC3C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,0CAA0C,EAC1C,+CAA+C,GAChD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,yDAAyD,IAAI,iEAAiE,EAC9H,6CAA6C,IAAI,qDAAqD,EACtG,4CAA4C,IAAI,oDAAoD,EACpG,oCAAoC,IAAI,4CAA4C,EACpF,sCAAsC,IAAI,8CAA8C,GACzF,MAAM,aAAa,CAAC;AAC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,0CAA0C,CAAC,SAAS,EAAE,eAAe,CAAC;gBAC3E,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE;gBACtC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,iCAAiC,SAAS,GAAG,EAAE,CAAC;QAC5E,CAAC;QACD,MAAM,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,sCAAsC,CAAC,SAAS,EAAE,UAAU,CAAC;KACtF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * SDK ownership: playable material inspector asset fields\n * Reviewed: 2026-07-06\n * Purpose: playable material Inspector fields, copy, slots, and material asset section assembly.\n */\nimport {\n type InspectorProperty,\n} from '@fps-games/editor-core';\n\nimport type {\n EditorSceneNodeKind,\n} from '../document/index';\nimport {\n createEditorSceneReadonlyInspectorProperty,\n} from '../inspector/readonly';\nimport {\n findEditorSceneMaterialAsset,\n hasEditorSceneMaterialAsset,\n} from './binding';\nimport {\n DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_ID,\n DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_ID,\n} from './default-assets';\nimport {\n createEditorSceneMaterialAssetFieldInspectorPropertyInput as createPlayableEditorSceneMaterialAssetFieldInspectorPropertyInput,\n createEditorSceneMaterialPickerControlOptions as createPlayableEditorSceneMaterialPickerControlOptions,\n createEditorSceneTexturePickerControlOptions as createPlayableEditorSceneTexturePickerControlOptions,\n findEditorSceneInspectorTextureAsset as findPlayableEditorSceneInspectorTextureAsset,\n getEditorSceneMaterialAssetDisplayName as getPlayableEditorSceneMaterialAssetDisplayName,\n} from './inspector';\nimport {\n EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX,\n normalizeEditorSceneMaterialAssetValue,\n parseEditorSceneDuplicateMaterialAssetValue,\n validateEditorSceneMaterialAssetFieldValue,\n} from './paths';\nimport {\n isReadonlyEditorSceneMaterialAsset,\n resolveEditorSceneMaterialAssetKind,\n} from './profile';\nimport {\n type EditorSceneInspectorTextureAsset,\n type EditorSceneMaterialAsset,\n type EditorSceneMaterialDocument,\n type EditorSceneMaterialInspectorContext,\n} from './types';\nimport {\n createMaterialAlphaModeOptions,\n createMaterialLightingModelOptions,\n type ArtistMaterialInspectorText,\n} from './text';\n\ntype EditorSceneDocument = EditorSceneMaterialDocument;\n\nexport function createMaterialAssetSelectorInspectorProperty(\n document: EditorSceneDocument,\n nodeKind: EditorSceneNodeKind,\n input: {\n path: string;\n label: string;\n value: string;\n order: number;\n text: ArtistMaterialInspectorText;\n currentAsset?: EditorSceneMaterialAsset | null;\n },\n): InspectorProperty<EditorSceneDocument> {\n const currentAsset = input.currentAsset ?? findEditorSceneMaterialAsset(document, input.value);\n return {\n path: input.path,\n label: input.label,\n valueType: 'string',\n control: 'custom',\n customControl: 'asset-picker-card',\n value: input.value,\n readOnly: false,\n persistence: 'document',\n commitMode: 'change',\n order: input.order,\n controlOptions: createMaterialAssetPickerControlOptions(document, currentAsset, input.text, input.value),\n tooltip: input.text.tooltips.materialAsset,\n tags: ['ArtistMaterial', 'MaterialAsset'],\n document,\n validate: (value) => {\n const duplicateMaterialAssetId = parseEditorSceneDuplicateMaterialAssetValue(value);\n if (duplicateMaterialAssetId && hasEditorSceneMaterialAsset(document, duplicateMaterialAssetId)) {\n return { ok: true, value };\n }\n if (value == null || value === '') return { ok: true, value };\n if (typeof value === 'string' && hasEditorSceneMaterialAsset(document, value)) return { ok: true, value };\n return { ok: false, message: `Material asset not found: ${String(value)}` };\n },\n coerce: (value) => (typeof value === 'string' ? value.trim() : value),\n effect: nodeKind === 'group' ? 'unsupported' : undefined,\n disabledReason: nodeKind === 'group' ? 'Groups do not own materials.' : undefined,\n };\n}\n\n\n\nexport function createMaterialAssetPickerControlOptions(\n document: EditorSceneDocument,\n currentAsset: EditorSceneMaterialAsset | null,\n text: ArtistMaterialInspectorText,\n currentValue: string,\n): Record<string, unknown> {\n return {\n ...createPlayableEditorSceneMaterialPickerControlOptions({\n materialAssets: document.scene.materialAssets ?? [],\n currentAsset,\n currentValue,\n pickerText: createEditorSceneMaterialPickerText(text),\n displayText: createEditorSceneMaterialDisplayText(text),\n document,\n ownershipText: createEditorSceneMaterialOwnershipText(text),\n }),\n actionDisabledReason: text.batchReplaceUnsupported,\n };\n}\n\nfunction createReadonlyInspectorProperty(\n path: string,\n label: string,\n value: unknown,\n order: number,\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return createEditorSceneReadonlyInspectorProperty<EditorSceneDocument>({\n path,\n label,\n value,\n order,\n persistence: 'readonly',\n source: 'Document',\n tooltip,\n })!;\n}\n\n\n\nfunction getEditorSceneMaterialAssetDisplayName(\n materialAsset: EditorSceneMaterialAsset,\n text: ArtistMaterialInspectorText,\n): string {\n return getPlayableEditorSceneMaterialAssetDisplayName(\n materialAsset,\n createEditorSceneMaterialDisplayText(text),\n );\n}\n\n\n\nfunction createEditorSceneMaterialPickerText(text: ArtistMaterialInspectorText) {\n return {\n materialPickerTitle: text.materialPickerTitle,\n replace: text.replace,\n duplicateForObject: text.duplicateForObject,\n duplicateForObjectTooltip: text.tooltips.duplicateForObject,\n summaryMissingAsset: text.summaryMissingAsset,\n summaryInherit: text.summaryInherit,\n inheritNone: text.inheritNone,\n };\n}\n\n\n\nfunction createEditorSceneMaterialOwnershipText(text: ArtistMaterialInspectorText) {\n return {\n formatUsageCount: text.formatUsageCount,\n formatEditImpact: text.formatMaterialEditImpact,\n formatDuplicateImpact: text.formatDuplicateMaterialImpact,\n };\n}\n\n\n\nfunction createEditorSceneMaterialDisplayText(text: ArtistMaterialInspectorText) {\n return {\n defaultMaterial: text.defaultMaterial,\n defaultStandardMaterial: text.defaultStandardMaterial,\n defaultMaterialMeta: text.defaultMaterialMeta,\n defaultStandardMaterialMeta: text.defaultStandardMaterialMeta,\n formatMaterialMeta: (materialAssetId: string) => `Material - ${materialAssetId}`,\n };\n}\n\n\n\nexport function createArtistMaterialAssetInspectorProperties(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset | null,\n text: ArtistMaterialInspectorText,\n orderOffset: number,\n context: EditorSceneMaterialInspectorContext = {},\n): InspectorProperty<EditorSceneDocument>[] {\n if (!materialAsset) {\n return [];\n }\n const materialKind = resolveEditorSceneMaterialAssetKind(materialAsset);\n const identityProperties = createReadonlyArtistMaterialAssetIdentityProperties(materialAsset, text, orderOffset);\n if (isEditorSceneMaterialAssetReadonlyForAssetFields(materialAsset, context)) {\n return [\n ...identityProperties,\n createEditorSceneReadonlyInspectorProperty({\n path: `scene.materialAssets.${materialAsset.id}.profile`,\n label: text.assetProfile,\n value: text.defaultMaterialReadOnly,\n order: orderOffset + 2,\n source: 'Document',\n effect: 'default',\n disabledReason: text.defaultMaterialReadOnly,\n tags: ['ArtistMaterial', 'MaterialAsset'],\n tooltip: text.tooltips.assetProfile,\n })!,\n ];\n }\n const profile = materialAsset.profile ?? {};\n const properties: InspectorProperty<EditorSceneDocument>[] = [\n ...identityProperties,\n createMaterialAssetEnumInspectorProperty(document, materialAsset, 'profile.lightingModel', text.assetLightingModel, profile.lightingModel ?? 'lit', orderOffset + 1, createMaterialLightingModelOptions(text), text.tooltips.lightingModel),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.baseColor.texture.textureAssetId`,\n label: text.assetBaseTexture,\n value: readArtistMaterialTexturePickerValue(profile.baseColor?.texture),\n order: orderOffset + 2,\n text,\n context,\n tooltip: text.tooltips.baseTexture,\n }),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.brightness', text.assetBrightness, profile.baseColor?.brightness ?? 1, orderOffset + 3, 0, 2, 0.05, text.tooltips.brightness),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.saturation', text.assetSaturation, profile.baseColor?.saturation ?? 1, orderOffset + 4, 0, 2, 0.05, text.tooltips.saturation),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.contrast', text.assetContrast, profile.baseColor?.contrast ?? 1, orderOffset + 5, 0, 2, 0.05, text.tooltips.contrast),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.hue', text.assetHue, profile.baseColor?.hue ?? 0, orderOffset + 6, -180, 180, 1, text.tooltips.hue),\n createMaterialAssetFieldInspectorProperty(document, materialAsset, 'profile.baseColor.color', text.assetBaseColor, profile.baseColor?.color ?? { r: 1, g: 1, b: 1 }, orderOffset + 7, 'color', 'color', 'immediate', text.tooltips.baseColor),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.normal.texture.textureAssetId`,\n label: text.assetNormalTexture,\n value: readArtistMaterialTexturePickerValue(profile.normal?.texture),\n order: orderOffset + 8,\n text,\n context,\n tooltip: text.tooltips.normalTexture,\n }),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.normal.strength', text.assetNormalStrength, profile.normal?.strength ?? 1, orderOffset + 9, 0, 4, 0.05, text.tooltips.normalStrength),\n ];\n if (materialKind === 'pbr') {\n properties.push(\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.metallic', text.assetMetallic, profile.metallic ?? 0, orderOffset + 10, 0, 1, 0.05, text.tooltips.metallic),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.roughness', text.assetRoughness, profile.roughness ?? 1, orderOffset + 11, 0, 1, 0.05, text.tooltips.roughness),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.metallicRoughness.texture.textureAssetId`,\n label: text.assetMetallicRoughnessTexture,\n value: readArtistMaterialTexturePickerValue(profile.metallicRoughness?.texture),\n order: orderOffset + 12,\n text,\n context,\n tooltip: text.tooltips.metallicRoughnessTexture,\n }),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.occlusion.texture.textureAssetId`,\n label: text.assetOcclusionTexture,\n value: readArtistMaterialTexturePickerValue(profile.occlusion?.texture),\n order: orderOffset + 13,\n text,\n context,\n tooltip: text.tooltips.occlusionTexture,\n }),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.occlusion.strength', text.assetOcclusionStrength, profile.occlusion?.strength ?? 1, orderOffset + 14, 0, 4, 0.05, text.tooltips.occlusionStrength),\n );\n }\n properties.push(\n createMaterialAssetFieldInspectorProperty(document, materialAsset, 'profile.emission.color', text.assetEmissionColor, profile.emission?.color ?? { r: 0, g: 0, b: 0 }, orderOffset + 20, 'color', 'color', 'immediate', text.tooltips.emissionColor),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.emission.intensity', text.assetEmissionIntensity, profile.emission?.intensity ?? 0, orderOffset + 21, 0, undefined, 0.05, text.tooltips.emissionIntensity),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.emission.texture.textureAssetId`,\n label: text.assetEmissionTexture,\n value: readArtistMaterialTexturePickerValue(profile.emission?.texture),\n order: orderOffset + 22,\n text,\n context,\n tooltip: text.tooltips.emissionTexture,\n }),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.emission.maskTexture.textureAssetId`,\n label: text.assetEmissionMaskUrl,\n value: readArtistMaterialTexturePickerValue(profile.emission?.maskTexture),\n order: orderOffset + 23,\n text,\n context,\n tooltip: text.tooltips.emissionMaskUrl,\n }),\n createMaterialAssetEnumInspectorProperty(document, materialAsset, 'profile.alpha.mode', text.assetAlphaMode, profile.alpha?.mode ?? 'opaque', orderOffset + 30, createMaterialAlphaModeOptions(text), text.tooltips.alphaMode),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.alpha.opacity', text.assetAlphaOpacity, profile.alpha?.opacity ?? 1, orderOffset + 31, 0, 1, 0.05, text.tooltips.alphaOpacity),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.alpha.cutoff', text.assetAlphaCutoff, profile.alpha?.cutoff ?? 0.5, orderOffset + 32, 0, 1, 0.01, text.tooltips.alphaCutoff),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.alpha.texture.textureAssetId`,\n label: text.assetAlphaTexture,\n value: readArtistMaterialTexturePickerValue(profile.alpha?.texture),\n order: orderOffset + 33,\n text,\n context,\n tooltip: text.tooltips.alphaTexture,\n }),\n );\n return properties;\n}\n\nfunction readEditorSceneDefaultMaterialAssetIds(context: EditorSceneMaterialInspectorContext): readonly string[] {\n return context.defaultMaterialAssetIds ?? [\n DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_ID,\n DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_ID,\n ];\n}\n\nfunction isEditorSceneMaterialAssetReadonlyForAssetFields(\n materialAsset: EditorSceneMaterialAsset,\n context: EditorSceneMaterialInspectorContext,\n): boolean {\n return isReadonlyEditorSceneMaterialAsset(materialAsset, readEditorSceneDefaultMaterialAssetIds(context))\n || materialAsset.system?.preset === 'default-pbr'\n || materialAsset.system?.preset === 'default-standard';\n}\n\n\n\nfunction createReadonlyArtistMaterialAssetIdentityProperties(\n materialAsset: EditorSceneMaterialAsset,\n text: ArtistMaterialInspectorText,\n orderOffset: number,\n): InspectorProperty<EditorSceneDocument>[] {\n return [\n createReadonlyInspectorProperty(\n `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.name`,\n text.assetName,\n getEditorSceneMaterialAssetDisplayName(materialAsset, text),\n orderOffset,\n text.tooltips.assetName,\n ),\n createReadonlyInspectorProperty(\n `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.materialKind`,\n text.assetKind,\n getEditorSceneMaterialKindLabel(resolveEditorSceneMaterialAssetKind(materialAsset), text),\n orderOffset + 1,\n text.tooltips.assetKind,\n ),\n ];\n}\n\n\n\n\nfunction getEditorSceneMaterialKindLabel(\n materialKind: 'pbr' | 'standard',\n text: ArtistMaterialInspectorText,\n): string {\n return materialKind === 'standard' ? text.assetKindStandard : text.assetKindPbr;\n}\n\n\n\n\nfunction createMaterialTexturePickerInspectorProperty(input: {\n path: string;\n label: string;\n value: string;\n order: number;\n text: ArtistMaterialInspectorText;\n context: EditorSceneMaterialInspectorContext;\n tooltip?: string;\n}): InspectorProperty<EditorSceneDocument> {\n const currentTexture = findEditorSceneInspectorTextureAssetFromContext(input.context, input.value);\n return {\n path: input.path,\n label: input.label,\n valueType: 'string',\n control: 'custom',\n customControl: 'asset-picker-card',\n value: input.value,\n readOnly: false,\n persistence: 'document',\n commitMode: 'change',\n order: input.order,\n tooltip: input.tooltip,\n tags: ['ArtistMaterial', 'TextureAsset'],\n controlOptions: createTexturePickerControlOptions(input.context, input.text, input.value, currentTexture),\n validate: (value) => {\n const normalized = normalizeMaterialTexturePickerPropertyValue(input.context, input.path, value);\n return normalized.ok\n ? { ok: true, value: normalized.value }\n : { ok: false, message: 'Invalid texture selection.' };\n },\n coerce: (value) => {\n const normalized = normalizeMaterialTexturePickerPropertyValue(input.context, input.path, value);\n return normalized.ok ? normalized.value : null;\n },\n };\n}\n\n\n\nexport function createTexturePickerControlOptions(\n context: EditorSceneMaterialInspectorContext,\n text: ArtistMaterialInspectorText,\n currentValue: string,\n currentTexture: EditorSceneInspectorTextureAsset | null,\n): Record<string, unknown> {\n return {\n ...createPlayableEditorSceneTexturePickerControlOptions({\n textureAssets: context.textureAssets,\n currentTexture,\n currentValue,\n pickerText: createEditorSceneTexturePickerText(text),\n candidateValue: 'assetId',\n }),\n };\n}\n\n\n\nexport function findEditorSceneInspectorTextureAssetFromContext(\n context: EditorSceneMaterialInspectorContext,\n value: string,\n): EditorSceneInspectorTextureAsset | null {\n return findPlayableEditorSceneInspectorTextureAsset(context.textureAssets, value) as EditorSceneInspectorTextureAsset | null;\n}\n\n\n\nexport function readArtistMaterialTexturePickerValue(\n texture: { textureAssetId?: string | null; url?: string | null } | null | undefined,\n): string {\n const textureAssetId = typeof texture?.textureAssetId === 'string' ? texture.textureAssetId.trim() : '';\n if (textureAssetId) return textureAssetId;\n const textureUrl = typeof texture?.url === 'string' ? texture.url.trim() : '';\n return textureUrl;\n}\n\n\n\nfunction normalizeMaterialTexturePickerPropertyValue(\n context: EditorSceneMaterialInspectorContext,\n path: string,\n value: unknown,\n): { ok: true; value: string | null } | { ok: false } {\n if (value == null || value === '') return { ok: true, value: null };\n if (typeof value !== 'string') return { ok: false };\n const trimmed = value.trim();\n if (!trimmed) return { ok: true, value: null };\n if (!path.endsWith('.textureAssetId')) return { ok: true, value: trimmed };\n const textureAsset = findPlayableEditorSceneInspectorTextureAsset(context.textureAssets, trimmed);\n if (textureAsset) return { ok: true, value: textureAsset.id };\n return /^[A-Za-z0-9_-]+$/.test(trimmed) ? { ok: true, value: trimmed } : { ok: true, value: null };\n}\n\n\n\nfunction createEditorSceneTexturePickerText(text: ArtistMaterialInspectorText) {\n return {\n texturePickerTitle: text.texturePickerTitle,\n replace: text.replace,\n inheritNone: text.inheritNone,\n summaryInherit: text.summaryInherit,\n };\n}\n\n\n\nfunction createMaterialAssetNumberInspectorProperty(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset,\n path: string,\n label: string,\n value: number,\n order: number,\n min?: number,\n max?: number,\n step = 0.05,\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return {\n ...createMaterialAssetFieldInspectorProperty(document, materialAsset, path, label, value, order, 'number', 'number', 'live', tooltip),\n min,\n max,\n step,\n };\n}\n\n\n\nfunction createMaterialAssetEnumInspectorProperty(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset,\n path: string,\n label: string,\n value: string,\n order: number,\n options: InspectorProperty<EditorSceneDocument>['options'],\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return {\n ...createMaterialAssetFieldInspectorProperty(document, materialAsset, path, label, value, order, 'enum', 'enum', 'immediate', tooltip),\n options,\n controlOptions: { variant: 'segmented' },\n };\n}\n\n\n\nfunction createMaterialAssetFieldInspectorProperty(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset,\n fieldPath: string,\n label: string,\n value: unknown,\n order: number,\n valueType: InspectorProperty<EditorSceneDocument>['valueType'],\n control: InspectorProperty<EditorSceneDocument>['control'],\n commitMode: InspectorProperty<EditorSceneDocument>['commitMode'],\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return {\n ...createPlayableEditorSceneMaterialAssetFieldInspectorPropertyInput({\n document,\n materialAsset,\n fieldPath,\n label,\n value,\n order,\n valueType,\n control,\n commitMode,\n tooltip,\n pathPrefix: EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX,\n }),\n validate: (inputValue) => {\n const normalizedValue = normalizeEditorSceneMaterialAssetValue(fieldPath, inputValue);\n return validateEditorSceneMaterialAssetFieldValue(fieldPath, normalizedValue)\n ? { ok: true, value: normalizedValue }\n : { ok: false, message: `Invalid material asset field: ${fieldPath}.` };\n },\n coerce: (inputValue) => normalizeEditorSceneMaterialAssetValue(fieldPath, inputValue),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"asset-fields.js","sourceRoot":"","sources":["../../src/material-binding/asset-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAEN,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EACL,0CAA0C,GAC3C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,OAAO,IAAI,wBAAwB,EACnC,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,0CAA0C,EAC1C,+CAA+C,GAChD,MAAM,kBAAkB,CAAC;AAC1B,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AAO,EAAE,CAAC;QACb,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,OAAO,GAAG,gDAAgD,CAC9D,QAAQ,EACR,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,wBAAwB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CACvD,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,2BAA2B,GAAG;IAClC,wCAAwC,EACtC,qDAAqD;IACvD,8CAA8C,EAC5C,2DAA2D;IAC7D,mCAAmC,EACjC,gDAAgD;IAClD,yCAAyC,EACvC,sDAAsD;CACzD,CAAC;AAEF,eAAe,2BAA2B,CAAC","sourcesContent":["/**\n * SDK ownership: playable material inspector asset fields\n * Reviewed: 2026-07-06\n * Purpose: playable material Inspector fields, copy, slots, and material asset section assembly.\n */\nimport {\n type InspectorProperty,\n} from '@fps-games/editor-core';\n\nimport type {\n EditorSceneNodeKind,\n} from '../document/index';\nimport {\n createEditorSceneReadonlyInspectorProperty,\n} from '../inspector/readonly';\nimport {\n default as materialBindingInternals,\n findEditorSceneMaterialAsset,\n hasEditorSceneMaterialAsset,\n} from './binding';\nimport {\n DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_ID,\n DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_ID,\n} from './default-assets';\nimport {\n createEditorSceneMaterialAssetFieldInspectorPropertyInput as createPlayableEditorSceneMaterialAssetFieldInspectorPropertyInput,\n createEditorSceneTexturePickerControlOptions as createPlayableEditorSceneTexturePickerControlOptions,\n findEditorSceneInspectorTextureAsset as findPlayableEditorSceneInspectorTextureAsset,\n getEditorSceneMaterialAssetDisplayName as getPlayableEditorSceneMaterialAssetDisplayName,\n} from './inspector';\nimport {\n EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX,\n normalizeEditorSceneMaterialAssetValue,\n parseEditorSceneDuplicateMaterialAssetValue,\n validateEditorSceneMaterialAssetFieldValue,\n} from './paths';\nimport {\n isReadonlyEditorSceneMaterialAsset,\n resolveEditorSceneMaterialAssetKind,\n} from './profile';\nimport {\n type EditorSceneInspectorTextureAsset,\n type EditorSceneMaterialAsset,\n type EditorSceneMaterialDocument,\n type EditorSceneMaterialInspectorContext,\n} from './types';\nimport {\n createMaterialAlphaModeOptions,\n createMaterialLightingModelOptions,\n type ArtistMaterialInspectorText,\n} from './text';\n\ntype EditorSceneDocument = EditorSceneMaterialDocument;\n\n// Inspector assembly evaluates many asset fields against one immutable document.\n// Standalone public picker helpers intentionally remain fresh by default.\n\nconst NULL_MATERIAL_ASSET_CACHE_KEY = {};\nconst cachedMaterialPickerControlOptions = new WeakMap<\n object,\n WeakMap<ArtistMaterialInspectorText, WeakMap<object, Map<string, Record<string, unknown>>>>\n>();\n\nexport function createMaterialAssetSelectorInspectorProperty(\n document: EditorSceneDocument,\n nodeKind: EditorSceneNodeKind,\n input: {\n path: string;\n label: string;\n value: string;\n order: number;\n text: ArtistMaterialInspectorText;\n currentAsset?: EditorSceneMaterialAsset | null;\n },\n): InspectorProperty<EditorSceneDocument> {\n const currentAsset = input.currentAsset ?? findEditorSceneMaterialAsset(document, input.value);\n return {\n path: input.path,\n label: input.label,\n valueType: 'string',\n control: 'custom',\n customControl: 'asset-picker-card',\n value: input.value,\n readOnly: false,\n persistence: 'document',\n commitMode: 'change',\n order: input.order,\n controlOptions: createMaterialAssetPickerControlOptions(document, currentAsset, input.text, input.value),\n tooltip: input.text.tooltips.materialAsset,\n tags: ['ArtistMaterial', 'MaterialAsset'],\n document,\n validate: (value) => {\n const duplicateMaterialAssetId = parseEditorSceneDuplicateMaterialAssetValue(value);\n if (duplicateMaterialAssetId && hasEditorSceneMaterialAsset(document, duplicateMaterialAssetId)) {\n return { ok: true, value };\n }\n if (value == null || value === '') return { ok: true, value };\n if (typeof value === 'string' && hasEditorSceneMaterialAsset(document, value)) return { ok: true, value };\n return { ok: false, message: `Material asset not found: ${String(value)}` };\n },\n coerce: (value) => (typeof value === 'string' ? value.trim() : value),\n effect: nodeKind === 'group' ? 'unsupported' : undefined,\n disabledReason: nodeKind === 'group' ? 'Groups do not own materials.' : undefined,\n };\n}\n\n\n\nexport function createMaterialAssetPickerControlOptions(\n document: EditorSceneDocument,\n currentAsset: EditorSceneMaterialAsset | null,\n text: ArtistMaterialInspectorText,\n currentValue: string,\n): Record<string, unknown> {\n return {\n ...materialBindingInternals.createPickerControlOptions({\n materialAssets: document.scene.materialAssets ?? [],\n currentAsset,\n currentValue,\n pickerText: createEditorSceneMaterialPickerText(text),\n displayText: createEditorSceneMaterialDisplayText(text),\n document,\n ownershipText: createEditorSceneMaterialOwnershipText(text),\n }, materialBindingInternals.createUsageIndex(document)),\n actionDisabledReason: text.batchReplaceUnsupported,\n };\n}\n\nfunction createReadonlyInspectorProperty(\n path: string,\n label: string,\n value: unknown,\n order: number,\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return createEditorSceneReadonlyInspectorProperty<EditorSceneDocument>({\n path,\n label,\n value,\n order,\n persistence: 'readonly',\n source: 'Document',\n tooltip,\n })!;\n}\n\n\n\nfunction getEditorSceneMaterialAssetDisplayName(\n materialAsset: EditorSceneMaterialAsset,\n text: ArtistMaterialInspectorText,\n): string {\n return getPlayableEditorSceneMaterialAssetDisplayName(\n materialAsset,\n createEditorSceneMaterialDisplayText(text),\n );\n}\n\n\n\nfunction createEditorSceneMaterialPickerText(text: ArtistMaterialInspectorText) {\n return {\n materialPickerTitle: text.materialPickerTitle,\n replace: text.replace,\n duplicateForObject: text.duplicateForObject,\n duplicateForObjectTooltip: text.tooltips.duplicateForObject,\n summaryMissingAsset: text.summaryMissingAsset,\n summaryInherit: text.summaryInherit,\n inheritNone: text.inheritNone,\n };\n}\n\n\n\nfunction createEditorSceneMaterialOwnershipText(text: ArtistMaterialInspectorText) {\n return {\n formatUsageCount: text.formatUsageCount,\n formatEditImpact: text.formatMaterialEditImpact,\n formatDuplicateImpact: text.formatDuplicateMaterialImpact,\n };\n}\n\n\n\nfunction createEditorSceneMaterialDisplayText(text: ArtistMaterialInspectorText) {\n return {\n defaultMaterial: text.defaultMaterial,\n defaultStandardMaterial: text.defaultStandardMaterial,\n defaultMaterialMeta: text.defaultMaterialMeta,\n defaultStandardMaterialMeta: text.defaultStandardMaterialMeta,\n formatMaterialMeta: (materialAssetId: string) => `Material - ${materialAssetId}`,\n };\n}\n\n\n\nexport function createArtistMaterialAssetInspectorProperties(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset | null,\n text: ArtistMaterialInspectorText,\n orderOffset: number,\n context: EditorSceneMaterialInspectorContext = {},\n): InspectorProperty<EditorSceneDocument>[] {\n if (!materialAsset) {\n return [];\n }\n const materialKind = resolveEditorSceneMaterialAssetKind(materialAsset);\n const identityProperties = createReadonlyArtistMaterialAssetIdentityProperties(materialAsset, text, orderOffset);\n if (isEditorSceneMaterialAssetReadonlyForAssetFields(materialAsset, context)) {\n return [\n ...identityProperties,\n createEditorSceneReadonlyInspectorProperty({\n path: `scene.materialAssets.${materialAsset.id}.profile`,\n label: text.assetProfile,\n value: text.defaultMaterialReadOnly,\n order: orderOffset + 2,\n source: 'Document',\n effect: 'default',\n disabledReason: text.defaultMaterialReadOnly,\n tags: ['ArtistMaterial', 'MaterialAsset'],\n tooltip: text.tooltips.assetProfile,\n })!,\n ];\n }\n const profile = materialAsset.profile ?? {};\n const properties: InspectorProperty<EditorSceneDocument>[] = [\n ...identityProperties,\n createMaterialAssetEnumInspectorProperty(document, materialAsset, 'profile.lightingModel', text.assetLightingModel, profile.lightingModel ?? 'lit', orderOffset + 1, createMaterialLightingModelOptions(text), text.tooltips.lightingModel),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.baseColor.texture.textureAssetId`,\n label: text.assetBaseTexture,\n value: readArtistMaterialTexturePickerValue(profile.baseColor?.texture),\n order: orderOffset + 2,\n text,\n context,\n tooltip: text.tooltips.baseTexture,\n }),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.brightness', text.assetBrightness, profile.baseColor?.brightness ?? 1, orderOffset + 3, 0, 2, 0.05, text.tooltips.brightness),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.saturation', text.assetSaturation, profile.baseColor?.saturation ?? 1, orderOffset + 4, 0, 2, 0.05, text.tooltips.saturation),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.contrast', text.assetContrast, profile.baseColor?.contrast ?? 1, orderOffset + 5, 0, 2, 0.05, text.tooltips.contrast),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.baseColor.hue', text.assetHue, profile.baseColor?.hue ?? 0, orderOffset + 6, -180, 180, 1, text.tooltips.hue),\n createMaterialAssetFieldInspectorProperty(document, materialAsset, 'profile.baseColor.color', text.assetBaseColor, profile.baseColor?.color ?? { r: 1, g: 1, b: 1 }, orderOffset + 7, 'color', 'color', 'immediate', text.tooltips.baseColor),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.normal.texture.textureAssetId`,\n label: text.assetNormalTexture,\n value: readArtistMaterialTexturePickerValue(profile.normal?.texture),\n order: orderOffset + 8,\n text,\n context,\n tooltip: text.tooltips.normalTexture,\n }),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.normal.strength', text.assetNormalStrength, profile.normal?.strength ?? 1, orderOffset + 9, 0, 4, 0.05, text.tooltips.normalStrength),\n ];\n if (materialKind === 'pbr') {\n properties.push(\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.metallic', text.assetMetallic, profile.metallic ?? 0, orderOffset + 10, 0, 1, 0.05, text.tooltips.metallic),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.roughness', text.assetRoughness, profile.roughness ?? 1, orderOffset + 11, 0, 1, 0.05, text.tooltips.roughness),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.metallicRoughness.texture.textureAssetId`,\n label: text.assetMetallicRoughnessTexture,\n value: readArtistMaterialTexturePickerValue(profile.metallicRoughness?.texture),\n order: orderOffset + 12,\n text,\n context,\n tooltip: text.tooltips.metallicRoughnessTexture,\n }),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.occlusion.texture.textureAssetId`,\n label: text.assetOcclusionTexture,\n value: readArtistMaterialTexturePickerValue(profile.occlusion?.texture),\n order: orderOffset + 13,\n text,\n context,\n tooltip: text.tooltips.occlusionTexture,\n }),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.occlusion.strength', text.assetOcclusionStrength, profile.occlusion?.strength ?? 1, orderOffset + 14, 0, 4, 0.05, text.tooltips.occlusionStrength),\n );\n }\n properties.push(\n createMaterialAssetFieldInspectorProperty(document, materialAsset, 'profile.emission.color', text.assetEmissionColor, profile.emission?.color ?? { r: 0, g: 0, b: 0 }, orderOffset + 20, 'color', 'color', 'immediate', text.tooltips.emissionColor),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.emission.intensity', text.assetEmissionIntensity, profile.emission?.intensity ?? 0, orderOffset + 21, 0, undefined, 0.05, text.tooltips.emissionIntensity),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.emission.texture.textureAssetId`,\n label: text.assetEmissionTexture,\n value: readArtistMaterialTexturePickerValue(profile.emission?.texture),\n order: orderOffset + 22,\n text,\n context,\n tooltip: text.tooltips.emissionTexture,\n }),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.emission.maskTexture.textureAssetId`,\n label: text.assetEmissionMaskUrl,\n value: readArtistMaterialTexturePickerValue(profile.emission?.maskTexture),\n order: orderOffset + 23,\n text,\n context,\n tooltip: text.tooltips.emissionMaskUrl,\n }),\n createMaterialAssetEnumInspectorProperty(document, materialAsset, 'profile.alpha.mode', text.assetAlphaMode, profile.alpha?.mode ?? 'opaque', orderOffset + 30, createMaterialAlphaModeOptions(text), text.tooltips.alphaMode),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.alpha.opacity', text.assetAlphaOpacity, profile.alpha?.opacity ?? 1, orderOffset + 31, 0, 1, 0.05, text.tooltips.alphaOpacity),\n createMaterialAssetNumberInspectorProperty(document, materialAsset, 'profile.alpha.cutoff', text.assetAlphaCutoff, profile.alpha?.cutoff ?? 0.5, orderOffset + 32, 0, 1, 0.01, text.tooltips.alphaCutoff),\n createMaterialTexturePickerInspectorProperty({\n path: `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.profile.alpha.texture.textureAssetId`,\n label: text.assetAlphaTexture,\n value: readArtistMaterialTexturePickerValue(profile.alpha?.texture),\n order: orderOffset + 33,\n text,\n context,\n tooltip: text.tooltips.alphaTexture,\n }),\n );\n return properties;\n}\n\nfunction readEditorSceneDefaultMaterialAssetIds(context: EditorSceneMaterialInspectorContext): readonly string[] {\n return context.defaultMaterialAssetIds ?? [\n DEFAULT_PBR_EDITOR_SCENE_MATERIAL_ASSET_ID,\n DEFAULT_STANDARD_EDITOR_SCENE_MATERIAL_ASSET_ID,\n ];\n}\n\nfunction isEditorSceneMaterialAssetReadonlyForAssetFields(\n materialAsset: EditorSceneMaterialAsset,\n context: EditorSceneMaterialInspectorContext,\n): boolean {\n return isReadonlyEditorSceneMaterialAsset(materialAsset, readEditorSceneDefaultMaterialAssetIds(context))\n || materialAsset.system?.preset === 'default-pbr'\n || materialAsset.system?.preset === 'default-standard';\n}\n\n\n\nfunction createReadonlyArtistMaterialAssetIdentityProperties(\n materialAsset: EditorSceneMaterialAsset,\n text: ArtistMaterialInspectorText,\n orderOffset: number,\n): InspectorProperty<EditorSceneDocument>[] {\n return [\n createReadonlyInspectorProperty(\n `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.name`,\n text.assetName,\n getEditorSceneMaterialAssetDisplayName(materialAsset, text),\n orderOffset,\n text.tooltips.assetName,\n ),\n createReadonlyInspectorProperty(\n `${EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX}${materialAsset.id}.materialKind`,\n text.assetKind,\n getEditorSceneMaterialKindLabel(resolveEditorSceneMaterialAssetKind(materialAsset), text),\n orderOffset + 1,\n text.tooltips.assetKind,\n ),\n ];\n}\n\n\n\n\nfunction getEditorSceneMaterialKindLabel(\n materialKind: 'pbr' | 'standard',\n text: ArtistMaterialInspectorText,\n): string {\n return materialKind === 'standard' ? text.assetKindStandard : text.assetKindPbr;\n}\n\n\n\n\nfunction createMaterialTexturePickerInspectorProperty(input: {\n path: string;\n label: string;\n value: string;\n order: number;\n text: ArtistMaterialInspectorText;\n context: EditorSceneMaterialInspectorContext;\n tooltip?: string;\n}): InspectorProperty<EditorSceneDocument> {\n const currentTexture = findEditorSceneInspectorTextureAssetFromContext(input.context, input.value);\n return {\n path: input.path,\n label: input.label,\n valueType: 'string',\n control: 'custom',\n customControl: 'asset-picker-card',\n value: input.value,\n readOnly: false,\n persistence: 'document',\n commitMode: 'change',\n order: input.order,\n tooltip: input.tooltip,\n tags: ['ArtistMaterial', 'TextureAsset'],\n controlOptions: createTexturePickerControlOptions(input.context, input.text, input.value, currentTexture),\n validate: (value) => {\n const normalized = normalizeMaterialTexturePickerPropertyValue(input.context, input.path, value);\n return normalized.ok\n ? { ok: true, value: normalized.value }\n : { ok: false, message: 'Invalid texture selection.' };\n },\n coerce: (value) => {\n const normalized = normalizeMaterialTexturePickerPropertyValue(input.context, input.path, value);\n return normalized.ok ? normalized.value : null;\n },\n };\n}\n\n\n\nexport function createTexturePickerControlOptions(\n context: EditorSceneMaterialInspectorContext,\n text: ArtistMaterialInspectorText,\n currentValue: string,\n currentTexture: EditorSceneInspectorTextureAsset | null,\n): Record<string, unknown> {\n return {\n ...createPlayableEditorSceneTexturePickerControlOptions({\n textureAssets: context.textureAssets,\n currentTexture,\n currentValue,\n pickerText: createEditorSceneTexturePickerText(text),\n candidateValue: 'assetId',\n }),\n };\n}\n\n\n\nexport function findEditorSceneInspectorTextureAssetFromContext(\n context: EditorSceneMaterialInspectorContext,\n value: string,\n): EditorSceneInspectorTextureAsset | null {\n return findPlayableEditorSceneInspectorTextureAsset(context.textureAssets, value) as EditorSceneInspectorTextureAsset | null;\n}\n\n\n\nexport function readArtistMaterialTexturePickerValue(\n texture: { textureAssetId?: string | null; url?: string | null } | null | undefined,\n): string {\n const textureAssetId = typeof texture?.textureAssetId === 'string' ? texture.textureAssetId.trim() : '';\n if (textureAssetId) return textureAssetId;\n const textureUrl = typeof texture?.url === 'string' ? texture.url.trim() : '';\n return textureUrl;\n}\n\n\n\nfunction normalizeMaterialTexturePickerPropertyValue(\n context: EditorSceneMaterialInspectorContext,\n path: string,\n value: unknown,\n): { ok: true; value: string | null } | { ok: false } {\n if (value == null || value === '') return { ok: true, value: null };\n if (typeof value !== 'string') return { ok: false };\n const trimmed = value.trim();\n if (!trimmed) return { ok: true, value: null };\n if (!path.endsWith('.textureAssetId')) return { ok: true, value: trimmed };\n const textureAsset = findPlayableEditorSceneInspectorTextureAsset(context.textureAssets, trimmed);\n if (textureAsset) return { ok: true, value: textureAsset.id };\n return /^[A-Za-z0-9_-]+$/.test(trimmed) ? { ok: true, value: trimmed } : { ok: true, value: null };\n}\n\n\n\nfunction createEditorSceneTexturePickerText(text: ArtistMaterialInspectorText) {\n return {\n texturePickerTitle: text.texturePickerTitle,\n replace: text.replace,\n inheritNone: text.inheritNone,\n summaryInherit: text.summaryInherit,\n };\n}\n\n\n\nfunction createMaterialAssetNumberInspectorProperty(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset,\n path: string,\n label: string,\n value: number,\n order: number,\n min?: number,\n max?: number,\n step = 0.05,\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return {\n ...createMaterialAssetFieldInspectorProperty(document, materialAsset, path, label, value, order, 'number', 'number', 'live', tooltip),\n min,\n max,\n step,\n };\n}\n\n\n\nfunction createMaterialAssetEnumInspectorProperty(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset,\n path: string,\n label: string,\n value: string,\n order: number,\n options: InspectorProperty<EditorSceneDocument>['options'],\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return {\n ...createMaterialAssetFieldInspectorProperty(document, materialAsset, path, label, value, order, 'enum', 'enum', 'immediate', tooltip),\n options,\n controlOptions: { variant: 'segmented' },\n };\n}\n\n\n\nfunction createMaterialAssetFieldInspectorProperty(\n document: EditorSceneDocument,\n materialAsset: EditorSceneMaterialAsset,\n fieldPath: string,\n label: string,\n value: unknown,\n order: number,\n valueType: InspectorProperty<EditorSceneDocument>['valueType'],\n control: InspectorProperty<EditorSceneDocument>['control'],\n commitMode: InspectorProperty<EditorSceneDocument>['commitMode'],\n tooltip?: string,\n): InspectorProperty<EditorSceneDocument> {\n return {\n ...createPlayableEditorSceneMaterialAssetFieldInspectorPropertyInput({\n document,\n materialAsset,\n fieldPath,\n label,\n value,\n order,\n valueType,\n control,\n commitMode,\n tooltip,\n pathPrefix: EDITOR_SCENE_MATERIAL_ASSET_FIELD_PATH_PREFIX,\n }),\n validate: (inputValue) => {\n const normalizedValue = normalizeEditorSceneMaterialAssetValue(fieldPath, inputValue);\n return validateEditorSceneMaterialAssetFieldValue(fieldPath, normalizedValue)\n ? { ok: true, value: normalizedValue }\n : { ok: false, message: `Invalid material asset field: ${fieldPath}.` };\n },\n coerce: (inputValue) => normalizeEditorSceneMaterialAssetValue(fieldPath, inputValue),\n };\n}\n\ntype MaterialUsageIndex = ReturnType<typeof materialBindingInternals.createUsageIndex>;\ntype MaterialAssetSelectorInspectorPropertyInput = {\n path: string;\n label: string;\n value: string;\n order: number;\n text: ArtistMaterialInspectorText;\n currentAsset?: EditorSceneMaterialAsset | null;\n};\n\nfunction createMaterialAssetSelectorInspectorPropertyWithUsage(\n document: EditorSceneDocument,\n nodeKind: EditorSceneNodeKind,\n input: MaterialAssetSelectorInspectorPropertyInput,\n usageIndex: MaterialUsageIndex,\n): InspectorProperty<EditorSceneDocument> {\n const currentAsset = input.currentAsset ?? findEditorSceneMaterialAsset(document, input.value);\n return {\n path: input.path,\n label: input.label,\n valueType: 'string',\n control: 'custom',\n customControl: 'asset-picker-card',\n value: input.value,\n readOnly: false,\n persistence: 'document',\n commitMode: 'change',\n order: input.order,\n controlOptions: createMaterialAssetPickerControlOptionsWithUsage(\n document,\n currentAsset,\n input.text,\n input.value,\n usageIndex,\n ),\n tooltip: input.text.tooltips.materialAsset,\n tags: ['ArtistMaterial', 'MaterialAsset'],\n document,\n validate: value => {\n const duplicateMaterialAssetId = parseEditorSceneDuplicateMaterialAssetValue(value);\n if (duplicateMaterialAssetId && hasEditorSceneMaterialAsset(document, duplicateMaterialAssetId)) {\n return { ok: true, value };\n }\n if (value == null || value === '') return { ok: true, value };\n if (typeof value === 'string' && hasEditorSceneMaterialAsset(document, value)) {\n return { ok: true, value };\n }\n return { ok: false, message: `Material asset not found: ${String(value)}` };\n },\n coerce: value => (typeof value === 'string' ? value.trim() : value),\n effect: nodeKind === 'group' ? 'unsupported' : undefined,\n disabledReason: nodeKind === 'group' ? 'Groups do not own materials.' : undefined,\n };\n}\n\nfunction createMaterialAssetSelectorInspectorPropertyWithCachedUsage(\n document: EditorSceneDocument,\n nodeKind: EditorSceneNodeKind,\n input: MaterialAssetSelectorInspectorPropertyInput,\n): InspectorProperty<EditorSceneDocument> {\n return createMaterialAssetSelectorInspectorPropertyWithUsage(\n document,\n nodeKind,\n input,\n materialBindingInternals.getCachedUsageIndex(document),\n );\n}\n\nfunction createMaterialAssetPickerControlOptionsWithUsage(\n document: EditorSceneDocument,\n currentAsset: EditorSceneMaterialAsset | null,\n text: ArtistMaterialInspectorText,\n currentValue: string,\n usageIndex: MaterialUsageIndex,\n): Record<string, unknown> {\n return {\n ...materialBindingInternals.createPickerControlOptions({\n materialAssets: document.scene.materialAssets ?? [],\n currentAsset,\n currentValue,\n pickerText: createEditorSceneMaterialPickerText(text),\n displayText: createEditorSceneMaterialDisplayText(text),\n document,\n ownershipText: createEditorSceneMaterialOwnershipText(text),\n }, usageIndex),\n actionDisabledReason: text.batchReplaceUnsupported,\n };\n}\n\nfunction createMaterialAssetPickerControlOptionsWithCachedUsage(\n document: EditorSceneDocument,\n currentAsset: EditorSceneMaterialAsset | null,\n text: ArtistMaterialInspectorText,\n currentValue: string,\n): Record<string, unknown> {\n let byText = cachedMaterialPickerControlOptions.get(document as object);\n if (!byText) {\n byText = new WeakMap();\n cachedMaterialPickerControlOptions.set(document as object, byText);\n }\n let byAsset = byText.get(text);\n if (!byAsset) {\n byAsset = new WeakMap();\n byText.set(text, byAsset);\n }\n const assetKey = currentAsset ?? NULL_MATERIAL_ASSET_CACHE_KEY;\n let byValue = byAsset.get(assetKey);\n if (!byValue) {\n byValue = new Map();\n byAsset.set(assetKey, byValue);\n }\n const cached = byValue.get(currentValue);\n if (cached) return cached;\n const options = createMaterialAssetPickerControlOptionsWithUsage(\n document,\n currentAsset,\n text,\n currentValue,\n materialBindingInternals.getCachedUsageIndex(document),\n );\n byValue.set(currentValue, options);\n return options;\n}\n\nconst materialAssetFieldInternals = {\n createSelectorInspectorPropertyWithUsage:\n createMaterialAssetSelectorInspectorPropertyWithUsage,\n createSelectorInspectorPropertyWithCachedUsage:\n createMaterialAssetSelectorInspectorPropertyWithCachedUsage,\n createPickerControlOptionsWithUsage:\n createMaterialAssetPickerControlOptionsWithUsage,\n createPickerControlOptionsWithCachedUsage:\n createMaterialAssetPickerControlOptionsWithCachedUsage,\n};\n\nexport default materialAssetFieldInternals;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EditorSceneMaterialAsset, EditorSceneMaterialAssetOwnershipText, EditorSceneMaterialAssetOwnershipView, EditorSceneMaterialBinding, EditorSceneMaterialAssetIntegrityResult, EditorSceneMaterialAssetUsage, EditorSceneMaterialBindingSummary, EditorSceneMaterialDocument, EditorSceneMaterialGameObject, EditorSceneMaterialSlotDescriptor } from './types';
|
|
1
|
+
import type { EditorSceneMaterialAsset, EditorSceneMaterialAssetDisplayText, EditorSceneMaterialAssetOwnershipText, EditorSceneMaterialAssetOwnershipView, EditorSceneMaterialBinding, EditorSceneMaterialAssetIntegrityResult, EditorSceneMaterialAssetUsage, EditorSceneMaterialBindingSummary, EditorSceneMaterialBrowserAssetItem, EditorSceneMaterialDocument, EditorSceneMaterialGameObject, EditorSceneMaterialPickerControlOptions, EditorSceneMaterialPickerText, EditorSceneMaterialSlotDescriptor } from './types';
|
|
2
2
|
export declare const EDITOR_SCENE_ASSET_MESH_SELECTION_SEPARATOR = "::assetMesh::";
|
|
3
3
|
export declare function findEditorSceneMaterialAsset<TMaterialAsset extends EditorSceneMaterialAsset = EditorSceneMaterialAsset>(document: Pick<EditorSceneMaterialDocument<EditorSceneMaterialGameObject, TMaterialAsset>, 'scene'>, materialAssetId: string): TMaterialAsset | null;
|
|
4
4
|
export declare function hasEditorSceneMaterialAsset(document: Pick<EditorSceneMaterialDocument, 'scene'>, materialAssetId: string): boolean;
|
|
@@ -25,4 +25,30 @@ export declare function splitEditorSceneFieldPath(path: string): string[];
|
|
|
25
25
|
export declare function splitMaterialSlotBindingFieldPath(path: string): string[] | null;
|
|
26
26
|
export declare function readEditorSceneAssetMaterialSlots(document: Pick<EditorSceneMaterialDocument, 'assets'>, gameObject: EditorSceneMaterialGameObject): EditorSceneMaterialSlotDescriptor[];
|
|
27
27
|
export declare function readEditorSceneMaterialSlotDescriptor(value: unknown): EditorSceneMaterialSlotDescriptor | null;
|
|
28
|
+
interface InternalMaterialPickerInput<TMaterialAsset extends EditorSceneMaterialAsset = EditorSceneMaterialAsset> {
|
|
29
|
+
materialAssets: readonly TMaterialAsset[];
|
|
30
|
+
currentAsset?: TMaterialAsset | null;
|
|
31
|
+
currentValue: string;
|
|
32
|
+
pickerText: EditorSceneMaterialPickerText;
|
|
33
|
+
displayText: EditorSceneMaterialAssetDisplayText;
|
|
34
|
+
document?: Pick<EditorSceneMaterialDocument<EditorSceneMaterialGameObject, TMaterialAsset>, 'scene' | 'assets'>;
|
|
35
|
+
ownershipText?: EditorSceneMaterialAssetOwnershipText;
|
|
36
|
+
}
|
|
37
|
+
declare class InternalMaterialUsageIndex {
|
|
38
|
+
private readonly byMaterialId;
|
|
39
|
+
private readonly byOwnerId;
|
|
40
|
+
constructor(document: Pick<EditorSceneMaterialDocument, 'scene' | 'assets'>);
|
|
41
|
+
forMaterial(materialAssetId: string): readonly EditorSceneMaterialAssetUsage[];
|
|
42
|
+
forOwner(ownerId: string): readonly EditorSceneMaterialAssetUsage[];
|
|
43
|
+
}
|
|
44
|
+
declare function getCachedMaterialUsageIndex(document: Pick<EditorSceneMaterialDocument, 'scene' | 'assets'>): InternalMaterialUsageIndex;
|
|
45
|
+
declare function createInternalMaterialPickerControlOptions<TMaterialAsset extends EditorSceneMaterialAsset = EditorSceneMaterialAsset>(input: InternalMaterialPickerInput<TMaterialAsset>, usageIndex: InternalMaterialUsageIndex | null): EditorSceneMaterialPickerControlOptions;
|
|
46
|
+
declare function createInternalMaterialBrowserAssetItems<TMaterialAsset extends EditorSceneMaterialAsset = EditorSceneMaterialAsset>(document: Pick<EditorSceneMaterialDocument<EditorSceneMaterialGameObject, TMaterialAsset>, 'scene' | 'assets'>, usageIndex: InternalMaterialUsageIndex): Array<EditorSceneMaterialBrowserAssetItem<NonNullable<TMaterialAsset['profile']>>>;
|
|
47
|
+
declare const materialBindingInternals: {
|
|
48
|
+
createUsageIndex(document: Pick<EditorSceneMaterialDocument, "scene" | "assets">): InternalMaterialUsageIndex;
|
|
49
|
+
getCachedUsageIndex: typeof getCachedMaterialUsageIndex;
|
|
50
|
+
createPickerControlOptions: typeof createInternalMaterialPickerControlOptions;
|
|
51
|
+
createBrowserAssetItems: typeof createInternalMaterialBrowserAssetItems;
|
|
52
|
+
};
|
|
53
|
+
export default materialBindingInternals;
|
|
28
54
|
//# sourceMappingURL=binding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/material-binding/binding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"binding.d.ts","sourceRoot":"","sources":["../../src/material-binding/binding.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,wBAAwB,EACxB,mCAAmC,EACnC,qCAAqC,EACrC,qCAAqC,EAErC,0BAA0B,EAC1B,uCAAuC,EACvC,6BAA6B,EAC7B,iCAAiC,EACjC,mCAAmC,EACnC,2BAA2B,EAC3B,6BAA6B,EAE7B,uCAAuC,EACvC,6BAA6B,EAC7B,iCAAiC,EAGlC,MAAM,SAAS,CAAC;AAOjB,eAAO,MAAM,2CAA2C,kBAAkB,CAAC;AAE3E,wBAAgB,4BAA4B,CAC1C,cAAc,SAAS,wBAAwB,GAAG,wBAAwB,EAE1E,QAAQ,EAAE,IAAI,CAAC,2BAA2B,CAAC,6BAA6B,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,EACnG,eAAe,EAAE,MAAM,GACtB,cAAc,GAAG,IAAI,CAGvB;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,IAAI,CAAC,2BAA2B,EAAE,OAAO,CAAC,EACpD,eAAe,EAAE,MAAM,GACtB,OAAO,CAET;AAED,wBAAgB,uCAAuC,CACrD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,CAAC,2BAA2B,CAAC,6BAA6B,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,EAC9G,UAAU,EAAE,0BAA0B,GACrC,KAAK,CAAC,mCAAmC,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAyBpF;AAED,QAAA,MAAM,wBAAwB;+BAEhB,IAAI,CAAC,2BAA2B,EAAE,OAAO,GAAG,QAAQ,CAAC,GAC9D,0BAA0B;;;;CAM9B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { findEditorSceneModelRenderer, } from '../document/index.js';
|
|
2
|
-
import { normalizeEditorSceneMaterialSlotOwnerPath, } from './paths.js';
|
|
2
|
+
import { createEditorSceneDuplicateMaterialAssetValue, normalizeEditorSceneMaterialSlotOwnerPath, } from './paths.js';
|
|
3
|
+
import { createEditorSceneMaterialAssetMeta, createEditorSceneMaterialAssetPreview, } from './preview.js';
|
|
4
|
+
import { resolveEditorSceneMaterialAssetKind, } from './profile.js';
|
|
3
5
|
export const EDITOR_SCENE_ASSET_MESH_SELECTION_SEPARATOR = '::assetMesh::';
|
|
4
6
|
export function findEditorSceneMaterialAsset(document, materialAssetId) {
|
|
5
7
|
if (!materialAssetId)
|
|
@@ -438,4 +440,162 @@ function getEditorSceneMaterialUsageSlotLabel(slot, fallback) {
|
|
|
438
440
|
|| slot?.slotId?.trim()
|
|
439
441
|
|| fallback;
|
|
440
442
|
}
|
|
443
|
+
class InternalMaterialUsageIndex {
|
|
444
|
+
constructor(document) {
|
|
445
|
+
this.byMaterialId = new Map();
|
|
446
|
+
this.byOwnerId = new Map();
|
|
447
|
+
for (const usage of collectEditorSceneMaterialAssetReferences(document)) {
|
|
448
|
+
const materialUsages = this.byMaterialId.get(usage.materialAssetId) ?? [];
|
|
449
|
+
materialUsages.push(usage);
|
|
450
|
+
this.byMaterialId.set(usage.materialAssetId, materialUsages);
|
|
451
|
+
const ownerUsages = this.byOwnerId.get(usage.gameObjectId) ?? [];
|
|
452
|
+
ownerUsages.push(usage);
|
|
453
|
+
this.byOwnerId.set(usage.gameObjectId, ownerUsages);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
forMaterial(materialAssetId) {
|
|
457
|
+
return this.byMaterialId.get(materialAssetId.trim()) ?? [];
|
|
458
|
+
}
|
|
459
|
+
forOwner(ownerId) {
|
|
460
|
+
return this.byOwnerId.get(ownerId) ?? [];
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
const cachedMaterialUsageIndexes = new WeakMap();
|
|
464
|
+
function getCachedMaterialUsageIndex(document) {
|
|
465
|
+
let index = cachedMaterialUsageIndexes.get(document);
|
|
466
|
+
if (!index) {
|
|
467
|
+
index = new InternalMaterialUsageIndex(document);
|
|
468
|
+
cachedMaterialUsageIndexes.set(document, index);
|
|
469
|
+
}
|
|
470
|
+
return index;
|
|
471
|
+
}
|
|
472
|
+
function getInternalMaterialAssetDefaultPreset(materialAsset) {
|
|
473
|
+
return materialAsset?.system?.preset;
|
|
474
|
+
}
|
|
475
|
+
function getInternalMaterialAssetDisplayName(materialAsset, text) {
|
|
476
|
+
const preset = getInternalMaterialAssetDefaultPreset(materialAsset);
|
|
477
|
+
if (preset === 'default-pbr')
|
|
478
|
+
return text.defaultMaterial;
|
|
479
|
+
if (preset === 'default-standard')
|
|
480
|
+
return text.defaultStandardMaterial;
|
|
481
|
+
return materialAsset.name || materialAsset.id;
|
|
482
|
+
}
|
|
483
|
+
function getInternalMaterialAssetDisplayMeta(materialAsset, text) {
|
|
484
|
+
const preset = getInternalMaterialAssetDefaultPreset(materialAsset);
|
|
485
|
+
if (preset === 'default-pbr')
|
|
486
|
+
return text.defaultMaterialMeta;
|
|
487
|
+
if (preset === 'default-standard')
|
|
488
|
+
return text.defaultStandardMaterialMeta;
|
|
489
|
+
return text.formatMaterialMeta(materialAsset.id);
|
|
490
|
+
}
|
|
491
|
+
function createInternalMaterialPickerControlOptions(input, usageIndex) {
|
|
492
|
+
const currentAsset = input.currentAsset ?? null;
|
|
493
|
+
const currentOwnership = currentAsset
|
|
494
|
+
? createInternalMaterialOwnershipView(input.document, currentAsset.id, input.ownershipText, usageIndex)
|
|
495
|
+
: null;
|
|
496
|
+
const currentBaseMeta = currentAsset
|
|
497
|
+
? getInternalMaterialAssetDisplayMeta(currentAsset, input.displayText)
|
|
498
|
+
: (input.currentValue ? input.pickerText.summaryMissingAsset : input.pickerText.summaryInherit);
|
|
499
|
+
const currentMeta = currentOwnership
|
|
500
|
+
? createInternalMaterialPickerMeta(currentBaseMeta, currentOwnership)
|
|
501
|
+
: currentBaseMeta;
|
|
502
|
+
return {
|
|
503
|
+
pickerKind: 'material',
|
|
504
|
+
pickerTitle: input.pickerText.materialPickerTitle,
|
|
505
|
+
actionLabel: input.pickerText.replace,
|
|
506
|
+
copyActionLabel: currentAsset ? input.pickerText.duplicateForObject : '',
|
|
507
|
+
copyActionValue: currentAsset ? createEditorSceneDuplicateMaterialAssetValue(currentAsset.id) : '',
|
|
508
|
+
copyActionTooltip: currentAsset
|
|
509
|
+
? createInternalMaterialPickerCopyTooltip(input.pickerText.duplicateForObjectTooltip, currentOwnership)
|
|
510
|
+
: '',
|
|
511
|
+
placeholder: input.currentValue ? input.pickerText.summaryMissingAsset : input.pickerText.inheritNone,
|
|
512
|
+
currentLabel: currentAsset
|
|
513
|
+
? getInternalMaterialAssetDisplayName(currentAsset, input.displayText)
|
|
514
|
+
: (input.currentValue ? input.currentValue : input.pickerText.inheritNone),
|
|
515
|
+
currentMeta,
|
|
516
|
+
...(currentOwnership?.usageLabel ? { currentUsageLabel: currentOwnership.usageLabel } : {}),
|
|
517
|
+
...(currentOwnership?.editImpactLabel ? { currentEditImpactLabel: currentOwnership.editImpactLabel } : {}),
|
|
518
|
+
...(currentOwnership ? { currentOwnership } : {}),
|
|
519
|
+
currentPreview: currentAsset ? createEditorSceneMaterialAssetPreview(currentAsset.profile) : undefined,
|
|
520
|
+
candidates: [{
|
|
521
|
+
label: input.pickerText.inheritNone,
|
|
522
|
+
value: '',
|
|
523
|
+
meta: input.pickerText.summaryInherit,
|
|
524
|
+
}, ...input.materialAssets.map(materialAsset => {
|
|
525
|
+
const ownership = createInternalMaterialOwnershipView(input.document, materialAsset.id, input.ownershipText, usageIndex);
|
|
526
|
+
return {
|
|
527
|
+
label: getInternalMaterialAssetDisplayName(materialAsset, input.displayText),
|
|
528
|
+
value: materialAsset.id,
|
|
529
|
+
meta: createInternalMaterialPickerMeta(getInternalMaterialAssetDisplayMeta(materialAsset, input.displayText), ownership),
|
|
530
|
+
kind: 'material',
|
|
531
|
+
preview: createEditorSceneMaterialAssetPreview(materialAsset.profile),
|
|
532
|
+
...(ownership?.usageLabel ? { usageLabel: ownership.usageLabel } : {}),
|
|
533
|
+
...(ownership ? { ownership } : {}),
|
|
534
|
+
};
|
|
535
|
+
})],
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
function createInternalMaterialOwnershipView(document, materialAssetId, text, usageIndex) {
|
|
539
|
+
if (!document || !usageIndex)
|
|
540
|
+
return null;
|
|
541
|
+
const normalizedMaterialAssetId = materialAssetId.trim();
|
|
542
|
+
const usages = usageIndex.forMaterial(normalizedMaterialAssetId);
|
|
543
|
+
const usageCount = usages.length;
|
|
544
|
+
return {
|
|
545
|
+
materialAssetId: normalizedMaterialAssetId,
|
|
546
|
+
usage: {
|
|
547
|
+
count: usageCount,
|
|
548
|
+
items: usages.map(usage => structuredClone(usage)),
|
|
549
|
+
},
|
|
550
|
+
usageCount,
|
|
551
|
+
used: usageCount > 0,
|
|
552
|
+
shared: usageCount > 1,
|
|
553
|
+
...(text ? {
|
|
554
|
+
usageLabel: text.formatUsageCount(usageCount),
|
|
555
|
+
editImpactLabel: text.formatEditImpact(usageCount),
|
|
556
|
+
duplicateImpactLabel: text.formatDuplicateImpact(usageCount),
|
|
557
|
+
} : {}),
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
function createInternalMaterialPickerMeta(baseMeta, ownership) {
|
|
561
|
+
return [baseMeta, ownership?.usageLabel].filter(Boolean).join(' · ');
|
|
562
|
+
}
|
|
563
|
+
function createInternalMaterialPickerCopyTooltip(baseTooltip, ownership) {
|
|
564
|
+
return [baseTooltip, ownership?.duplicateImpactLabel].filter(Boolean).join(' · ');
|
|
565
|
+
}
|
|
566
|
+
function createInternalMaterialBrowserAssetItems(document, usageIndex) {
|
|
567
|
+
return (document.scene.materialAssets ?? []).map(materialAsset => {
|
|
568
|
+
const usages = usageIndex.forMaterial(materialAsset.id);
|
|
569
|
+
return {
|
|
570
|
+
id: `material:${materialAsset.id}`,
|
|
571
|
+
assetId: materialAsset.id,
|
|
572
|
+
kind: 'material',
|
|
573
|
+
label: materialAsset.name || materialAsset.id,
|
|
574
|
+
meta: createEditorSceneMaterialAssetMeta(materialAsset.profile, materialAsset.id),
|
|
575
|
+
preview: createEditorSceneMaterialAssetPreview(materialAsset.profile),
|
|
576
|
+
material: {
|
|
577
|
+
id: materialAsset.id,
|
|
578
|
+
name: materialAsset.name || materialAsset.id,
|
|
579
|
+
materialKind: resolveEditorSceneMaterialAssetKind(materialAsset),
|
|
580
|
+
readonly: materialAsset.system?.readonly === true
|
|
581
|
+
|| getInternalMaterialAssetDefaultPreset(materialAsset) != null,
|
|
582
|
+
usage: {
|
|
583
|
+
count: usages.length,
|
|
584
|
+
items: usages.map(usage => structuredClone(usage)),
|
|
585
|
+
},
|
|
586
|
+
profile: structuredClone(materialAsset.profile ?? {}),
|
|
587
|
+
},
|
|
588
|
+
placeable: false,
|
|
589
|
+
};
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
const materialBindingInternals = {
|
|
593
|
+
createUsageIndex(document) {
|
|
594
|
+
return new InternalMaterialUsageIndex(document);
|
|
595
|
+
},
|
|
596
|
+
getCachedUsageIndex: getCachedMaterialUsageIndex,
|
|
597
|
+
createPickerControlOptions: createInternalMaterialPickerControlOptions,
|
|
598
|
+
createBrowserAssetItems: createInternalMaterialBrowserAssetItems,
|
|
599
|
+
};
|
|
600
|
+
export default materialBindingInternals;
|
|
441
601
|
//# sourceMappingURL=binding.js.map
|