@volter/editor-game 0.5.66 → 0.5.67
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/contributions/audio-unlock.service.ts +2 -2
- package/contributions/autoplay.service.ts +1 -1
- package/contributions/bridge.command.ts +3 -3
- package/contributions/canvas/component-board.service.ts +16 -0
- package/contributions/canvas/design-time-mount.service.ts +45 -0
- package/contributions/canvas-story-capture.service.ts +12 -0
- package/contributions/edit-mode-audio.service.ts +2 -2
- package/contributions/edit-mode-networking.service.ts +1 -1
- package/contributions/gameplay.command.ts +4 -4
- package/contributions/generation.service.ts +1 -1
- package/contributions/godot.style.ts +26 -6
- package/contributions/godot.view.ts +6 -0
- package/contributions/ingest.service.ts +2 -2
- package/contributions/instances.command.ts +1 -1
- package/contributions/navmesh.menu.ts +1 -1
- package/contributions/network-observer.service.ts +14 -0
- package/contributions/play.command.ts +10 -4
- package/contributions/react/component-board.service.ts +1 -1
- package/contributions/react/design-time-mount.service.ts +1 -1
- package/contributions/scene-document.service.ts +3 -3
- package/contributions/state-watch.menu.ts +1 -1
- package/contributions/state-watch.utility.tsx +1 -1
- package/contributions/team-playtest.service.ts +4 -4
- package/contributions/three/component-board.service.ts +1 -1
- package/contributions/three/component-verbs.command.ts +6 -6
- package/contributions/three/three-authoring.service.ts +8 -5
- package/contributions/three-story-capture.service.ts +12 -0
- package/contributions/unity.style.ts +17 -7
- package/contributions/unity.view.ts +6 -0
- package/contributions/unreal.style.ts +10 -2
- package/contributions/unreal.view.ts +5 -0
- package/package.json +20 -10
- package/src/asset-budget/AssetBudgetPanel.tsx +1 -1
- package/src/asset-budget/asset-budget-model.ts +1 -1
- package/src/audio/AudioDebuggerPanel.tsx +1 -1
- package/src/bridge/dispatch.ts +14 -14
- package/src/bridge/live-frames.ts +1 -1
- package/src/bridge/screenshot.ts +3 -3
- package/src/build/BuildProfilesPanel.tsx +3 -3
- package/src/canvas/canvas-board/CanvasBoardDocument.tsx +676 -0
- package/src/canvas/canvas-board/canvas-board-model.ts +407 -0
- package/src/canvas/canvas-board/canvas-component-board.ts +56 -0
- package/src/canvas/canvas-design-mount.ts +524 -0
- package/src/canvas/design-time-canvas-mount.ts +79 -0
- package/src/coverage/live-authoring-surface.ts +5 -5
- package/src/coverage/live-project-verbs.ts +1 -1
- package/src/coverage/native-system-coverage.ts +5 -5
- package/src/coverage/root-coverage.ts +1 -1
- package/src/coverage/session-coverage.ts +3 -3
- package/src/design-system-stories/ApplicationChrome.stories.tsx +5 -5
- package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +7 -7
- package/src/edit-mode/edit-mode-audio.ts +4 -4
- package/src/edit-mode/edit-mode-networking.ts +2 -2
- package/src/game-document/GameCaptureFrameButton.tsx +1 -1
- package/src/game-document/GameDocument.tsx +2 -2
- package/src/game-document/GamePanel.tsx +4 -4
- package/src/game-document/InstanceInspectorPicker.tsx +2 -2
- package/src/game-document/crowd-debug.ts +1 -1
- package/src/game-document/device-preview.ts +10 -11
- package/src/game-document/physics-debug.ts +1 -1
- package/src/generation/GenerationActivity.tsx +3 -3
- package/src/generation/generation-documents.tsx +5 -5
- package/src/generation/generation-jobs.ts +1 -1
- package/src/host/adapter-runtime-bindings.ts +96 -5
- package/src/host/authoring/babylon-authoring-adapter.ts +6 -6
- package/src/host/authoring/gesture-persist.ts +1 -1
- package/src/host/authoring/ingest-data-writer.ts +1 -1
- package/src/host/authoring/ingest-source-persistence.ts +4 -4
- package/src/host/authoring/mounted-authoring.ts +4 -4
- package/src/host/authoring/phaser-live-authoring-adapter.ts +4 -4
- package/src/host/authoring/pixi-authoring-adapter.ts +40 -15
- package/src/host/authoring/pixi-creation-site-write-target.ts +2 -2
- package/src/host/authoring/pixi-live-write-target.ts +4 -4
- package/src/host/authoring/pixi-source-identity.ts +3 -3
- package/src/host/authoring/pixi-source-write-target.ts +1614 -0
- package/src/host/authoring/pixi-still-presentation.ts +1 -1
- package/src/host/authoring/pixi-structure-history.ts +2 -2
- package/src/host/authoring/pixi-transform-channels.ts +16 -14
- package/src/host/authoring/source-persistence-backend.ts +3 -3
- package/src/host/authoring/struct-write-pipe.ts +1 -1
- package/src/host/binding-resolver.ts +8 -9
- package/src/host/browser-transpile.ts +1 -1
- package/src/host/canvas-entry-runtime.ts +58 -47
- package/src/host/canvas-preview-frames.ts +482 -0
- package/src/host/components/CameraAuthoringOverlay.tsx +1 -1
- package/src/host/components/HeaderTelemetry.tsx +4 -4
- package/src/host/components/PixiIsolationSceneContent.tsx +10 -10
- package/src/host/components/ThreeIsolationSceneContent.tsx +3 -3
- package/src/host/components/frame-debugger-model.ts +2 -2
- package/src/host/components/header-telemetry-model.ts +2 -2
- package/src/host/components/scene-document.tsx +14 -14
- package/src/host/components/utility-view-state.ts +1 -1
- package/src/host/components/world-root-stage-binding.tsx +12 -12
- package/src/host/components/world-root-stage.ts +70 -49
- package/src/host/coverage/system-adapter-coverage.ts +3 -4
- package/src/host/design-system-stories/fixtures/editor-runtime.tsx +9 -11
- package/src/host/document-preview-three.ts +1 -1
- package/src/host/entry-adjudication.ts +6 -6
- package/src/host/game-css-scope-transform.ts +4 -0
- package/src/host/game-realm-page.ts +1 -1
- package/src/host/gameplay-export.ts +25 -14
- package/src/host/gameplay-recording.ts +5 -5
- package/src/host/gated-globals.ts +2 -2
- package/src/host/history/json-history-resource.ts +1 -1
- package/src/host/projection/pixi.ts +24 -2
- package/src/host/r3f-entry-runtime.ts +65 -34
- package/src/host/react-mount-runtime.ts +7 -48
- package/src/host/realm-services.ts +1 -1
- package/src/host/roots/canvas-root.tsx +361 -0
- package/src/host/roots/r3f-root.tsx +473 -0
- package/src/host/roots/react-root.ts +9 -43
- package/src/host/served-bundle-runtime-modules.ts +1 -19
- package/src/host/server-log-bridge.ts +2 -2
- package/src/host/stories/mounted-story-viewport-source.ts +1 -1
- package/src/host/stories/pixi-story-model.ts +30 -0
- package/src/host/stories/story-media-captures.ts +46 -0
- package/src/host/stories/story-media-presence.ts +3 -3
- package/src/host/stories/story-pixi-preview.ts +408 -0
- package/src/host/stories/story-three-preview.ts +806 -0
- package/src/host/stories/three-story-captures.ts +35 -0
- package/src/host/story-three-preview-runtime.ts +56 -0
- package/src/host/use-active-performance-source.ts +2 -2
- package/src/host/viewport-pose-memory.ts +1 -1
- package/src/host/viewport-root-presentation.ts +6 -5
- package/src/ingest/active-ingest.ts +1 -1
- package/src/ingest/authoring/ingest-dom-surface-authoring.ts +4 -4
- package/src/ingest/authoring/ingest-root-adapter.ts +8 -8
- package/src/ingest/deferred-ingest-play.ts +6 -6
- package/src/ingest/discovery-public-ingest.ts +2 -2
- package/src/ingest/ingest-boot-viewport.ts +2 -2
- package/src/ingest/ingest-canvas-scene-document.tsx +8 -8
- package/src/ingest/ingest-canvas-scene.ts +3 -3
- package/src/ingest/ingest-evidence-hook.ts +1 -1
- package/src/ingest/ingest-frame-snapshot.ts +1 -1
- package/src/ingest/ingest-play-control.ts +1 -1
- package/src/ingest/ingest-render-debug.ts +10 -10
- package/src/ingest/ingest-siblings.ts +13 -25
- package/src/ingest/module-mode.ts +14 -14
- package/src/ingest/mount-canvas-ingest-root.ts +21 -21
- package/src/ingest/mount-coverage.ts +2 -2
- package/src/ingest/mount-dom-ingest-root.ts +11 -11
- package/src/ingest/mount-ingest-root.ts +8 -8
- package/src/ingest/mount-three-ingest-root.ts +8 -8
- package/src/ingest/resolve-canvas.ts +1 -1
- package/src/ingest/served-html-boot.ts +1 -1
- package/src/ingest/surface-canvas.ts +1 -1
- package/src/ingest/unmount-ingest-root.ts +5 -5
- package/src/navmesh/navmesh-handler.ts +24 -16
- package/src/network/NetworkInspectorPanel.tsx +449 -14
- package/src/network/network-inspector-model.ts +14 -2
- package/src/play/play-log-events.ts +1 -1
- package/src/play/play-mode.ts +76 -133
- package/src/play/play-recording.ts +1 -1
- package/src/play/react-play-live-authoring.ts +3 -3
- package/src/play/run-selection.ts +93 -0
- package/src/play-bar/PlayBar.tsx +20 -39
- package/src/profiler/FrameDebuggerPanel.tsx +1 -1
- package/src/profiler/PerformancePanel.tsx +3 -3
- package/src/react/design-time-react-mount.ts +23 -65
- package/src/react/dom-authoring-adapter.ts +9 -9
- package/src/react/react-inspector-section.tsx +5 -5
- package/src/react/react-world-authoring-adapter.ts +11 -11
- package/src/react/story-documents/story-documents.tsx +9 -9
- package/src/react/ui-board-document.tsx +7 -7
- package/src/react/ui-component-board.ts +2 -2
- package/src/runtime/adapter/audio-meter.ts +21 -0
- package/src/runtime/adapter/first-party-audio-system.ts +230 -0
- package/src/runtime/adapter/ingest/contract-debug-adapter.ts +114 -0
- package/src/runtime/adapter/ingest/contract-system-adapters.ts +256 -0
- package/src/runtime/adapter/ingest/merge-debug-adapters.ts +197 -0
- package/src/runtime/adapter/ingest/observation-debug-adapter.ts +162 -0
- package/src/runtime/adapter/ingest/upstream-pin.ts +51 -0
- package/src/runtime/adapter/native-debug-module.ts +498 -0
- package/src/runtime/audio/bus-mixer.ts +161 -0
- package/src/runtime/audio/pose-guard.ts +80 -0
- package/src/runtime/core/frame-pacing.ts +126 -0
- package/src/runtime/core/game-loop.ts +225 -0
- package/src/runtime/core/game-scoped-slot.ts +28 -0
- package/src/runtime/core/seeded-random.ts +162 -0
- package/src/runtime/core/sim-clock.ts +391 -0
- package/src/runtime/core/system-runner.ts +269 -0
- package/src/runtime/core/types.ts +104 -0
- package/src/runtime/create-runtime.ts +1128 -0
- package/src/runtime/debug-bridge.ts +570 -0
- package/src/runtime/debug-registry.ts +899 -0
- package/src/runtime/dev/chrome-trace.ts +153 -0
- package/src/runtime/dev/instruments.ts +403 -0
- package/src/runtime/dev/logger.ts +119 -0
- package/src/runtime/dev/performance-profiler.ts +367 -0
- package/src/runtime/dev/register-render-vitals.ts +276 -0
- package/src/runtime/dev/render-census.ts +354 -0
- package/src/runtime/dev/render-debug-adapter.ts +218 -0
- package/src/runtime/dev/render-memory.ts +226 -0
- package/src/runtime/dev/render-vitals.ts +338 -0
- package/src/runtime/dev/static-batch-advisor.ts +188 -0
- package/src/runtime/dev/webgl-frame-capture.ts +366 -0
- package/src/runtime/dev/webgl-gpu-timer.ts +53 -0
- package/src/runtime/dev-build.ts +47 -0
- package/src/runtime/game.ts +1636 -0
- package/src/runtime/gameplay-rng-trap.ts +135 -0
- package/src/runtime/host-context.ts +64 -0
- package/src/runtime/input-router.ts +169 -0
- package/src/runtime/mount-manifest.ts +480 -0
- package/src/runtime/pixi/authoring.ts +706 -0
- package/src/runtime/pixi/ingest.ts +116 -0
- package/src/runtime/pixi/physics-registry.ts +49 -0
- package/src/runtime/pixi/render-pass-bracket.ts +117 -0
- package/src/runtime/pixi/scene-capture.ts +179 -0
- package/src/runtime/pixi/system-adapters.ts +69 -0
- package/src/runtime/playtest.ts +22 -0
- package/src/runtime/presentation.ts +141 -0
- package/src/runtime/render-control.ts +642 -0
- package/src/runtime/render-seed.ts +77 -0
- package/src/runtime/run-ticks-settled.ts +73 -0
- package/src/runtime/setup/setup-audio.ts +72 -0
- package/src/services/audio-pose-guard.ts +2 -2
- package/src/services/game-audio.ts +152 -0
- package/src/services/game-network.ts +657 -0
- package/src/services/game-physics.ts +334 -0
- package/src/state-watch/StateWatchPanel.tsx +1 -1
- package/src/three/authoring/camera-runtime-inspector-section.tsx +3 -2
- package/src/three/authoring/constraint-inspector-section.tsx +6 -5
- package/src/three/authoring/model-asset-inspector-section.tsx +7 -6
- package/src/three/authoring/oid-source-persistence.ts +7 -7
- package/src/three/authoring/r3f-design-session.ts +58 -54
- package/src/three/authoring/r3f-source-authoring-adapter.ts +95 -91
- package/src/three/authoring/reflection-probe-inspector-section.tsx +3 -2
- package/src/three/authoring/three-authoring-adapter.ts +29 -29
- package/src/three/component-verbs/extract-menu.ts +7 -6
- package/src/three/component-verbs/fork-menu.ts +7 -6
- package/src/three/component-verbs/internals-menu.ts +2 -2
- package/src/three/story-documents/three-story-documents.tsx +13 -13
- package/src/three/three-board/ThreeBoardDocument.tsx +13 -12
- package/src/three/three-board/board-scene.ts +6 -6
- package/src/three/three-board/three-component-board.ts +2 -2
- package/src/services/game-audio-unlock.ts +0 -48
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* subject, and it is the HUMAN-facing sentence that has to be a union.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
import { mountedRootSubjects } from '@volter/editor-
|
|
32
|
+
import { mountedRootSubjects } from '@volter/editor-sdk/kit/authoring/mounted-root-subjects';
|
|
33
33
|
import {
|
|
34
34
|
type CoveragePart,
|
|
35
35
|
formatCapabilityCoverageBlocks,
|
|
@@ -37,8 +37,8 @@ import {
|
|
|
37
37
|
} from '../host/coverage/capability-coverage';
|
|
38
38
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
39
39
|
import { editorIsPlaying } from '@volter/editor-sdk/kit/editor-session-mode';
|
|
40
|
-
import { projectAdapterFacet } from '@volter/editor-
|
|
41
|
-
import { getCurrentProject } from '@volter/editor-
|
|
40
|
+
import { projectAdapterFacet } from '@volter/editor-sdk/kit/project-adapter';
|
|
41
|
+
import { getCurrentProject } from '@volter/editor-sdk/kit/active-project';
|
|
42
42
|
import { authoringSurfaceCoverage } from './live-authoring-surface';
|
|
43
43
|
import { projectVerbCoverage } from './live-project-verbs';
|
|
44
44
|
import { nativeSystemCoverage } from './native-system-coverage';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ensureCoreUtilitiesRegistered } from '@volter/editor-
|
|
2
|
-
import { ProjectHeader } from '@volter/editor-
|
|
3
|
-
import { ensureCoreStatusContributionsRegistered } from '@volter/editor-
|
|
1
|
+
import { ensureCoreUtilitiesRegistered } from '@volter/editor-sdk/kit/components/core-utilities';
|
|
2
|
+
import { ProjectHeader } from '@volter/editor-sdk/kit/components/ProjectHeader';
|
|
3
|
+
import { ensureCoreStatusContributionsRegistered } from '@volter/editor-sdk/kit/components/status-contributions';
|
|
4
4
|
import {
|
|
5
5
|
installStoryWorkspaceUtilityController,
|
|
6
6
|
StoryEditorRuntime,
|
|
7
7
|
} from '../host/design-system-stories/fixtures/editor-runtime';
|
|
8
8
|
import { DesignSystemPage, StorySection } from '../host/design-system-stories/StoryLayout';
|
|
9
|
-
import { useEditorStore } from '@volter/editor-
|
|
10
|
-
import { getCurrentProject, setActiveProject } from '@volter/editor-
|
|
9
|
+
import { useEditorStore } from '@volter/editor-sdk/kit/editor-runtime';
|
|
10
|
+
import { getCurrentProject, setActiveProject } from '@volter/editor-sdk/kit/active-project';
|
|
11
11
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
12
12
|
import { useLayoutEffect, useState } from 'react';
|
|
13
13
|
// The transport is `@volter/editor-game`'s; this gallery story shows its view over
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
import { UNCAPTURED_REACH } from '../host/adapter-reach';
|
|
30
|
-
import { SourceObject3DAuthoringAdapter } from '@volter/editor-
|
|
30
|
+
import { SourceObject3DAuthoringAdapter } from '@volter/editor-threejs/kit/authoring/source-object3d-authoring-adapter';
|
|
31
31
|
import { faPalette } from '@fortawesome/free-solid-svg-icons';
|
|
32
32
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
33
33
|
import { type ReactNode, useState } from 'react';
|
|
34
34
|
import * as THREE from 'three';
|
|
35
35
|
// Side-effect: registers the model-asset section contributions (Geometry,
|
|
36
36
|
// Animation, Materials, Source) into the inspector-section registry.
|
|
37
|
-
import '
|
|
37
|
+
import '../three/authoring/model-asset-inspector-section';
|
|
38
38
|
import { ingestCoverageSection } from '@volter/editor-sdk/kit/CapabilityCoverageSection';
|
|
39
|
-
import { InspectionProjectionView } from '@volter/editor-
|
|
40
|
-
import { AuthoringInspectorSurface } from '@volter/editor-
|
|
39
|
+
import { InspectionProjectionView } from '@volter/editor-sdk/kit/components/InspectionProjection';
|
|
40
|
+
import { AuthoringInspectorSurface } from '@volter/editor-sdk/kit/components/Inspector';
|
|
41
41
|
import { deriveCapabilityCoverage } from '../host/coverage/capability-coverage';
|
|
42
42
|
import { createAuthoringFixture } from '../host/design-system-stories/fixtures/authoring';
|
|
43
43
|
import { StoryEditorRuntime, storyThreeStore } from '../host/design-system-stories/fixtures/editor-runtime';
|
|
@@ -268,7 +268,7 @@ const coverageSubject = columnSubject({
|
|
|
268
268
|
|
|
269
269
|
/** A real THREE model scene → the source-object3d model adapter, the same
|
|
270
270
|
* fixture the model-asset workflow exercises. */
|
|
271
|
-
function buildModelAdapter(store:
|
|
271
|
+
function buildModelAdapter(store: ConstructorParameters<typeof SourceObject3DAuthoringAdapter>[0]) {
|
|
272
272
|
const scene = new THREE.Scene();
|
|
273
273
|
const root = new THREE.Group();
|
|
274
274
|
root.name = 'Ship';
|
|
@@ -329,7 +329,7 @@ export const TypedThreeGroupsColumn: Story = {
|
|
|
329
329
|
{(runtime) => (
|
|
330
330
|
<RailColumn>
|
|
331
331
|
<AuthoringInspectorSurface
|
|
332
|
-
store={
|
|
332
|
+
store={runtime.store}
|
|
333
333
|
adapter={adapter}
|
|
334
334
|
documentSelection={{ adapter, nodeId: 'player' }}
|
|
335
335
|
presentation="column"
|
|
@@ -352,7 +352,7 @@ export const ModelAssetColumn: Story = {
|
|
|
352
352
|
return (
|
|
353
353
|
<RailColumn>
|
|
354
354
|
<AuthoringInspectorSurface
|
|
355
|
-
store={
|
|
355
|
+
store={runtime.store}
|
|
356
356
|
adapter={adapter}
|
|
357
357
|
documentSelection={{ adapter, nodeId: adapter.documentId }}
|
|
358
358
|
presentation="column"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* while Play is active; on Stop, `getActiveAudio()` falls back to this graph.
|
|
7
7
|
*
|
|
8
8
|
* It lives in `@volter/editor-game` because it IS the engine's audio runtime — the
|
|
9
|
-
* mixer, the bus graph and the pose guard behind `@volter/game
|
|
9
|
+
* mixer, the bus graph and the pose guard behind `@volter/editor-game/runtime/setup/setup-audio` —
|
|
10
10
|
* and the host was installing all of it at boot for every project, including a
|
|
11
11
|
* models project that plays nothing and has no sound (WORK.md §The open-source
|
|
12
12
|
* launch, phase 1 unit 7). The one host surface that reads it, the header
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
* unit 2. Same shape as `edit-mode-networking.ts` beside it.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { setEditModeAudio } from '@volter/editor-
|
|
18
|
+
import { setEditModeAudio } from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
19
19
|
import {
|
|
20
20
|
createAudioSystemAdapter,
|
|
21
21
|
releaseAudioMeters,
|
|
22
|
-
} from '
|
|
23
|
-
import { setupAudio } from '
|
|
22
|
+
} from '../runtime/adapter/first-party-audio-system';
|
|
23
|
+
import { setupAudio } from '../runtime/setup/setup-audio';
|
|
24
24
|
import * as THREE from 'three';
|
|
25
25
|
|
|
26
26
|
export function installEditModeAudio(camera: THREE.Camera = new THREE.Camera()): () => void {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
* active; on Stop, `getActiveNetworking()` falls back to this one.
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
import { setEditModeNetworking } from '@volter/editor-
|
|
34
|
-
import { getCurrentProject } from '@volter/editor-
|
|
33
|
+
import { setEditModeNetworking } from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
34
|
+
import { getCurrentProject } from '@volter/editor-sdk/kit/active-project';
|
|
35
35
|
import type {
|
|
36
36
|
ConnectionState,
|
|
37
37
|
NetPeer,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* host module: the host imports no package (WORKBENCH.md §The invariants), so
|
|
11
11
|
* the button stays on this side of the line with the store and model it reads.
|
|
12
12
|
*/
|
|
13
|
-
import { getInspectedRenderDebug } from '@volter/editor-
|
|
13
|
+
import { getInspectedRenderDebug } from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
14
14
|
import { useAvailabilitySelector } from '@volter/editor-sdk/kit/availability-tick';
|
|
15
15
|
import { deriveRenderDebugCapabilities } from '../host/components/frame-debugger-model';
|
|
16
16
|
import { profilerView } from '../host/components/utility-view-state';
|
|
@@ -12,8 +12,8 @@ import { PlayBar } from '../play-bar/PlayBar';
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { ResolutionPicker } from '../host/components/ResolutionPicker';
|
|
15
|
-
import { useEditorStore } from '@volter/editor-
|
|
16
|
-
import { getCurrentProject, onProjectChange } from '@volter/editor-
|
|
15
|
+
import { useEditorStore } from '@volter/editor-sdk/kit/editor-runtime';
|
|
16
|
+
import { getCurrentProject, onProjectChange } from '@volter/editor-sdk/kit/active-project';
|
|
17
17
|
import type { LiveDocumentContentProps } from '@volter/editor-sdk/host';
|
|
18
18
|
import {
|
|
19
19
|
AnchoredMenu,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
getMountFailureReports,
|
|
15
15
|
subscribeToMountFailures,
|
|
16
16
|
} from '@volter/editor-sdk/kit/mount-failure-report';
|
|
17
|
-
import { SurfaceStateOverlay } from '@volter/editor-
|
|
17
|
+
import { SurfaceStateOverlay } from '@volter/editor-sdk/kit/components/SurfaceStateOverlay';
|
|
18
18
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
19
|
-
import { useEditorStore } from '@volter/editor-
|
|
20
|
-
import { getCurrentProject, onProjectChange } from '@volter/editor-
|
|
19
|
+
import { useEditorStore } from '@volter/editor-sdk/kit/editor-runtime';
|
|
20
|
+
import { getCurrentProject, onProjectChange } from '@volter/editor-sdk/kit/active-project';
|
|
21
21
|
import { readinessFacet, subscribeRootReadiness } from '@volter/editor-sdk/kit/readiness';
|
|
22
22
|
import { domHasRenderableContent } from '../host/surface-content';
|
|
23
23
|
import { explainSurface } from '@volter/editor-sdk/kit/surface-state';
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
fitPresentation,
|
|
28
28
|
type PresentedSize,
|
|
29
29
|
resolvePresentedSize,
|
|
30
|
-
} from '
|
|
30
|
+
} from '../runtime/presentation';
|
|
31
31
|
import {
|
|
32
32
|
type ReactNode,
|
|
33
33
|
useCallback,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
inspectedInstanceVersion,
|
|
5
5
|
setInspectedInstance,
|
|
6
6
|
subscribeInspectedInstance,
|
|
7
|
-
} from '@volter/editor-
|
|
8
|
-
import { useEditorStore } from '@volter/editor-
|
|
7
|
+
} from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
8
|
+
import { useEditorStore } from '@volter/editor-sdk/kit/editor-runtime';
|
|
9
9
|
import { gameRealmDiagnostics } from '../host/gated-globals';
|
|
10
10
|
import { faEye } from '@fortawesome/free-solid-svg-icons';
|
|
11
11
|
import {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* the active-document debug-control pattern there.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { getActiveSystems } from '@volter/editor-
|
|
16
|
+
import { getActiveSystems } from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
17
17
|
import type { NavCrowdAgentState } from '@volter/editor-project/adapter';
|
|
18
18
|
import { setUserData } from '@volter/threejs-runtime/ecs/user-data';
|
|
19
19
|
import * as THREE from 'three';
|
|
@@ -27,14 +27,13 @@
|
|
|
27
27
|
* game registered (raw canvas listeners, gated `window`/`document`
|
|
28
28
|
* listeners via `gated-globals.ts` — the clone bubbles to the real window
|
|
29
29
|
* exactly like the original would, so the T6.3 input gate still applies)
|
|
30
|
-
* sees touch.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* than sequenced input, and hover-dependent logic that breaks on device
|
|
30
|
+
* sees touch. A game listening for compatibility `mouse*` events on
|
|
31
|
+
* `window` still hears them: the browser still fires them (we never
|
|
32
|
+
* `preventDefault()` the pointer event). Fidelity limits, recorded: real
|
|
33
|
+
* mobile fires compat mousedown/up AFTER a tap completes and never streams
|
|
34
|
+
* hover mousemove — here a game sees desktop-timed mouse events alongside
|
|
35
|
+
* the touch clones, so games mixing pointer handlers with mouse state get
|
|
36
|
+
* simultaneous rather than sequenced input, and hover-dependent logic that breaks on device
|
|
38
37
|
* still works in emulation. No `TouchEvent` (`touchstart`/`touchmove`)
|
|
39
38
|
* synthesis (Chrome device mode does synthesize these) — raw-touch-event
|
|
40
39
|
* games see nothing. A game capture-phase window/document pointer
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
* everyone who opens it.
|
|
48
47
|
*/
|
|
49
48
|
|
|
50
|
-
import { projectSettings, updateProjectSettings } from '@volter/editor-
|
|
49
|
+
import { projectSettings, updateProjectSettings } from '@volter/editor-sdk/kit/settings-store';
|
|
51
50
|
|
|
52
51
|
export type DevicePresetKind = 'fit' | 'phone' | 'tablet' | 'desktop';
|
|
53
52
|
|
|
@@ -253,8 +252,8 @@ function interceptPointer(e: Event): void {
|
|
|
253
252
|
// listeners, gated window/document listeners) …
|
|
254
253
|
e.stopImmediatePropagation();
|
|
255
254
|
// … and deliver the identical gesture as touch. Compat mouse events are
|
|
256
|
-
// deliberately NOT suppressed (no preventDefault):
|
|
257
|
-
//
|
|
255
|
+
// deliberately NOT suppressed (no preventDefault): a game listening for
|
|
256
|
+
// window `mouse*` keeps working, exactly as on a real
|
|
258
257
|
// mobile browser where compat mouse events accompany touches.
|
|
259
258
|
const clone = new PointerEvent(e.type, {
|
|
260
259
|
bubbles: true,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* destroyed, so nothing leaks into the next session.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { getActiveSystems } from '@volter/editor-
|
|
26
|
+
import { getActiveSystems } from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
27
27
|
import { nodeKeyedPhysics, type PhysicsAdapter } from '@volter/editor-project/adapter';
|
|
28
28
|
import { setUserData } from '@volter/threejs-runtime/ecs/user-data';
|
|
29
29
|
import * as THREE from 'three';
|
|
@@ -13,10 +13,10 @@ import type { GenerationJob } from '@volter/editor-sdk/generations';
|
|
|
13
13
|
import { useState, useSyncExternalStore } from 'react';
|
|
14
14
|
import './GenerationGallery.css';
|
|
15
15
|
import { assetCapabilities, assetDocumentKind } from '@volter/editor-sdk/kit/asset-capabilities';
|
|
16
|
-
import { openAssetDocument } from '@volter/editor-
|
|
17
|
-
import { AudioAssetThumb, ModelThumbnail } from '@volter/editor-
|
|
16
|
+
import { openAssetDocument } from '@volter/editor-sdk/kit/components/asset-documents';
|
|
17
|
+
import { AudioAssetThumb, ModelThumbnail } from '@volter/editor-sdk/kit/components/asset-thumbnails';
|
|
18
18
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
19
|
-
import { modelThumbnailFormat } from '@volter/editor-
|
|
19
|
+
import { modelThumbnailFormat } from '@volter/editor-threejs/kit/model-thumbnail';
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
22
|
EditorBadge,
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
contributionAccount,
|
|
8
8
|
subscribeAccount,
|
|
9
9
|
} from '@volter/editor-sdk/kit/account-client';
|
|
10
|
-
import { toolContributionSurfaces } from '@volter/editor-
|
|
11
|
-
import { ToolErrorBoundary } from '@volter/editor-
|
|
12
|
-
import { openToolDocument } from '@volter/editor-
|
|
10
|
+
import { toolContributionSurfaces } from '@volter/editor-sdk/kit/components/ToolContributionSurfaces';
|
|
11
|
+
import { ToolErrorBoundary } from '@volter/editor-sdk/kit/components/ToolHost';
|
|
12
|
+
import { openToolDocument } from '@volter/editor-sdk/kit/components/tool-documents';
|
|
13
13
|
import {
|
|
14
14
|
subscribeToolContributionPlay,
|
|
15
15
|
toolContributionPlay,
|
|
16
16
|
toolContributionPlayKey,
|
|
17
|
-
} from '@volter/editor-
|
|
17
|
+
} from '@volter/editor-sdk/kit/tool-contribution-play';
|
|
18
18
|
import {
|
|
19
19
|
getGenerationResultContribution,
|
|
20
20
|
getGlobalToolContributions,
|
|
21
21
|
getToolContributionClient,
|
|
22
22
|
subscribeToolContributions,
|
|
23
|
-
} from '@volter/editor-
|
|
23
|
+
} from '@volter/editor-sdk/kit/tool-loader';
|
|
24
24
|
import {
|
|
25
25
|
closeWorkspaceDocument,
|
|
26
26
|
openWorkspaceDocument,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assertEditorServerResponse, editorServerJson } from '@volter/editor-sdk/kit/editor-server-response';
|
|
2
|
-
import { runProjectTool } from '@volter/editor-
|
|
2
|
+
import { runProjectTool } from '@volter/editor-sdk/kit/project-tools';
|
|
3
3
|
import type { GenerationJob, GenerationJobsDocument } from '@volter/editor-sdk/generations';
|
|
4
4
|
|
|
5
5
|
const EMPTY: GenerationJobsDocument = { version: 1, jobs: [] };
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
import {
|
|
9
9
|
installNativeDebugBindings,
|
|
10
10
|
installNativeSystemsBindings,
|
|
11
|
-
} from '
|
|
12
|
-
import { publishDevInstruments } from '
|
|
11
|
+
} from '../runtime/adapter/native-debug-module';
|
|
12
|
+
import { publishDevInstruments } from '../runtime/dev/instruments';
|
|
13
13
|
import {
|
|
14
14
|
DebugError,
|
|
15
15
|
type DebugRegistry,
|
|
16
16
|
type DebugVirtualInputTarget,
|
|
17
17
|
getDebugRegistry,
|
|
18
|
-
} from '
|
|
19
|
-
import type { Game } from '
|
|
18
|
+
} from '../runtime/debug-registry';
|
|
19
|
+
import type { Game } from '../runtime/game';
|
|
20
20
|
import {
|
|
21
21
|
ADAPTER_INPUT_VALUE_TYPES,
|
|
22
22
|
type AdapterInputAction,
|
|
@@ -27,6 +27,12 @@ import {
|
|
|
27
27
|
} from '@volter/editor-project/adapter/adapter-module';
|
|
28
28
|
import type { ObservationBinding } from '@volter/editor-project/adapter/binding';
|
|
29
29
|
import { adapterInputBinding, adapterObservations } from '@volter/editor-sdk/kit/adapter-observation';
|
|
30
|
+
import { observedGameAudio } from '../services/game-audio';
|
|
31
|
+
import { observedGameNetwork } from '../services/game-network';
|
|
32
|
+
import { observedRapierPhysics, rapierContextFor } from '../services/game-physics';
|
|
33
|
+
import { projectDependencyNames, projectVerbFacts } from '../coverage/live-project-verbs';
|
|
34
|
+
import type * as THREE from 'three';
|
|
35
|
+
import type { NativeSystemsBinding } from '@volter/editor-project/adapter/native-entry-surface';
|
|
30
36
|
|
|
31
37
|
const ADAPTER_REGISTRATION_ID = '__adapter__';
|
|
32
38
|
const installedGames = new WeakSet<Game>();
|
|
@@ -52,6 +58,88 @@ function entryBindings<K extends 'entryDebug' | 'entrySystems'>(
|
|
|
52
58
|
return out;
|
|
53
59
|
}
|
|
54
60
|
|
|
61
|
+
/**
|
|
62
|
+
* A game that says nothing about its audio is heard through the editor's observer of the
|
|
63
|
+
* page's Web Audio (`services/game-audio.ts`), on every root, so each world's pause gate and the
|
|
64
|
+
* editor's mute reach the one page-wide adapter. A game whose roots declare audio, or its
|
|
65
|
+
* absence, has spoken for it and gets no observer beside its own.
|
|
66
|
+
*/
|
|
67
|
+
function withObservedAudio(game: Game, bindings: NativeSystemsBinding[]): NativeSystemsBinding[] {
|
|
68
|
+
if (bindings.some((binding) => binding.slots.audio || binding.absent.some((slot) => slot.slot === 'audio'))) {
|
|
69
|
+
return bindings;
|
|
70
|
+
}
|
|
71
|
+
return game.roots.map((root) => {
|
|
72
|
+
const own = bindings.find((binding) => binding.rootId === root.id);
|
|
73
|
+
return { rootId: root.id, slots: { ...own?.slots, audio: observedGameAudio }, absent: own?.absent ?? [] };
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The libraries whose presence says a project joins Colyseus rooms. */
|
|
78
|
+
const COLYSEUS_CLIENT_LIBRARIES = ['@colyseus/sdk', 'colyseus.js'];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A game that says nothing about its networking, and ships a Colyseus client, is inspected
|
|
82
|
+
* through the editor's observer of the page's room sockets (`services/game-network.ts`), on its
|
|
83
|
+
* first root: the page has one set of sockets, and the inspector reads one adapter. A game that
|
|
84
|
+
* declares networking, or its absence, has spoken for it; a project known to ship no Colyseus
|
|
85
|
+
* client gets nothing that pretends.
|
|
86
|
+
*/
|
|
87
|
+
function withObservedNetworking(game: Game, bindings: NativeSystemsBinding[]): NativeSystemsBinding[] {
|
|
88
|
+
const declared = bindings.some(
|
|
89
|
+
(binding) => binding.slots.networking || binding.absent.some((slot) => slot.slot === 'networking'),
|
|
90
|
+
);
|
|
91
|
+
// While the project's dependency list is still loading the answer is unknown, not no (Play
|
|
92
|
+
// starts that read and mounts in the same breath), so the observer is attached; it answers
|
|
93
|
+
// `disconnected` until the game joins a room.
|
|
94
|
+
projectVerbFacts();
|
|
95
|
+
const dependencies = projectDependencyNames();
|
|
96
|
+
const shipsClient = dependencies === null || dependencies.some((name) => COLYSEUS_CLIENT_LIBRARIES.includes(name));
|
|
97
|
+
const first = game.roots[0];
|
|
98
|
+
if (declared || !shipsClient || !first) return bindings;
|
|
99
|
+
const index = bindings.findIndex((binding) => binding.rootId === first.id);
|
|
100
|
+
const own = index >= 0 ? bindings[index] : undefined;
|
|
101
|
+
const binding: NativeSystemsBinding = {
|
|
102
|
+
rootId: first.id,
|
|
103
|
+
slots: { ...own?.slots, networking: observedGameNetwork },
|
|
104
|
+
absent: own?.absent ?? [],
|
|
105
|
+
};
|
|
106
|
+
const out = [...bindings];
|
|
107
|
+
if (index >= 0) out[index] = binding;
|
|
108
|
+
else out.push(binding);
|
|
109
|
+
return out;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** The libraries whose presence says a project simulates Rapier physics. */
|
|
113
|
+
const RAPIER_LIBRARIES = ['@react-three/rapier', '@dimforge/rapier3d-compat'];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* A three world that declares no physics, and whose own mount carries none, is edited through
|
|
117
|
+
* the editor's observer of its `@react-three/rapier` world (`services/game-physics.ts`) when the
|
|
118
|
+
* world has one: a `<Physics>` already mounted, or a project that ships Rapier (its provider
|
|
119
|
+
* mounts only once the WASM loads). A world with neither gets nothing that pretends. While the
|
|
120
|
+
* project's dependency list is still loading (`projectVerbFacts` starts that read) the answer is
|
|
121
|
+
* unknown, not no, so the observer is attached; it answers `unresolved` until a world mounts.
|
|
122
|
+
*/
|
|
123
|
+
export function withObservedPhysics(game: Game, bindings: NativeSystemsBinding[]): NativeSystemsBinding[] {
|
|
124
|
+
projectVerbFacts();
|
|
125
|
+
const dependencies = projectDependencyNames();
|
|
126
|
+
const shipsRapier = dependencies === null || dependencies.some((name) => RAPIER_LIBRARIES.includes(name));
|
|
127
|
+
const out = [...bindings];
|
|
128
|
+
for (const root of game.roots) {
|
|
129
|
+
if (root.mounted.kind !== 'three' || root.mounted.systems?.physics) continue;
|
|
130
|
+
const index = out.findIndex((binding) => binding.rootId === root.id);
|
|
131
|
+
const own = index >= 0 ? out[index] : undefined;
|
|
132
|
+
if (own && (own.slots.physics || own.absent.some((slot) => slot.slot === 'physics'))) continue;
|
|
133
|
+
const scene = root.mounted.scene as THREE.Object3D;
|
|
134
|
+
if (!shipsRapier && !rapierContextFor(scene)) continue;
|
|
135
|
+
const physics = observedRapierPhysics(scene);
|
|
136
|
+
const binding: NativeSystemsBinding = { rootId: root.id, slots: { ...own?.slots, physics }, absent: own?.absent ?? [] };
|
|
137
|
+
if (index >= 0) out[index] = binding;
|
|
138
|
+
else out.push(binding);
|
|
139
|
+
}
|
|
140
|
+
return out;
|
|
141
|
+
}
|
|
142
|
+
|
|
55
143
|
function installObservations(
|
|
56
144
|
game: Game,
|
|
57
145
|
registry: DebugRegistry,
|
|
@@ -275,7 +363,10 @@ function installInput(game: Game, registry: DebugRegistry, binding: AdapterInput
|
|
|
275
363
|
export function installAdapterRuntimeBindings(game: Game): void {
|
|
276
364
|
if (installedGames.has(game)) return;
|
|
277
365
|
installNativeDebugBindings(game, entryBindings(game, 'entryDebug'));
|
|
278
|
-
installNativeSystemsBindings(
|
|
366
|
+
installNativeSystemsBindings(
|
|
367
|
+
game,
|
|
368
|
+
withObservedNetworking(game, withObservedPhysics(game, withObservedAudio(game, entryBindings(game, 'entrySystems')))),
|
|
369
|
+
);
|
|
279
370
|
// The engine's universal instruments (time scale, pause/frame-step,
|
|
280
371
|
// collider draw, frame time) — HOST-published, so every game gets them for
|
|
281
372
|
// zero lines and no in-world mount. The disposer is deliberately dropped:
|
|
@@ -16,10 +16,10 @@ import type {
|
|
|
16
16
|
Transform,
|
|
17
17
|
WriteAck,
|
|
18
18
|
} from '@volter/editor-project/adapter';
|
|
19
|
-
import type { ChannelValue } from '@volter/editor-
|
|
19
|
+
import type { ChannelValue } from '@volter/editor-sdk/kit/creation-site-edit';
|
|
20
20
|
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-sdk/kit/creation-site-registry';
|
|
21
21
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
22
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
22
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
23
23
|
import { type JournalSubject, JsonHistoryResource } from '../history/json-history-resource';
|
|
24
24
|
import { createEphemeralPersistence } from './ephemeral-persistence';
|
|
25
25
|
import { persistChannelWrite } from './gesture-persist';
|
|
@@ -240,7 +240,7 @@ export class BabylonAuthoringAdapter implements AuthoringAdapter {
|
|
|
240
240
|
// used to journal NOTHING, so the edit landed on the live node and
|
|
241
241
|
// Ctrl+Z was a correct no-op over an empty stack — "undo is not working"
|
|
242
242
|
// (runhuman pass 149; traced on production build 75).
|
|
243
|
-
const history = store.projectHistory;
|
|
243
|
+
const history = store.shell.projectHistory;
|
|
244
244
|
this.historyResource =
|
|
245
245
|
backend && history && options.journal
|
|
246
246
|
? new JsonHistoryResource<BabylonHistoryState>({
|
|
@@ -389,9 +389,9 @@ export class BabylonAuthoringAdapter implements AuthoringAdapter {
|
|
|
389
389
|
};
|
|
390
390
|
|
|
391
391
|
readonly selection = {
|
|
392
|
-
get: (): string[] => [...this.store.selectedEntityIds],
|
|
392
|
+
get: (): string[] => [...this.store.shell.selectedEntityIds],
|
|
393
393
|
set: (ids: string[]): void => {
|
|
394
|
-
this.store.selectMultiple(ids);
|
|
394
|
+
this.store.shell.selectMultiple(ids);
|
|
395
395
|
this.attachGizmos(ids[0] ?? null);
|
|
396
396
|
this.notify();
|
|
397
397
|
},
|
|
@@ -698,6 +698,6 @@ export class BabylonAuthoringAdapter implements AuthoringAdapter {
|
|
|
698
698
|
|
|
699
699
|
private notify(): void {
|
|
700
700
|
for (const listener of this.listeners) listener();
|
|
701
|
-
this.store.notifyIngestEdit();
|
|
701
|
+
this.store.shell.notifyIngestEdit();
|
|
702
702
|
}
|
|
703
703
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
import type { WriteAck, WriteAnchorKind } from '@volter/editor-project/adapter';
|
|
32
|
-
import type { ChannelValue } from '@volter/editor-
|
|
32
|
+
import type { ChannelValue } from '@volter/editor-sdk/kit/creation-site-edit';
|
|
33
33
|
import type { SourcePersistenceBackend, SourceWriteSubject } from './source-persistence-backend';
|
|
34
34
|
import { resolvesLiveOnly, runWritePipe, type WriteResolution } from '@volter/editor-sdk/kit/write-pipe';
|
|
35
35
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
42
|
import type { NodeCreationSite } from '@volter/editor-project/adapter';
|
|
43
|
-
import type { ChannelValue } from '@volter/editor-
|
|
43
|
+
import type { ChannelValue } from '@volter/editor-sdk/kit/creation-site-edit';
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* The one `userData` key that anchors a live object to a record in its game's
|
|
@@ -31,13 +31,13 @@ import type {
|
|
|
31
31
|
CreationSiteLiteralReport,
|
|
32
32
|
CreationSiteSurface,
|
|
33
33
|
CreationSiteWriteScope,
|
|
34
|
-
} from '@volter/editor-
|
|
34
|
+
} from '@volter/editor-sdk/kit/creation-site-edit';
|
|
35
35
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
36
36
|
import { editorIsAuthoring } from '@volter/editor-sdk/kit/editor-session-mode';
|
|
37
|
-
import type { HistoryService } from '@volter/editor-
|
|
38
|
-
import { projectSourceAppliedChange } from '@volter/editor-
|
|
37
|
+
import type { HistoryService } from '@volter/editor-sdk/kit/history/history-service';
|
|
38
|
+
import { projectSourceAppliedChange } from '@volter/editor-sdk/kit/history/source-history-backend';
|
|
39
39
|
import type { ResourceDriver, ResourceKey } from '@volter/editor-sdk/kit/history-types';
|
|
40
|
-
import type { SourceWriteBackend } from '@volter/editor-
|
|
40
|
+
import type { SourceWriteBackend } from '@volter/editor-sdk/kit/ui-source/source-write-backend';
|
|
41
41
|
import {
|
|
42
42
|
type DataEditPlan,
|
|
43
43
|
dataPlacementRefusal,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AuthoringAdapter } from '@volter/editor-project/adapter';
|
|
2
2
|
import type * as THREE from 'three';
|
|
3
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
4
|
-
import { stampEntityId } from '@volter/editor-
|
|
3
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
4
|
+
import { stampEntityId } from '@volter/editor-threejs/kit/entity-object';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Selection is editor-global UI state. A mounted adapter may deliberately own
|
|
@@ -14,8 +14,8 @@ export function withStoreSelection(
|
|
|
14
14
|
): AuthoringAdapter {
|
|
15
15
|
if (authoring.selection) return authoring;
|
|
16
16
|
const selection = {
|
|
17
|
-
get: () => [...store.selectedEntityIds],
|
|
18
|
-
set: (ids: string[]) => store.selectMultiple(ids),
|
|
17
|
+
get: () => [...store.shell.selectedEntityIds],
|
|
18
|
+
set: (ids: string[]) => store.shell.selectMultiple(ids),
|
|
19
19
|
};
|
|
20
20
|
return new Proxy(authoring, {
|
|
21
21
|
get(target, property) {
|
|
@@ -17,7 +17,7 @@ import type {
|
|
|
17
17
|
PropertyDescriptor,
|
|
18
18
|
Transform,
|
|
19
19
|
} from '@volter/editor-project/adapter';
|
|
20
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
20
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
21
21
|
import { createEphemeralPersistence } from './ephemeral-persistence';
|
|
22
22
|
|
|
23
23
|
export interface PhaserGameObjectLike {
|
|
@@ -172,9 +172,9 @@ export class PhaserLiveAuthoringAdapter implements AuthoringAdapter {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
readonly selection = {
|
|
175
|
-
get: (): string[] => [...this.store.selectedEntityIds],
|
|
175
|
+
get: (): string[] => [...this.store.shell.selectedEntityIds],
|
|
176
176
|
set: (ids: string[]): void => {
|
|
177
|
-
this.store.selectMultiple(ids);
|
|
177
|
+
this.store.shell.selectMultiple(ids);
|
|
178
178
|
this.notify();
|
|
179
179
|
},
|
|
180
180
|
};
|
|
@@ -260,6 +260,6 @@ export class PhaserLiveAuthoringAdapter implements AuthoringAdapter {
|
|
|
260
260
|
|
|
261
261
|
private notify(): void {
|
|
262
262
|
for (const listener of this.listeners) listener();
|
|
263
|
-
this.store.notifyIngestEdit();
|
|
263
|
+
this.store.shell.notifyIngestEdit();
|
|
264
264
|
}
|
|
265
265
|
}
|