@fps-games/editor 0.1.6-beta.1 → 0.1.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-bridge/capabilities/assets.d.ts +8 -0
- package/dist/agent-bridge/capabilities/assets.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/assets.js +226 -0
- package/dist/agent-bridge/capabilities/assets.js.map +1 -0
- package/dist/agent-bridge/capabilities/editor-state.d.ts +5 -0
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/editor-state.js +72 -0
- package/dist/agent-bridge/capabilities/editor-state.js.map +1 -0
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +4 -0
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/host-lifecycle.js +87 -0
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +1 -0
- package/dist/agent-bridge/capabilities/prefabs.d.ts +5 -0
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/prefabs.js +735 -0
- package/dist/agent-bridge/capabilities/prefabs.js.map +1 -0
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +9 -0
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/scene-objects.js +394 -0
- package/dist/agent-bridge/capabilities/scene-objects.js.map +1 -0
- package/dist/agent-bridge/capabilities/selection.d.ts +5 -0
- package/dist/agent-bridge/capabilities/selection.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/selection.js +57 -0
- package/dist/agent-bridge/capabilities/selection.js.map +1 -0
- package/dist/agent-bridge/capabilities/shadows.d.ts +5 -0
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/shadows.js +1876 -0
- package/dist/agent-bridge/capabilities/shadows.js.map +1 -0
- package/dist/agent-bridge/capabilities/transform.d.ts +5 -0
- package/dist/agent-bridge/capabilities/transform.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/transform.js +162 -0
- package/dist/agent-bridge/capabilities/transform.js.map +1 -0
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +4 -0
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/ui-regions.js +168 -0
- package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -0
- package/dist/agent-bridge/capabilities/viewport.d.ts +5 -0
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +1 -0
- package/dist/agent-bridge/capabilities/viewport.js +407 -0
- package/dist/agent-bridge/capabilities/viewport.js.map +1 -0
- package/dist/agent-bridge/capability-sources.d.ts +6 -0
- package/dist/agent-bridge/capability-sources.d.ts.map +1 -0
- package/dist/agent-bridge/capability-sources.js +26 -0
- package/dist/agent-bridge/capability-sources.js.map +1 -0
- package/dist/agent-bridge/diagnostics.d.ts +12 -0
- package/dist/agent-bridge/diagnostics.d.ts.map +1 -0
- package/dist/agent-bridge/diagnostics.js +45 -0
- package/dist/agent-bridge/diagnostics.js.map +1 -0
- package/dist/agent-bridge/index.d.ts +5 -0
- package/dist/agent-bridge/index.d.ts.map +1 -0
- package/dist/agent-bridge/index.js +5 -0
- package/dist/agent-bridge/index.js.map +1 -0
- package/dist/agent-bridge/register.d.ts +4 -0
- package/dist/agent-bridge/register.d.ts.map +1 -0
- package/dist/agent-bridge/register.js +908 -0
- package/dist/agent-bridge/register.js.map +1 -0
- package/dist/agent-bridge/shared.d.ts +189 -0
- package/dist/agent-bridge/shared.d.ts.map +1 -0
- package/dist/agent-bridge/shared.js +39 -0
- package/dist/agent-bridge/shared.js.map +1 -0
- package/dist/agent-bridge/source-types.d.ts +90 -0
- package/dist/agent-bridge/source-types.d.ts.map +1 -0
- package/dist/agent-bridge/source-types.js +2 -0
- package/dist/agent-bridge/source-types.js.map +1 -0
- package/dist/build-info.json +17 -17
- package/dist/local-editor-agent-bridge-transport.d.ts +95 -0
- package/dist/local-editor-agent-bridge-transport.d.ts.map +1 -0
- package/dist/local-editor-agent-bridge-transport.js +340 -0
- package/dist/local-editor-agent-bridge-transport.js.map +1 -0
- package/dist/local-editor-agent-bridge.d.ts +2 -0
- package/dist/local-editor-agent-bridge.d.ts.map +1 -0
- package/dist/local-editor-agent-bridge.js +2 -0
- package/dist/local-editor-agent-bridge.js.map +1 -0
- package/dist/local-editor-harness.d.ts +26 -2
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +773 -75
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/playable-babylon-rendering.js +20 -0
- package/dist/playable-babylon-rendering.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +5 -0
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +2 -0
- package/dist/playable-local-editor-host.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.js +6 -4
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/planar-shadow-shaders.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/planar-shadow-shaders.js +103 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/planar-shadow-shaders.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/planar-shadow-system.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/planar-shadow-system.js +330 -27
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/planar-shadow-system.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js +159 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js +8 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts +53 -2
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +30 -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 +346 -11
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.d.ts +11 -0
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.js +113 -29
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts +13 -1
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js +543 -3
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +5 -5
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -2
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-context-menu.js +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-context-menu.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.js +7 -9
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js +2 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-command-adapter.d.ts +21 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-command-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-command-adapter.js +75 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-command-adapter.js.map +1 -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 +288 -71
- 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-scope.d.ts +5 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-scope.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-scope.js +92 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-scope.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.d.ts +3 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js +22 -7
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +4 -0
- 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 +21 -14
- 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-prefab-stage.d.ts +19 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +79 -39
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.js +2 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +68 -1
- 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-workbench.d.ts +2 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +10 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +3 -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 +401 -241
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +3 -3
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +102 -0
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +2 -2
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/config.d.ts +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/config.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/config.js +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/config.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts +6 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +89 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/identity.d.ts +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/identity.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/identity.js +121 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/identity.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/metadata.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/metadata.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/metadata.js +782 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/metadata.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/node.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/node.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/node.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/node.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/registry.d.ts +80 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/registry.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/registry.js +600 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/registry.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/types.d.ts +51 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/types.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.d.ts +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js +4 -42
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/types.d.ts +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts +42 -2
- 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 +612 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts +42 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js +16 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.js +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts +82 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js +396 -22
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/validation.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/validation.js +0 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/validation.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/lighting-debug/math.d.ts +29 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/lighting-debug/math.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/lighting-debug/math.js +143 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/lighting-debug/math.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js +99 -11
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js +4 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/transform.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/transform.js +19 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/transform.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +19 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.d.ts +1 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +0 -14
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/import-plan.d.ts +1 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/import-plan.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/import-plan.js +3 -32
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/import-plan.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js +16 -32
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts +5 -22
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/compiler.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/compiler.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/compiler.js +996 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/compiler.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/index.d.ts +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/index.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/types.d.ts +152 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/types.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-compiler/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/protocol.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/protocol.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js +224 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js +158 -50
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/patch.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/patch.js +45 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/patch.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/index.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/index.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/legacy.d.ts +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/legacy.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/legacy.js +158 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/legacy.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/quality.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/quality.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/quality.js +83 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/quality.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/resolver.d.ts +35 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/resolver.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/resolver.js +363 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/resolver.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/types.d.ts +105 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/types.js +6 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/shadow-system/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js +44 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/asset-authoring.d.ts +26 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/asset-authoring.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/asset-authoring.js +105 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/asset-authoring.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +3 -3
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +1127 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js +2180 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +68 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +23 -0
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +1 -1
- package/package.json +8 -8
|
@@ -15,6 +15,9 @@ function requireBabylonCtor(value, name) {
|
|
|
15
15
|
export function createBabylonEditorProjection(options) {
|
|
16
16
|
const projections = new Map();
|
|
17
17
|
const projectionParentIds = new Map();
|
|
18
|
+
const projectionAuthoredActive = new Map();
|
|
19
|
+
const previewVisibilityOverrides = new Map();
|
|
20
|
+
const shadowDebugOverlayObjects = [];
|
|
18
21
|
const selectionEdgesPrewarm = options.selectionEdgesPrewarm ?? 'eager';
|
|
19
22
|
const activeBatches = new Set();
|
|
20
23
|
const idleWaiters = new Set();
|
|
@@ -115,6 +118,7 @@ export function createBabylonEditorProjection(options) {
|
|
|
115
118
|
batch.settledNodeIds.add(node.id);
|
|
116
119
|
if (projections.get(node.id) === projection && !projection.root.isDisposed?.()) {
|
|
117
120
|
delete projection.loadPromise;
|
|
121
|
+
applyProjectionPreviewVisibility(node.id);
|
|
118
122
|
applyProjectionOutline(node, projection);
|
|
119
123
|
scheduleProjectionSelectionEdgesPrewarm(projection);
|
|
120
124
|
options.onProjectionReady?.({ nodeId: node.id, async: true });
|
|
@@ -137,11 +141,42 @@ export function createBabylonEditorProjection(options) {
|
|
|
137
141
|
const disposeAll = () => {
|
|
138
142
|
markActiveBatchesStale();
|
|
139
143
|
projectionGeneration += 1;
|
|
144
|
+
clearShadowDebugOverlayObjects();
|
|
140
145
|
for (const projection of projections.values()) {
|
|
141
146
|
disposeProjectedNode(projection);
|
|
142
147
|
}
|
|
143
148
|
projections.clear();
|
|
144
149
|
projectionParentIds.clear();
|
|
150
|
+
projectionAuthoredActive.clear();
|
|
151
|
+
previewVisibilityOverrides.clear();
|
|
152
|
+
};
|
|
153
|
+
const createPreviewVisibilityEntry = (nodeId, visible) => {
|
|
154
|
+
const authoredActive = projectionAuthoredActive.get(nodeId) !== false;
|
|
155
|
+
return {
|
|
156
|
+
nodeId,
|
|
157
|
+
visible,
|
|
158
|
+
authoredActive,
|
|
159
|
+
effectiveVisible: authoredActive && visible !== false,
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
const applyProjectionPreviewVisibility = (nodeId) => {
|
|
163
|
+
const projection = projections.get(nodeId);
|
|
164
|
+
if (!projection)
|
|
165
|
+
return;
|
|
166
|
+
const authoredActive = projectionAuthoredActive.get(nodeId) !== false;
|
|
167
|
+
const override = previewVisibilityOverrides.get(nodeId);
|
|
168
|
+
const effectiveVisible = authoredActive && override !== false;
|
|
169
|
+
projection.root?.setEnabled?.(effectiveVisible);
|
|
170
|
+
for (const runtimeObject of projection.runtimeObjects) {
|
|
171
|
+
runtimeObject.setEnabled?.(effectiveVisible);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const clearShadowDebugOverlayObjects = () => {
|
|
175
|
+
const hadObjects = shadowDebugOverlayObjects.length > 0;
|
|
176
|
+
for (const object of shadowDebugOverlayObjects.splice(0)) {
|
|
177
|
+
object.dispose?.();
|
|
178
|
+
}
|
|
179
|
+
return hadObjects;
|
|
145
180
|
};
|
|
146
181
|
const scheduleProjectionSelectionEdgesPrewarm = (projection) => {
|
|
147
182
|
projection.selectionEdgesPrewarmCancel?.();
|
|
@@ -179,7 +214,8 @@ export function createBabylonEditorProjection(options) {
|
|
|
179
214
|
};
|
|
180
215
|
projections.set(node.id, projection);
|
|
181
216
|
projectionParentIds.set(node.id, node.parentId ?? null);
|
|
182
|
-
|
|
217
|
+
projectionAuthoredActive.set(node.id, node.active !== false);
|
|
218
|
+
applyProjectionPreviewVisibility(node.id);
|
|
183
219
|
if (node.transform)
|
|
184
220
|
applyProjectionTransform(options.babylon, root, node.transform);
|
|
185
221
|
if (node.helperKind !== 'root' && !attachRuntimeProjection(options.babylon, options.scene, node, projection)) {
|
|
@@ -214,6 +250,8 @@ export function createBabylonEditorProjection(options) {
|
|
|
214
250
|
return;
|
|
215
251
|
projections.delete(nodeId);
|
|
216
252
|
projectionParentIds.delete(nodeId);
|
|
253
|
+
projectionAuthoredActive.delete(nodeId);
|
|
254
|
+
previewVisibilityOverrides.delete(nodeId);
|
|
217
255
|
syncProjectionHierarchy();
|
|
218
256
|
disposeProjectedNode(existing);
|
|
219
257
|
};
|
|
@@ -308,16 +346,29 @@ export function createBabylonEditorProjection(options) {
|
|
|
308
346
|
const projection = projections.get(node.id);
|
|
309
347
|
if (!projection)
|
|
310
348
|
return;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
runtimeObject.setEnabled?.(node.active !== false);
|
|
314
|
-
}
|
|
349
|
+
projectionAuthoredActive.set(node.id, node.active !== false);
|
|
350
|
+
applyProjectionPreviewVisibility(node.id);
|
|
315
351
|
projectionParentIds.set(node.id, node.parentId ?? null);
|
|
316
352
|
syncProjectionHierarchy();
|
|
317
353
|
if (node.transform)
|
|
318
354
|
applyProjectionTransform(options.babylon, projection.root, node.transform);
|
|
319
355
|
scheduleProjectionSelectionEdgesPrewarm(projection);
|
|
320
356
|
},
|
|
357
|
+
syncRuntimeNode(node) {
|
|
358
|
+
const projection = projections.get(node.id);
|
|
359
|
+
if (!projection || node.runtimeKind !== 'light')
|
|
360
|
+
return false;
|
|
361
|
+
projectionAuthoredActive.set(node.id, node.active !== false);
|
|
362
|
+
applyProjectionPreviewVisibility(node.id);
|
|
363
|
+
projectionParentIds.set(node.id, node.parentId ?? null);
|
|
364
|
+
syncProjectionHierarchy();
|
|
365
|
+
if (node.transform)
|
|
366
|
+
applyProjectionTransform(options.babylon, projection.root, node.transform);
|
|
367
|
+
if (!syncRuntimeLightProjection(options.babylon, options.scene, node, projection))
|
|
368
|
+
return false;
|
|
369
|
+
scheduleProjectionSelectionEdgesPrewarm(projection);
|
|
370
|
+
return true;
|
|
371
|
+
},
|
|
321
372
|
syncNodeMetadata(node) {
|
|
322
373
|
const projection = projections.get(node.id);
|
|
323
374
|
if (!projection)
|
|
@@ -342,6 +393,55 @@ export function createBabylonEditorProjection(options) {
|
|
|
342
393
|
getProjectedNode(nodeId) {
|
|
343
394
|
return projections.get(nodeId) ?? null;
|
|
344
395
|
},
|
|
396
|
+
getProjectedNodeIds() {
|
|
397
|
+
return [...projections.keys()];
|
|
398
|
+
},
|
|
399
|
+
getProjectionParentIds(nodeId) {
|
|
400
|
+
const parentIds = [];
|
|
401
|
+
const seen = new Set([nodeId]);
|
|
402
|
+
let currentId = nodeId;
|
|
403
|
+
while (currentId) {
|
|
404
|
+
const parentId = projectionParentIds.get(currentId) ?? null;
|
|
405
|
+
if (!parentId || parentId === currentId || seen.has(parentId))
|
|
406
|
+
break;
|
|
407
|
+
seen.add(parentId);
|
|
408
|
+
parentIds.push(parentId);
|
|
409
|
+
currentId = parentId;
|
|
410
|
+
}
|
|
411
|
+
return parentIds;
|
|
412
|
+
},
|
|
413
|
+
getPreviewVisibilityOverrides() {
|
|
414
|
+
return [...previewVisibilityOverrides.entries()]
|
|
415
|
+
.map(([nodeId, visible]) => createPreviewVisibilityEntry(nodeId, visible));
|
|
416
|
+
},
|
|
417
|
+
setPreviewVisibilityOverrides(overrides) {
|
|
418
|
+
for (const [nodeId, visible] of Object.entries(overrides)) {
|
|
419
|
+
if (!projections.has(nodeId))
|
|
420
|
+
continue;
|
|
421
|
+
previewVisibilityOverrides.set(nodeId, visible !== false);
|
|
422
|
+
applyProjectionPreviewVisibility(nodeId);
|
|
423
|
+
}
|
|
424
|
+
return this.getPreviewVisibilityOverrides();
|
|
425
|
+
},
|
|
426
|
+
clearPreviewVisibilityOverrides() {
|
|
427
|
+
const changedNodeIds = [...previewVisibilityOverrides.keys()];
|
|
428
|
+
previewVisibilityOverrides.clear();
|
|
429
|
+
for (const nodeId of changedNodeIds)
|
|
430
|
+
applyProjectionPreviewVisibility(nodeId);
|
|
431
|
+
return [];
|
|
432
|
+
},
|
|
433
|
+
setShadowDebugOverlay(items) {
|
|
434
|
+
clearShadowDebugOverlayObjects();
|
|
435
|
+
for (const item of items) {
|
|
436
|
+
const object = createShadowDebugOverlayObject(options.babylon, options.scene, item);
|
|
437
|
+
if (object)
|
|
438
|
+
shadowDebugOverlayObjects.push(object);
|
|
439
|
+
}
|
|
440
|
+
return items.map(item => item.id);
|
|
441
|
+
},
|
|
442
|
+
clearShadowDebugOverlay() {
|
|
443
|
+
return clearShadowDebugOverlayObjects();
|
|
444
|
+
},
|
|
345
445
|
dispose() {
|
|
346
446
|
disposeAll();
|
|
347
447
|
},
|
|
@@ -354,6 +454,156 @@ function readVector3(value, fallback) {
|
|
|
354
454
|
z: Number.isFinite(value?.z) ? Number(value.z) : fallback.z,
|
|
355
455
|
};
|
|
356
456
|
}
|
|
457
|
+
function createShadowDebugOverlayObject(babylon, scene, item) {
|
|
458
|
+
if (item.kind === 'light-direction')
|
|
459
|
+
return createShadowDebugDirectionOverlay(babylon, scene, item);
|
|
460
|
+
const bounds = item.bounds ?? createBoundsFromCenterSize(item.center, item.size);
|
|
461
|
+
if (!bounds)
|
|
462
|
+
return null;
|
|
463
|
+
const MeshBuilder = babylon.MeshBuilder;
|
|
464
|
+
const StandardMaterial = babylon.StandardMaterial;
|
|
465
|
+
if (!MeshBuilder?.CreateBox || !StandardMaterial)
|
|
466
|
+
return null;
|
|
467
|
+
const size = {
|
|
468
|
+
x: Math.max(Math.abs(bounds.size.x), 0.01),
|
|
469
|
+
y: Math.max(Math.abs(bounds.size.y), item.kind === 'footprint' ? 0.015 : 0.01),
|
|
470
|
+
z: Math.max(Math.abs(bounds.size.z), 0.01),
|
|
471
|
+
};
|
|
472
|
+
const mesh = MeshBuilder.CreateBox(`${item.id}.shadowDebugOverlay`, {
|
|
473
|
+
width: size.x,
|
|
474
|
+
height: size.y,
|
|
475
|
+
depth: size.z,
|
|
476
|
+
}, scene);
|
|
477
|
+
if (!mesh)
|
|
478
|
+
return null;
|
|
479
|
+
mesh.id = item.id;
|
|
480
|
+
mesh.name = item.id;
|
|
481
|
+
mesh.isPickable = false;
|
|
482
|
+
mesh.renderingGroupId = 3;
|
|
483
|
+
mesh.metadata = createShadowDebugOverlayMetadata();
|
|
484
|
+
mesh.position = createBabylonVector3(babylon, bounds.center);
|
|
485
|
+
const material = new StandardMaterial(`${item.id}.shadowDebugOverlay.material`, scene);
|
|
486
|
+
const color = readShadowDebugOverlayColor(babylon, item.kind);
|
|
487
|
+
if (color) {
|
|
488
|
+
material.diffuseColor = color;
|
|
489
|
+
material.emissiveColor = color;
|
|
490
|
+
}
|
|
491
|
+
material.alpha = item.kind === 'receiver-surface' ? 0.14 : item.kind === 'footprint' ? 0.32 : 0.5;
|
|
492
|
+
material.wireframe = item.kind !== 'footprint' && item.kind !== 'receiver-surface';
|
|
493
|
+
material.disableLighting = true;
|
|
494
|
+
mesh.material = material;
|
|
495
|
+
const disposeMaterial = material.dispose?.bind(material);
|
|
496
|
+
const disposeMesh = mesh.dispose?.bind(mesh);
|
|
497
|
+
mesh.dispose = (...args) => {
|
|
498
|
+
disposeMaterial?.();
|
|
499
|
+
return disposeMesh?.(...args);
|
|
500
|
+
};
|
|
501
|
+
return mesh;
|
|
502
|
+
}
|
|
503
|
+
function createShadowDebugDirectionOverlay(babylon, scene, item) {
|
|
504
|
+
const MeshBuilder = babylon.MeshBuilder;
|
|
505
|
+
if (!MeshBuilder?.CreateLineSystem)
|
|
506
|
+
return null;
|
|
507
|
+
const center = item.center ?? item.bounds?.center;
|
|
508
|
+
const direction = normalizeDebugVec3(item.direction ?? { x: -0.3, y: -1, z: -0.2 });
|
|
509
|
+
if (!center || !direction)
|
|
510
|
+
return null;
|
|
511
|
+
const length = Math.max(item.size?.x ?? item.bounds?.size.x ?? 2, item.size?.y ?? item.bounds?.size.y ?? 2, item.size?.z ?? item.bounds?.size.z ?? 2, 2);
|
|
512
|
+
const start = createBabylonVector3(babylon, {
|
|
513
|
+
x: center.x - direction.x * length * 0.5,
|
|
514
|
+
y: center.y - direction.y * length * 0.5,
|
|
515
|
+
z: center.z - direction.z * length * 0.5,
|
|
516
|
+
});
|
|
517
|
+
const end = createBabylonVector3(babylon, {
|
|
518
|
+
x: center.x + direction.x * length * 0.5,
|
|
519
|
+
y: center.y + direction.y * length * 0.5,
|
|
520
|
+
z: center.z + direction.z * length * 0.5,
|
|
521
|
+
});
|
|
522
|
+
const arrowLeft = createBabylonVector3(babylon, {
|
|
523
|
+
x: end.x - direction.x * length * 0.18 + direction.z * length * 0.08,
|
|
524
|
+
y: end.y - direction.y * length * 0.18,
|
|
525
|
+
z: end.z - direction.z * length * 0.18 - direction.x * length * 0.08,
|
|
526
|
+
});
|
|
527
|
+
const arrowRight = createBabylonVector3(babylon, {
|
|
528
|
+
x: end.x - direction.x * length * 0.18 - direction.z * length * 0.08,
|
|
529
|
+
y: end.y - direction.y * length * 0.18,
|
|
530
|
+
z: end.z - direction.z * length * 0.18 + direction.x * length * 0.08,
|
|
531
|
+
});
|
|
532
|
+
const line = MeshBuilder.CreateLineSystem(`${item.id}.shadowDebugOverlay`, {
|
|
533
|
+
lines: [
|
|
534
|
+
[start, end],
|
|
535
|
+
[end, arrowLeft],
|
|
536
|
+
[end, arrowRight],
|
|
537
|
+
],
|
|
538
|
+
}, scene);
|
|
539
|
+
if (!line)
|
|
540
|
+
return null;
|
|
541
|
+
line.id = item.id;
|
|
542
|
+
line.name = item.id;
|
|
543
|
+
line.isPickable = false;
|
|
544
|
+
line.renderingGroupId = 3;
|
|
545
|
+
line.metadata = createShadowDebugOverlayMetadata();
|
|
546
|
+
const color = readShadowDebugOverlayColor(babylon, item.kind);
|
|
547
|
+
if (color)
|
|
548
|
+
line.color = color;
|
|
549
|
+
return line;
|
|
550
|
+
}
|
|
551
|
+
function createShadowDebugOverlayMetadata() {
|
|
552
|
+
return {
|
|
553
|
+
shadowDebugOverlayInternal: true,
|
|
554
|
+
disablePlanarShadow: true,
|
|
555
|
+
disableBlobShadow: true,
|
|
556
|
+
disableStaticProjectedShadow: true,
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
function createBoundsFromCenterSize(center, size) {
|
|
560
|
+
if (!center || !size)
|
|
561
|
+
return null;
|
|
562
|
+
return {
|
|
563
|
+
center,
|
|
564
|
+
size,
|
|
565
|
+
min: {
|
|
566
|
+
x: center.x - size.x / 2,
|
|
567
|
+
y: center.y - size.y / 2,
|
|
568
|
+
z: center.z - size.z / 2,
|
|
569
|
+
},
|
|
570
|
+
max: {
|
|
571
|
+
x: center.x + size.x / 2,
|
|
572
|
+
y: center.y + size.y / 2,
|
|
573
|
+
z: center.z + size.z / 2,
|
|
574
|
+
},
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function createBabylonVector3(babylon, value) {
|
|
578
|
+
const Vector3 = babylon.Vector3;
|
|
579
|
+
return Vector3 ? new Vector3(value.x, value.y, value.z) : { x: value.x, y: value.y, z: value.z };
|
|
580
|
+
}
|
|
581
|
+
function normalizeDebugVec3(value) {
|
|
582
|
+
const length = Math.hypot(value.x, value.y, value.z);
|
|
583
|
+
if (!Number.isFinite(length) || length <= 0.0001)
|
|
584
|
+
return null;
|
|
585
|
+
return {
|
|
586
|
+
x: value.x / length,
|
|
587
|
+
y: value.y / length,
|
|
588
|
+
z: value.z / length,
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
function readShadowDebugOverlayColor(babylon, kind) {
|
|
592
|
+
const Color3 = babylon.Color3;
|
|
593
|
+
if (!Color3)
|
|
594
|
+
return null;
|
|
595
|
+
if (kind === 'caster-bounds')
|
|
596
|
+
return new Color3(1, 0.78, 0.1);
|
|
597
|
+
if (kind === 'receiver-bounds')
|
|
598
|
+
return new Color3(0.1, 0.75, 1);
|
|
599
|
+
if (kind === 'receiver-surface')
|
|
600
|
+
return new Color3(0.05, 0.55, 1);
|
|
601
|
+
if (kind === 'light-direction')
|
|
602
|
+
return new Color3(1, 0.95, 0.2);
|
|
603
|
+
if (kind === 'footprint')
|
|
604
|
+
return new Color3(0.1, 1, 0.42);
|
|
605
|
+
return new Color3(1, 0.25, 0.25);
|
|
606
|
+
}
|
|
357
607
|
function addVec3(left, right) {
|
|
358
608
|
return {
|
|
359
609
|
x: left.x + right.x,
|
|
@@ -483,7 +733,7 @@ function createProjectionRoot(babylon, scene, node) {
|
|
|
483
733
|
editorProjection: {
|
|
484
734
|
nodeId: node.id,
|
|
485
735
|
...(node.runtimeKind ? { runtimeKind: node.runtimeKind } : {}),
|
|
486
|
-
...(node
|
|
736
|
+
...createProjectionShadowMetadata(node),
|
|
487
737
|
},
|
|
488
738
|
};
|
|
489
739
|
return root;
|
|
@@ -536,7 +786,7 @@ function attachImportedProjectionResult(options, node, asset, projection, result
|
|
|
536
786
|
editorProjection: {
|
|
537
787
|
nodeId: node.id,
|
|
538
788
|
sourceId: asset.sourceId,
|
|
539
|
-
...(node
|
|
789
|
+
...createProjectionShadowMetadata(node),
|
|
540
790
|
},
|
|
541
791
|
};
|
|
542
792
|
applyAssetDefaultsTransform(babylon, modelRoot, asset.transform);
|
|
@@ -556,7 +806,7 @@ function attachImportedProjectionResult(options, node, asset, projection, result
|
|
|
556
806
|
editorProjection: {
|
|
557
807
|
nodeId: node.id,
|
|
558
808
|
sourceId: asset.sourceId,
|
|
559
|
-
...(node
|
|
809
|
+
...createProjectionShadowMetadata(node),
|
|
560
810
|
},
|
|
561
811
|
};
|
|
562
812
|
}
|
|
@@ -575,7 +825,7 @@ function attachImportedProjectionResult(options, node, asset, projection, result
|
|
|
575
825
|
ownerNodePath,
|
|
576
826
|
...(selectionKey !== ownerNodePath ? { slotSelectionKey: selectionKey } : {}),
|
|
577
827
|
runtimeKind: 'assetMesh',
|
|
578
|
-
...(node
|
|
828
|
+
...createProjectionShadowMetadata(node),
|
|
579
829
|
},
|
|
580
830
|
};
|
|
581
831
|
}
|
|
@@ -965,7 +1215,7 @@ function createPrimitiveProjectionMesh(babylon, scene, node, options) {
|
|
|
965
1215
|
mesh.metadata = createProjectionMetadata(node.id, {
|
|
966
1216
|
runtimeKind: 'primitive',
|
|
967
1217
|
primitiveShape: shape,
|
|
968
|
-
...(node
|
|
1218
|
+
...createProjectionShadowMetadata(node),
|
|
969
1219
|
});
|
|
970
1220
|
return mesh;
|
|
971
1221
|
}
|
|
@@ -1242,7 +1492,7 @@ function createFallbackProjectionMesh(babylon, scene, node, rendererFallback) {
|
|
|
1242
1492
|
editorProjection: {
|
|
1243
1493
|
nodeId: node.id,
|
|
1244
1494
|
fallback: true,
|
|
1245
|
-
...(node
|
|
1495
|
+
...createProjectionShadowMetadata(node),
|
|
1246
1496
|
},
|
|
1247
1497
|
};
|
|
1248
1498
|
return mesh;
|
|
@@ -1386,6 +1636,76 @@ function attachHemisphericLightProjection(babylon, scene, node, projection) {
|
|
|
1386
1636
|
projection.runtimeObjects.push(material);
|
|
1387
1637
|
projection.outlineMeshes = [helper];
|
|
1388
1638
|
}
|
|
1639
|
+
function syncRuntimeLightProjection(babylon, scene, node, projection) {
|
|
1640
|
+
if (node.light?.type === 'hemispheric') {
|
|
1641
|
+
return syncRuntimeHemisphericLightProjection(babylon, scene, node, projection);
|
|
1642
|
+
}
|
|
1643
|
+
return syncRuntimeDirectionalLightProjection(babylon, scene, node, projection);
|
|
1644
|
+
}
|
|
1645
|
+
function syncRuntimeDirectionalLightProjection(babylon, scene, node, projection) {
|
|
1646
|
+
const settings = readProjectionDirectionalLightSettings(node.light?.type === 'directional' ? node.light : undefined);
|
|
1647
|
+
const light = findProjectionRuntimeLight(projection, node.id, 'directional');
|
|
1648
|
+
if (!light)
|
|
1649
|
+
return false;
|
|
1650
|
+
const hasHelper = !!scene.getMeshByName?.(`${node.id}.lightHelper`);
|
|
1651
|
+
if (settings.helperVisible !== hasHelper)
|
|
1652
|
+
return false;
|
|
1653
|
+
const Vector3 = requireBabylonCtor(babylon.Vector3, 'Vector3');
|
|
1654
|
+
const Color3 = requireBabylonCtor(babylon.Color3, 'Color3');
|
|
1655
|
+
copyOrAssignBabylonVec3(light, 'direction', new Vector3(settings.direction.x, settings.direction.y, settings.direction.z));
|
|
1656
|
+
light.intensity = settings.intensity;
|
|
1657
|
+
copyOrAssignBabylonColor(light, 'diffuse', new Color3(settings.diffuseColor?.r ?? 1, settings.diffuseColor?.g ?? 1, settings.diffuseColor?.b ?? 1));
|
|
1658
|
+
light.setEnabled?.(node.active !== false);
|
|
1659
|
+
if (settings.helperVisible)
|
|
1660
|
+
refreshLightDirectionLines(babylon, scene, node, projection, settings.direction);
|
|
1661
|
+
return true;
|
|
1662
|
+
}
|
|
1663
|
+
function syncRuntimeHemisphericLightProjection(babylon, scene, node, projection) {
|
|
1664
|
+
const settings = readProjectionHemisphericLightSettings(node.light?.type === 'hemispheric' ? node.light : undefined);
|
|
1665
|
+
const light = findProjectionRuntimeLight(projection, node.id, 'hemispheric');
|
|
1666
|
+
if (!light)
|
|
1667
|
+
return false;
|
|
1668
|
+
const hasHelper = !!scene.getMeshByName?.(`${node.id}.hemisphericLightHelper`);
|
|
1669
|
+
if (settings.helperVisible !== hasHelper)
|
|
1670
|
+
return false;
|
|
1671
|
+
const Color3 = requireBabylonCtor(babylon.Color3, 'Color3');
|
|
1672
|
+
light.intensity = settings.intensity;
|
|
1673
|
+
copyOrAssignBabylonColor(light, 'diffuse', new Color3(settings.diffuseColor?.r ?? 1, settings.diffuseColor?.g ?? 1, settings.diffuseColor?.b ?? 1));
|
|
1674
|
+
copyOrAssignBabylonColor(light, 'groundColor', new Color3(settings.groundColor?.r ?? 0.48, settings.groundColor?.g ?? 0.52, settings.groundColor?.b ?? 0.62));
|
|
1675
|
+
light.setEnabled?.(node.active !== false);
|
|
1676
|
+
return true;
|
|
1677
|
+
}
|
|
1678
|
+
function findProjectionRuntimeLight(projection, nodeId, lightType) {
|
|
1679
|
+
return projection.runtimeObjects.find(runtimeObject => {
|
|
1680
|
+
const metadata = runtimeObject?.metadata?.editorProjection;
|
|
1681
|
+
return metadata?.nodeId === nodeId
|
|
1682
|
+
&& metadata?.runtimeKind === 'light'
|
|
1683
|
+
&& metadata?.lightType === lightType;
|
|
1684
|
+
}) ?? null;
|
|
1685
|
+
}
|
|
1686
|
+
function refreshLightDirectionLines(babylon, scene, node, projection, direction) {
|
|
1687
|
+
const existing = scene.getMeshByName?.(`${node.id}.lightDirection`);
|
|
1688
|
+
existing?.dispose?.();
|
|
1689
|
+
const arrow = createLightDirectionLines(babylon, scene, node, direction);
|
|
1690
|
+
if (!arrow)
|
|
1691
|
+
return;
|
|
1692
|
+
arrow.parent = projection.root;
|
|
1693
|
+
arrow.isPickable = false;
|
|
1694
|
+
}
|
|
1695
|
+
function copyOrAssignBabylonVec3(target, key, value) {
|
|
1696
|
+
if (target?.[key]?.copyFrom) {
|
|
1697
|
+
target[key].copyFrom(value);
|
|
1698
|
+
return;
|
|
1699
|
+
}
|
|
1700
|
+
target[key] = value;
|
|
1701
|
+
}
|
|
1702
|
+
function copyOrAssignBabylonColor(target, key, value) {
|
|
1703
|
+
if (target?.[key]?.copyFrom) {
|
|
1704
|
+
target[key].copyFrom(value);
|
|
1705
|
+
return;
|
|
1706
|
+
}
|
|
1707
|
+
target[key] = value;
|
|
1708
|
+
}
|
|
1389
1709
|
export function normalizeBabylonEditorProjectionCameraSettings(settings) {
|
|
1390
1710
|
const targetOffset = readOptionalProjectionVec3(settings?.targetOffset);
|
|
1391
1711
|
const targetScreenOffset = readOptionalProjectionVec2(settings?.targetScreenOffset);
|
|
@@ -1558,6 +1878,13 @@ function createProjectionMetadata(nodeId, extra = {}) {
|
|
|
1558
1878
|
},
|
|
1559
1879
|
};
|
|
1560
1880
|
}
|
|
1881
|
+
function createProjectionShadowMetadata(node) {
|
|
1882
|
+
return {
|
|
1883
|
+
...(node.shadowMode ? { shadowMode: node.shadowMode } : {}),
|
|
1884
|
+
...(node.shadow ? { shadow: structuredClone(node.shadow) } : {}),
|
|
1885
|
+
...(node.shadowPlan ? { shadowPlan: structuredClone(node.shadowPlan) } : {}),
|
|
1886
|
+
};
|
|
1887
|
+
}
|
|
1561
1888
|
function syncProjectionNodeMetadata(projection, node) {
|
|
1562
1889
|
walkProjectionRuntimeNodes(projection.root, (runtimeNode) => {
|
|
1563
1890
|
syncProjectionRuntimeNodeMetadata(runtimeNode, node);
|
|
@@ -1586,6 +1913,14 @@ function syncProjectionRuntimeNodeMetadata(runtimeNode, node) {
|
|
|
1586
1913
|
nextEditorProjection.shadowMode = node.shadowMode;
|
|
1587
1914
|
else
|
|
1588
1915
|
delete nextEditorProjection.shadowMode;
|
|
1916
|
+
if (node.shadow)
|
|
1917
|
+
nextEditorProjection.shadow = structuredClone(node.shadow);
|
|
1918
|
+
else
|
|
1919
|
+
delete nextEditorProjection.shadow;
|
|
1920
|
+
if (node.shadowPlan)
|
|
1921
|
+
nextEditorProjection.shadowPlan = structuredClone(node.shadowPlan);
|
|
1922
|
+
else
|
|
1923
|
+
delete nextEditorProjection.shadowPlan;
|
|
1589
1924
|
runtimeNode.metadata = {
|
|
1590
1925
|
...(metadata ?? {}),
|
|
1591
1926
|
editorProjection: nextEditorProjection,
|