@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
- package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
- package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
- package/dist/build-info.json +43 -43
- package/dist/internal/material-preview.d.ts +22 -0
- package/dist/internal/material-preview.d.ts.map +1 -0
- package/dist/internal/material-preview.js +186 -0
- package/dist/internal/material-preview.js.map +1 -0
- package/dist/internal/project-model-preview.d.ts +4 -0
- package/dist/internal/project-model-preview.d.ts.map +1 -0
- package/dist/internal/project-model-preview.js +359 -0
- package/dist/internal/project-model-preview.js.map +1 -0
- package/dist/local-editor-agent-context.d.ts +12 -1
- package/dist/local-editor-agent-context.d.ts.map +1 -1
- package/dist/local-editor-agent-context.js +47 -0
- package/dist/local-editor-agent-context.js.map +1 -1
- package/dist/local-editor-harness.d.ts +15 -2
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +310 -21
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-tools.d.ts +1 -0
- package/dist/local-editor-tools.d.ts.map +1 -1
- package/dist/local-editor-tools.js +3 -0
- package/dist/local-editor-tools.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +4 -0
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +27 -0
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +9 -3
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +5 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +7 -7
- package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
- package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
- package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +5 -5
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +22 -22
|
@@ -3,6 +3,8 @@ import { createEditorToolManager, createEditorToolRegistry, resolveEditingContex
|
|
|
3
3
|
import { createEditorDiagnosticStore, normalizeEditorDiagnostic, normalizeEditorDiagnosticDetails, } from '@fps-games/editor-core/diagnostics';
|
|
4
4
|
import {} from '@fps-games/editor-protocol';
|
|
5
5
|
import { createLocalEditorBrowserUi, resolveLocalEditorBrowserAssetKind, resolveLocalEditorStatusDiagnosticLocator, toTransformOperationPolicyStatusLabel, } from '@fps-games/editor-browser';
|
|
6
|
+
import { mountLocalEditorProjectModelPreview, resolveLocalEditorProjectModelThumbnail, } from './internal/project-model-preview.js';
|
|
7
|
+
import { mountLocalEditorMaterialPreview } from './internal/material-preview.js';
|
|
6
8
|
import { bindFpsEditorTools, } from '@fps-games/editor-core/plugin-host';
|
|
7
9
|
import { createLocalEditorHarnessPluginInspectorOptions } from './local-editor-plugin-inspector.js';
|
|
8
10
|
import { registerLocalEditorHarnessLifecycleOperations, } from './internal/local-editor-lifecycle-operations.js';
|
|
@@ -305,6 +307,8 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
305
307
|
handleSessionObserverError: () => { },
|
|
306
308
|
source: null,
|
|
307
309
|
assets: [],
|
|
310
|
+
projectFiles: null,
|
|
311
|
+
projectFilesWarning: null,
|
|
308
312
|
assetFilter: '',
|
|
309
313
|
updatedAssetProjection: { pending: false },
|
|
310
314
|
selectedAssetId: null,
|
|
@@ -340,6 +344,9 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
340
344
|
sceneViewMeasurement: null,
|
|
341
345
|
sceneViewSpatialOverlay: null,
|
|
342
346
|
selectionController: null,
|
|
347
|
+
selectionInspectorRefreshGeneration: 0,
|
|
348
|
+
selectionInspectorRefreshFrame: null,
|
|
349
|
+
selectionInspectorRefreshTimeout: null,
|
|
343
350
|
sceneRenderScheduler: null,
|
|
344
351
|
viewportRenderCoordinator: null,
|
|
345
352
|
sceneFrameStats: null,
|
|
@@ -449,11 +456,12 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
449
456
|
state.createSessionChangeObserver = createSessionChangeObserver;
|
|
450
457
|
state.handleSessionObserverError = handleEditorSessionObserverError;
|
|
451
458
|
let harness;
|
|
459
|
+
let renderSelectionChange = () => harness.render();
|
|
452
460
|
const busyOperationExecutors = new WeakMap();
|
|
453
461
|
let agentLifecycleController;
|
|
454
462
|
const pluginInspector = createLocalEditorHarnessPluginInspectorOptions(options.pluginHost, options.inspector);
|
|
455
|
-
const builtInSceneHierarchyProvider = createLocalEditorHarnessHierarchyScopeProvider(state, options, () => harness.render(), createLocalEditorSceneHierarchyScopeAdapter(state, options), busyOperationExecutors);
|
|
456
|
-
const builtInPrefabStageHierarchyProvider = createLocalEditorHarnessHierarchyScopeProvider(state, options, () => harness.render(), createLocalEditorPrefabHierarchyScopeAdapter(state, options), busyOperationExecutors);
|
|
463
|
+
const builtInSceneHierarchyProvider = createLocalEditorHarnessHierarchyScopeProvider(state, options, () => harness.render(), createLocalEditorSceneHierarchyScopeAdapter(state, options), busyOperationExecutors, () => renderSelectionChange());
|
|
464
|
+
const builtInPrefabStageHierarchyProvider = createLocalEditorHarnessHierarchyScopeProvider(state, options, () => harness.render(), createLocalEditorPrefabHierarchyScopeAdapter(state, options), busyOperationExecutors, () => renderSelectionChange());
|
|
457
465
|
const hierarchySurface = options.pluginHost
|
|
458
466
|
? resolveHierarchySurfaceContribution(options.pluginHost.contributions)
|
|
459
467
|
: options.hierarchy?.surface;
|
|
@@ -473,7 +481,10 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
473
481
|
const unregisterStandardTools = createLocalEditorStandardToolRegistrations({
|
|
474
482
|
activate(tool) {
|
|
475
483
|
const previous = state.transformTool;
|
|
476
|
-
|
|
484
|
+
// Tool Manager publishes immediately after the runtime activates, and that
|
|
485
|
+
// publication owns the UI refresh. Rendering here as well rebuilt the full
|
|
486
|
+
// workbench twice before Babylon could present the first Gizmo frame.
|
|
487
|
+
commitEditorStateChange(state, options, () => { }, 'transform-tool-change', () => {
|
|
477
488
|
state.transformTool = tool;
|
|
478
489
|
state.transformConstraint = normalizeTransformConstraint(tool, state.transformConstraint);
|
|
479
490
|
}, {
|
|
@@ -489,6 +500,11 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
489
500
|
});
|
|
490
501
|
}
|
|
491
502
|
},
|
|
503
|
+
reconcile(tool) {
|
|
504
|
+
if (state.transformTool !== tool)
|
|
505
|
+
return;
|
|
506
|
+
syncTransformGizmoToSceneArtifacts(state, 'transform-tool-reconcile');
|
|
507
|
+
},
|
|
492
508
|
cancelActiveOperation() {
|
|
493
509
|
cancelActiveOperation(state);
|
|
494
510
|
},
|
|
@@ -720,6 +736,21 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
720
736
|
if (patchMarkerRelation(state, options, input))
|
|
721
737
|
harness.render();
|
|
722
738
|
},
|
|
739
|
+
onAssetBrowserRefresh: () => runExclusive(state, harness.render, async () => {
|
|
740
|
+
await harness.reloadAssets();
|
|
741
|
+
}, busyOperationExecutors),
|
|
742
|
+
onProjectFileRead: options.persistenceAdapter.loadProjectFile
|
|
743
|
+
? path => Promise.resolve(options.persistenceAdapter.loadProjectFile(path))
|
|
744
|
+
: undefined,
|
|
745
|
+
onProjectEntrySendToAgent: options.agentContext
|
|
746
|
+
? input => Promise.resolve(options.agentContext.sendProjectEntry(input)).then(() => undefined)
|
|
747
|
+
: undefined,
|
|
748
|
+
onProjectMediaResolve: options.persistenceAdapter.resolveProjectMedia
|
|
749
|
+
? path => Promise.resolve(options.persistenceAdapter.resolveProjectMedia(path))
|
|
750
|
+
: undefined,
|
|
751
|
+
onProjectModelPreviewMount: mountLocalEditorProjectModelPreview,
|
|
752
|
+
onProjectModelThumbnailResolve: resolveLocalEditorProjectModelThumbnail,
|
|
753
|
+
onMaterialPreviewMount: mountLocalEditorMaterialPreview,
|
|
723
754
|
onAssetFilterChange: (value) => {
|
|
724
755
|
state.assetFilter = value;
|
|
725
756
|
harness.render();
|
|
@@ -897,6 +928,13 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
897
928
|
},
|
|
898
929
|
},
|
|
899
930
|
});
|
|
931
|
+
renderSelectionChange = () => {
|
|
932
|
+
if (!state.world || !ui.updatePreview) {
|
|
933
|
+
harness.render();
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
publishLocalEditorSelectionPresentation(state, options, previewState => ui.updatePreview?.(previewState), 'hierarchy-selection-presentation');
|
|
937
|
+
};
|
|
900
938
|
const discardPrefabStageChanges = () => {
|
|
901
939
|
const stage = state.prefabStage;
|
|
902
940
|
if (!stage || !stage.transaction.snapshot().stageDirty)
|
|
@@ -958,9 +996,26 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
958
996
|
}
|
|
959
997
|
return exitPrefabStage(state, options, 'reject');
|
|
960
998
|
};
|
|
961
|
-
const unsubscribeToolManager = toolManager.subscribe(
|
|
962
|
-
if (state.toolManagerRenderSuppression
|
|
999
|
+
const unsubscribeToolManager = toolManager.subscribe(snapshot => {
|
|
1000
|
+
if (state.toolManagerRenderSuppression !== 0)
|
|
1001
|
+
return;
|
|
1002
|
+
const startedAt = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
1003
|
+
const previewState = createUiToolPresentationPreviewState(state, snapshot);
|
|
1004
|
+
if (ui.updatePreview)
|
|
1005
|
+
ui.updatePreview(previewState);
|
|
1006
|
+
else
|
|
963
1007
|
harness.render();
|
|
1008
|
+
if (typeof globalThis.location?.search === 'string'
|
|
1009
|
+
&& /(?:^|[?&])debugGizmo=(?:1|true)(?:&|$)/.test(globalThis.location.search)) {
|
|
1010
|
+
console.info('[fps-editor:gizmo]', 'tool-manager.presentation-published', {
|
|
1011
|
+
timestamp: typeof performance !== 'undefined' ? Number(performance.now().toFixed(2)) : Date.now(),
|
|
1012
|
+
durationMs: Number(((typeof performance !== 'undefined' ? performance.now() : Date.now()) - startedAt).toFixed(2)),
|
|
1013
|
+
revision: snapshot.revision,
|
|
1014
|
+
activationGeneration: snapshot.activationGeneration,
|
|
1015
|
+
activeToolId: snapshot.activeToolId,
|
|
1016
|
+
updateMode: ui.updatePreview ? 'preview' : 'full-fallback',
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
964
1019
|
});
|
|
965
1020
|
construction.setCleanup(() => {
|
|
966
1021
|
harnessDisposed = true;
|
|
@@ -1045,16 +1100,45 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1045
1100
|
}, executor);
|
|
1046
1101
|
return runResult.accepted ? runResult.value : false;
|
|
1047
1102
|
};
|
|
1103
|
+
const loadOptionalProjectFiles = async () => {
|
|
1104
|
+
if (!options.persistenceAdapter.loadProjectFiles) {
|
|
1105
|
+
return { projectFiles: state.projectFiles, warning: null };
|
|
1106
|
+
}
|
|
1107
|
+
try {
|
|
1108
|
+
return {
|
|
1109
|
+
projectFiles: await options.persistenceAdapter.loadProjectFiles(),
|
|
1110
|
+
warning: null,
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
catch (error) {
|
|
1114
|
+
return {
|
|
1115
|
+
projectFiles: state.projectFiles,
|
|
1116
|
+
warning: `Project file browser unavailable: ${error instanceof Error ? error.message : String(error)}`,
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
1120
|
+
const applyProjectFilesWarningToStatus = () => {
|
|
1121
|
+
if (!state.projectFilesWarning)
|
|
1122
|
+
return;
|
|
1123
|
+
state.statusTone = 'warning';
|
|
1124
|
+
state.statusToneStatus = state.status;
|
|
1125
|
+
state.statusDetails = [state.statusDetails, state.projectFilesWarning].filter(Boolean).join(' · ');
|
|
1126
|
+
};
|
|
1048
1127
|
const loadEditorDocument = async () => {
|
|
1049
|
-
const loadedSource =
|
|
1050
|
-
|
|
1051
|
-
|
|
1128
|
+
const [loadedSource, projectFilesResult] = await Promise.all([
|
|
1129
|
+
options.persistenceAdapter.loadAuthoringSource
|
|
1130
|
+
? options.persistenceAdapter.loadAuthoringSource()
|
|
1131
|
+
: null,
|
|
1132
|
+
loadOptionalProjectFiles(),
|
|
1133
|
+
]);
|
|
1052
1134
|
const [document, assets] = loadedSource
|
|
1053
1135
|
? [loadedSource.document, loadedSource.assets ?? await options.persistenceAdapter.loadAssets()]
|
|
1054
1136
|
: [await loadDocumentFallback(options), await options.persistenceAdapter.loadAssets()];
|
|
1055
1137
|
const source = loadedSource?.source ?? null;
|
|
1056
1138
|
const preparedDocument = options.documentAdapter.prepareDocument?.(document, assets) ?? document;
|
|
1057
1139
|
state.assets = assets;
|
|
1140
|
+
state.projectFiles = projectFilesResult.projectFiles;
|
|
1141
|
+
state.projectFilesWarning = projectFilesResult.warning;
|
|
1058
1142
|
state.source = source;
|
|
1059
1143
|
state.markerGraphVisibility = createDefaultMarkerGraphVisibilityState();
|
|
1060
1144
|
state.markerGraphVisibilityRevision += 1;
|
|
@@ -1121,6 +1205,10 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1121
1205
|
throw error;
|
|
1122
1206
|
}
|
|
1123
1207
|
state.status = `GameWorld disposed; EditorWorld active; assets=${state.assets.length}`;
|
|
1208
|
+
state.statusTone = 'default';
|
|
1209
|
+
state.statusToneStatus = state.status;
|
|
1210
|
+
state.statusDetails = '';
|
|
1211
|
+
applyProjectFilesWarningToStatus();
|
|
1124
1212
|
harness.render();
|
|
1125
1213
|
harness.notifyViewportRevealed('editor-enter');
|
|
1126
1214
|
};
|
|
@@ -1344,7 +1432,10 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1344
1432
|
async reloadAssets() {
|
|
1345
1433
|
try {
|
|
1346
1434
|
const previousAssets = state.assets;
|
|
1347
|
-
const assets = await
|
|
1435
|
+
const [assets, projectFilesResult] = await Promise.all([
|
|
1436
|
+
options.persistenceAdapter.loadAssets(),
|
|
1437
|
+
loadOptionalProjectFiles(),
|
|
1438
|
+
]);
|
|
1348
1439
|
const refreshedAssetIds = options.documentAdapter.listAssetSnapshots
|
|
1349
1440
|
? findLocalEditorUpdatedAssetIds(options.documentAdapter.listAssetSnapshots(previousAssets), options.documentAdapter.listAssetSnapshots(assets))
|
|
1350
1441
|
: [];
|
|
@@ -1379,6 +1470,9 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1379
1470
|
state.statusDetails = '';
|
|
1380
1471
|
}
|
|
1381
1472
|
state.assets = assets;
|
|
1473
|
+
state.projectFiles = projectFilesResult.projectFiles;
|
|
1474
|
+
state.projectFilesWarning = projectFilesResult.warning;
|
|
1475
|
+
applyProjectFilesWarningToStatus();
|
|
1382
1476
|
clearArmedPlacement(state);
|
|
1383
1477
|
harness.render();
|
|
1384
1478
|
return {
|
|
@@ -1416,7 +1510,10 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1416
1510
|
if (!options.documentAdapter.resolveUpdatedAssetSnapshot) {
|
|
1417
1511
|
throw new Error('asset_update_snapshot_verification_unavailable');
|
|
1418
1512
|
}
|
|
1419
|
-
const assets = await
|
|
1513
|
+
const [assets, projectFilesResult] = await Promise.all([
|
|
1514
|
+
options.persistenceAdapter.loadAssets(),
|
|
1515
|
+
loadOptionalProjectFiles(),
|
|
1516
|
+
]);
|
|
1420
1517
|
assertLocalEditorUpdatedAssetSnapshotFreshness(options.documentAdapter.resolveUpdatedAssetSnapshot(assets, { assetId: input.assetId }), input);
|
|
1421
1518
|
const result = applyLocalEditorUpdatedAssetRefresh(state.session, {
|
|
1422
1519
|
assetId: input.assetId,
|
|
@@ -1430,6 +1527,8 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1430
1527
|
: {}),
|
|
1431
1528
|
});
|
|
1432
1529
|
state.assets = assets;
|
|
1530
|
+
state.projectFiles = projectFilesResult.projectFiles;
|
|
1531
|
+
state.projectFilesWarning = projectFilesResult.warning;
|
|
1433
1532
|
clearArmedPlacement(state);
|
|
1434
1533
|
syncLocalEditorUpdatedAssetProjection(state.updatedAssetProjection, result.changed, () => {
|
|
1435
1534
|
rebuildProjectionFromDocument(state, options, result.workingDocument, result.selection);
|
|
@@ -1443,6 +1542,7 @@ function createLocalEditorHarnessImplementation(options, construction) {
|
|
|
1443
1542
|
state.statusTone = warnings.length > 0 ? 'warning' : 'success';
|
|
1444
1543
|
state.statusToneStatus = state.status;
|
|
1445
1544
|
state.statusDetails = warnings.map(warning => warning.code).join(', ');
|
|
1545
|
+
applyProjectFilesWarningToStatus();
|
|
1446
1546
|
replaceAssetUpdateDiagnosticSnapshot(state, {
|
|
1447
1547
|
assetIds: [input.assetId],
|
|
1448
1548
|
warnings,
|
|
@@ -2657,6 +2757,7 @@ async function createEditorWorld(state, options, renderUi, renderPreviewUi, upda
|
|
|
2657
2757
|
},
|
|
2658
2758
|
});
|
|
2659
2759
|
state.gizmo = gizmo;
|
|
2760
|
+
await gizmo.prepare?.();
|
|
2660
2761
|
gizmo.setOperationSettings(getScopedTransformOperationSettings(state));
|
|
2661
2762
|
gizmo.setConstraint(state.transformConstraint);
|
|
2662
2763
|
const selectionController = createBabylonProjectionSelectionController({
|
|
@@ -2669,8 +2770,18 @@ async function createEditorWorld(state, options, renderUi, renderPreviewUi, upda
|
|
|
2669
2770
|
isLocked: nodeId => getLocalEditorEditingContext(state).isLocked(nodeId),
|
|
2670
2771
|
isOperationBlocked: () => state.gizmo?.getState().dragPhase === 'dragging',
|
|
2671
2772
|
onSelectionCommand(command) {
|
|
2672
|
-
|
|
2673
|
-
|
|
2773
|
+
const startedAt = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
2774
|
+
if (getLocalEditorEditingContext(state).dispatchSelection(command)) {
|
|
2775
|
+
publishLocalEditorSelectionPresentation(state, options, renderPreviewUi, 'viewport-selection-presentation');
|
|
2776
|
+
if (isLocalEditorSelectionDebugEnabled()) {
|
|
2777
|
+
console.info('[fps-editor:selection]', 'selection.presentation-published', {
|
|
2778
|
+
timestamp: readLocalEditorPerformanceTimestamp(),
|
|
2779
|
+
durationMs: Number(((typeof performance !== 'undefined' ? performance.now() : Date.now()) - startedAt).toFixed(2)),
|
|
2780
|
+
activeId: getCurrentPreviewSelection(state, options).activeId,
|
|
2781
|
+
selectedCount: getCurrentPreviewSelection(state, options).selectedIds.length,
|
|
2782
|
+
});
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2674
2785
|
},
|
|
2675
2786
|
onFocusIntent(nodeId) {
|
|
2676
2787
|
if (getLocalEditorEditingContext(state).focus(nodeId))
|
|
@@ -2890,6 +3001,7 @@ function disposeEditorWorld(state) {
|
|
|
2890
3001
|
clear();
|
|
2891
3002
|
});
|
|
2892
3003
|
run(() => clearPrefabStageForEditorTeardown(state));
|
|
3004
|
+
run(() => cancelScheduledSelectionInspectorRefresh(state));
|
|
2893
3005
|
state.activeTransformPreview = null;
|
|
2894
3006
|
disposeField(() => state.sceneViewInteraction, () => { state.sceneViewInteraction = null; });
|
|
2895
3007
|
if (state.resizeHandler) {
|
|
@@ -4380,16 +4492,58 @@ function createMarkerRelationVisibilityOptions(state) {
|
|
|
4380
4492
|
};
|
|
4381
4493
|
}
|
|
4382
4494
|
function syncTransformGizmoToSceneArtifacts(state, reason, revision = state.editorStateRevision, beginSync = true) {
|
|
4383
|
-
|
|
4495
|
+
const debugGizmo = typeof globalThis.location?.search === 'string'
|
|
4496
|
+
&& /(?:^|[?&])debugGizmo=(?:1|true)(?:&|$)/.test(globalThis.location.search);
|
|
4497
|
+
if (beginSync && !beginSceneArtifactSync(state, reason, revision)) {
|
|
4498
|
+
if (debugGizmo) {
|
|
4499
|
+
console.info('[fps-editor:gizmo]', 'harness.sync.skipped', {
|
|
4500
|
+
timestamp: typeof performance !== 'undefined' ? Number(performance.now().toFixed(2)) : Date.now(),
|
|
4501
|
+
reason,
|
|
4502
|
+
revision,
|
|
4503
|
+
sceneArtifactRevision: state.sceneArtifactRevision,
|
|
4504
|
+
});
|
|
4505
|
+
}
|
|
4384
4506
|
return;
|
|
4507
|
+
}
|
|
4385
4508
|
const gizmo = state.gizmo;
|
|
4509
|
+
if (debugGizmo) {
|
|
4510
|
+
console.info('[fps-editor:gizmo]', 'harness.sync.started', {
|
|
4511
|
+
timestamp: typeof performance !== 'undefined' ? Number(performance.now().toFixed(2)) : Date.now(),
|
|
4512
|
+
reason,
|
|
4513
|
+
revision,
|
|
4514
|
+
transformTool: state.transformTool,
|
|
4515
|
+
transformSpace: state.transformSpace,
|
|
4516
|
+
transformConstraint: state.transformConstraint,
|
|
4517
|
+
gizmoState: gizmo?.getState() ?? null,
|
|
4518
|
+
});
|
|
4519
|
+
}
|
|
4386
4520
|
if (gizmo) {
|
|
4387
|
-
gizmo.
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4521
|
+
const current = gizmo.getState();
|
|
4522
|
+
let attachmentReconciled = false;
|
|
4523
|
+
if (current.tool !== state.transformTool) {
|
|
4524
|
+
gizmo.setTool(state.transformTool);
|
|
4525
|
+
attachmentReconciled = true;
|
|
4526
|
+
}
|
|
4527
|
+
if (current.space !== state.transformSpace) {
|
|
4528
|
+
gizmo.setSpace(state.transformSpace);
|
|
4529
|
+
attachmentReconciled = true;
|
|
4530
|
+
}
|
|
4531
|
+
if (current.constraint !== state.transformConstraint) {
|
|
4532
|
+
gizmo.setConstraint(state.transformConstraint);
|
|
4533
|
+
attachmentReconciled = true;
|
|
4534
|
+
}
|
|
4535
|
+
if (!attachmentReconciled)
|
|
4536
|
+
gizmo.refreshSelection();
|
|
4391
4537
|
}
|
|
4392
4538
|
requestEditorArtifactRevealFrame(state, reason);
|
|
4539
|
+
if (debugGizmo) {
|
|
4540
|
+
console.info('[fps-editor:gizmo]', 'harness.sync.completed', {
|
|
4541
|
+
timestamp: typeof performance !== 'undefined' ? Number(performance.now().toFixed(2)) : Date.now(),
|
|
4542
|
+
reason,
|
|
4543
|
+
gizmoState: gizmo?.getState() ?? null,
|
|
4544
|
+
revealFrameRequested: !!state.viewportRenderCoordinator,
|
|
4545
|
+
});
|
|
4546
|
+
}
|
|
4393
4547
|
}
|
|
4394
4548
|
function syncTransformOperationSettingsToSceneArtifacts(state, reason, revision = state.editorStateRevision) {
|
|
4395
4549
|
if (!beginSceneArtifactSync(state, reason, revision))
|
|
@@ -8375,7 +8529,7 @@ function resolveHierarchyReparentInvocation(snapshot, invocation, resolveTarget)
|
|
|
8375
8529
|
...(resolveAnchor(invocation.input?.afterId) !== undefined ? { afterId: resolveAnchor(invocation.input?.afterId) } : {}),
|
|
8376
8530
|
});
|
|
8377
8531
|
}
|
|
8378
|
-
export function createLocalEditorHarnessHierarchyScopeProvider(state, options, render, adapter, executorStates = new WeakMap()) {
|
|
8532
|
+
export function createLocalEditorHarnessHierarchyScopeProvider(state, options, render, adapter, executorStates = new WeakMap(), renderSelection = render) {
|
|
8379
8533
|
assertUniqueHierarchyOperationContributionIds(options.hierarchy?.operations ?? []);
|
|
8380
8534
|
let treeCache = null;
|
|
8381
8535
|
let cachedSession = null;
|
|
@@ -8414,7 +8568,7 @@ export function createLocalEditorHarnessHierarchyScopeProvider(state, options, r
|
|
|
8414
8568
|
return validated;
|
|
8415
8569
|
const changed = adapter.applySelection(input, validated);
|
|
8416
8570
|
if (changed)
|
|
8417
|
-
|
|
8571
|
+
renderSelection();
|
|
8418
8572
|
const current = getSnapshot();
|
|
8419
8573
|
const selection = adapter.getSelection();
|
|
8420
8574
|
const selectionMatches = sameHierarchySelection(selection.selectedIds, input.selectedIds)
|
|
@@ -9032,6 +9186,7 @@ function createUiState(state, options, hierarchySnapshot, toolManager) {
|
|
|
9032
9186
|
summary: state.summary,
|
|
9033
9187
|
assetFilter: state.assetFilter,
|
|
9034
9188
|
assets,
|
|
9189
|
+
projectFiles: state.projectFiles ?? undefined,
|
|
9035
9190
|
selectedAssetId: state.selectedAssetId,
|
|
9036
9191
|
assetCountLabel: `${assets.length} assets`,
|
|
9037
9192
|
selectedIds,
|
|
@@ -9042,6 +9197,7 @@ function createUiState(state, options, hierarchySnapshot, toolManager) {
|
|
|
9042
9197
|
},
|
|
9043
9198
|
inspectorObject: previewInspectorObject,
|
|
9044
9199
|
inspectorMultiObject: previewInspectorMultiObject,
|
|
9200
|
+
inspectorPending: false,
|
|
9045
9201
|
renderingPanel: document
|
|
9046
9202
|
? options.documentAdapter.getRenderingPanelState?.(document, {
|
|
9047
9203
|
scene: state.world?.scene ?? null,
|
|
@@ -9145,7 +9301,7 @@ function createLocalEditorContextActions(state) {
|
|
|
9145
9301
|
}),
|
|
9146
9302
|
]);
|
|
9147
9303
|
}
|
|
9148
|
-
function createBrowserPrefabStageState(state, options, document) {
|
|
9304
|
+
function createBrowserPrefabStageState(state, options, document, includeInspector = true) {
|
|
9149
9305
|
const stage = state.prefabStage;
|
|
9150
9306
|
if (!stage || !document)
|
|
9151
9307
|
return null;
|
|
@@ -9153,7 +9309,9 @@ function createBrowserPrefabStageState(state, options, document) {
|
|
|
9153
9309
|
const cachedStructure = getCachedLocalEditorPrefabStageStructure(state, options, document, descriptor);
|
|
9154
9310
|
const context = cachedStructure.context;
|
|
9155
9311
|
const structureItems = cachedStructure.items;
|
|
9156
|
-
const inspectorObject =
|
|
9312
|
+
const inspectorObject = includeInspector
|
|
9313
|
+
? options.documentAdapter.getPrefabStageInspectorObject?.(document, descriptor, stage.selectedItemId, context) ?? null
|
|
9314
|
+
: null;
|
|
9157
9315
|
const transactionSnapshot = stage.transaction.snapshot();
|
|
9158
9316
|
return {
|
|
9159
9317
|
assetId: descriptor.assetId,
|
|
@@ -9618,6 +9776,135 @@ function getScopedPreviewSelectionForUiState(state, _options, _fallbackSelection
|
|
|
9618
9776
|
function getCurrentPreviewSelection(state, options) {
|
|
9619
9777
|
return getScopedPreviewSelectionForUiState(state, options, state.session?.getState({ cloneDocuments: false }).selection ?? EMPTY_EDITOR_SELECTION);
|
|
9620
9778
|
}
|
|
9779
|
+
function createUiToolPresentationPreviewState(state, snapshot) {
|
|
9780
|
+
return {
|
|
9781
|
+
tools: snapshot.tools,
|
|
9782
|
+
activeToolId: snapshot.activeToolId,
|
|
9783
|
+
transformTool: {
|
|
9784
|
+
activeTool: state.transformTool,
|
|
9785
|
+
activeSpace: state.transformSpace,
|
|
9786
|
+
activeConstraint: state.transformConstraint,
|
|
9787
|
+
dragPhase: state.gizmo?.getState().dragPhase ?? 'idle',
|
|
9788
|
+
draggingNodeId: state.gizmo?.getState().draggingNodeId ?? null,
|
|
9789
|
+
},
|
|
9790
|
+
};
|
|
9791
|
+
}
|
|
9792
|
+
function publishLocalEditorSelectionPresentation(state, options, renderPreviewUi, reason) {
|
|
9793
|
+
syncViewportSpatialOverlay(state, options);
|
|
9794
|
+
renderPreviewUi(createUiSelectionPresentationPreviewState(state, options));
|
|
9795
|
+
requestEditorSceneFrame(state, reason);
|
|
9796
|
+
scheduleSelectionInspectorRefresh(state, options, renderPreviewUi);
|
|
9797
|
+
}
|
|
9798
|
+
function createUiSelectionPresentationPreviewState(state, options) {
|
|
9799
|
+
const selection = getCurrentPreviewSelection(state, options);
|
|
9800
|
+
const selectedIds = [...selection.selectedIds];
|
|
9801
|
+
const activeId = selection.activeId;
|
|
9802
|
+
const transformSelectionIsLarge = isLargeSelection(selectedIds);
|
|
9803
|
+
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
9804
|
+
return {
|
|
9805
|
+
selectedIds,
|
|
9806
|
+
activeId,
|
|
9807
|
+
selectionSummary: {
|
|
9808
|
+
count: selectedIds.length,
|
|
9809
|
+
activeId,
|
|
9810
|
+
},
|
|
9811
|
+
inspectorPending: true,
|
|
9812
|
+
transformOperations: {
|
|
9813
|
+
settings: cloneTransformOperationSettings(getScopedTransformOperationSettings(state)),
|
|
9814
|
+
selectedCount: selectedIds.length,
|
|
9815
|
+
activeId,
|
|
9816
|
+
canAlign: !transformSelectionIsLarge && selectedIds.length >= 2 && activeId != null
|
|
9817
|
+
&& isLocalEditorEditingCapabilityEnabled(state, LOCAL_EDITOR_EDITING_CAPABILITIES.transformActions),
|
|
9818
|
+
canDistribute: !transformSelectionIsLarge && selectedIds.length >= 3
|
|
9819
|
+
&& isLocalEditorEditingCapabilityEnabled(state, LOCAL_EDITOR_EDITING_CAPABILITIES.transformActions),
|
|
9820
|
+
},
|
|
9821
|
+
viewportSpatialOverlay: cloneEditorViewportSpatialOverlayState(state.viewportSpatialOverlay),
|
|
9822
|
+
...(state.prefabStage
|
|
9823
|
+
? { prefabStage: createBrowserPrefabStageState(state, options, document, false) }
|
|
9824
|
+
: {}),
|
|
9825
|
+
};
|
|
9826
|
+
}
|
|
9827
|
+
function createUiSelectionInspectorPreviewState(state, options) {
|
|
9828
|
+
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
9829
|
+
if (!document) {
|
|
9830
|
+
return {
|
|
9831
|
+
inspectorObject: null,
|
|
9832
|
+
inspectorMultiObject: null,
|
|
9833
|
+
inspectorPending: false,
|
|
9834
|
+
...(state.prefabStage ? { prefabStage: null } : {}),
|
|
9835
|
+
};
|
|
9836
|
+
}
|
|
9837
|
+
if (state.prefabStage) {
|
|
9838
|
+
const prefabStage = createBrowserPrefabStageState(state, options, document);
|
|
9839
|
+
return {
|
|
9840
|
+
prefabStage,
|
|
9841
|
+
inspectorObject: prefabStage?.inspectorObject ?? null,
|
|
9842
|
+
inspectorMultiObject: null,
|
|
9843
|
+
inspectorPending: false,
|
|
9844
|
+
};
|
|
9845
|
+
}
|
|
9846
|
+
const editingContext = getLocalEditorEditingContext(state);
|
|
9847
|
+
return {
|
|
9848
|
+
inspectorObject: editingContext.getInspectorObject(document),
|
|
9849
|
+
inspectorMultiObject: editingContext.getInspectorMultiObject(document),
|
|
9850
|
+
inspectorPending: false,
|
|
9851
|
+
};
|
|
9852
|
+
}
|
|
9853
|
+
function cancelScheduledSelectionInspectorRefresh(state) {
|
|
9854
|
+
state.selectionInspectorRefreshGeneration += 1;
|
|
9855
|
+
if (state.selectionInspectorRefreshFrame !== null) {
|
|
9856
|
+
globalThis.cancelAnimationFrame?.(state.selectionInspectorRefreshFrame);
|
|
9857
|
+
state.selectionInspectorRefreshFrame = null;
|
|
9858
|
+
}
|
|
9859
|
+
if (state.selectionInspectorRefreshTimeout !== null) {
|
|
9860
|
+
globalThis.clearTimeout(state.selectionInspectorRefreshTimeout);
|
|
9861
|
+
state.selectionInspectorRefreshTimeout = null;
|
|
9862
|
+
}
|
|
9863
|
+
}
|
|
9864
|
+
function scheduleSelectionInspectorRefresh(state, options, renderPreviewUi) {
|
|
9865
|
+
cancelScheduledSelectionInspectorRefresh(state);
|
|
9866
|
+
const generation = state.selectionInspectorRefreshGeneration;
|
|
9867
|
+
const publish = () => {
|
|
9868
|
+
state.selectionInspectorRefreshTimeout = null;
|
|
9869
|
+
if (generation !== state.selectionInspectorRefreshGeneration || !state.world)
|
|
9870
|
+
return;
|
|
9871
|
+
const startedAt = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
9872
|
+
const preview = createUiSelectionInspectorPreviewState(state, options);
|
|
9873
|
+
const stateReadyAt = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
9874
|
+
renderPreviewUi(preview);
|
|
9875
|
+
if (isLocalEditorSelectionDebugEnabled()) {
|
|
9876
|
+
const completedAt = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
9877
|
+
console.info('[fps-editor:selection]', 'selection.inspector-published', {
|
|
9878
|
+
timestamp: readLocalEditorPerformanceTimestamp(),
|
|
9879
|
+
stateBuildMs: Number((stateReadyAt - startedAt).toFixed(2)),
|
|
9880
|
+
renderMs: Number((completedAt - stateReadyAt).toFixed(2)),
|
|
9881
|
+
durationMs: Number((completedAt - startedAt).toFixed(2)),
|
|
9882
|
+
generation,
|
|
9883
|
+
});
|
|
9884
|
+
}
|
|
9885
|
+
};
|
|
9886
|
+
const deferUntilAfterFrame = () => {
|
|
9887
|
+
state.selectionInspectorRefreshFrame = null;
|
|
9888
|
+
if (generation !== state.selectionInspectorRefreshGeneration || !state.world)
|
|
9889
|
+
return;
|
|
9890
|
+
state.selectionInspectorRefreshTimeout = globalThis.setTimeout(publish, 0);
|
|
9891
|
+
};
|
|
9892
|
+
if (typeof globalThis.requestAnimationFrame === 'function') {
|
|
9893
|
+
state.selectionInspectorRefreshFrame = globalThis.requestAnimationFrame(deferUntilAfterFrame);
|
|
9894
|
+
}
|
|
9895
|
+
else {
|
|
9896
|
+
state.selectionInspectorRefreshTimeout = globalThis.setTimeout(publish, 0);
|
|
9897
|
+
}
|
|
9898
|
+
}
|
|
9899
|
+
function isLocalEditorSelectionDebugEnabled() {
|
|
9900
|
+
return typeof globalThis.location?.search === 'string'
|
|
9901
|
+
&& /(?:^|[?&])debug(?:Gizmo|Selection)=(?:1|true)(?:&|$)/.test(globalThis.location.search);
|
|
9902
|
+
}
|
|
9903
|
+
function readLocalEditorPerformanceTimestamp() {
|
|
9904
|
+
return typeof performance !== 'undefined'
|
|
9905
|
+
? Number(performance.now().toFixed(2))
|
|
9906
|
+
: Date.now();
|
|
9907
|
+
}
|
|
9621
9908
|
function createUiPreviewState(state, options) {
|
|
9622
9909
|
const sessionState = state.session?.getState({ cloneDocuments: false });
|
|
9623
9910
|
const selection = sessionState?.selection;
|
|
@@ -10385,12 +10672,14 @@ function toBrowserAssetItem(options, asset) {
|
|
|
10385
10672
|
?? {
|
|
10386
10673
|
id: asset.assetId ?? asset.id,
|
|
10387
10674
|
label: asset.displayName ?? asset.label,
|
|
10675
|
+
relativePath: asset.relativePath,
|
|
10388
10676
|
guid: asset.guid,
|
|
10389
10677
|
assetId: asset.assetId,
|
|
10390
10678
|
kind: asset.kind,
|
|
10391
10679
|
external: asset.external,
|
|
10392
10680
|
origin: asset.origin,
|
|
10393
10681
|
dedupeKey: asset.dedupeKey,
|
|
10682
|
+
contentHash: asset.contentHash,
|
|
10394
10683
|
placeable: asset.placeable,
|
|
10395
10684
|
preview: asset.preview,
|
|
10396
10685
|
material: asset.material,
|