@volter/editor-game 0.5.65 → 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 +3 -3
- package/contributions/generations.status.tsx +1 -1
- package/contributions/godot.palette.json +99 -0
- package/contributions/godot.style.ts +82 -0
- package/contributions/godot.view.ts +75 -0
- package/contributions/ingest.service.ts +4 -4
- 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 +11 -5
- package/contributions/react/component-board.service.ts +1 -1
- package/contributions/react/design-time-mount.service.ts +1 -1
- package/contributions/react/react-inspector.service.ts +2 -2
- package/contributions/scene-document.service.ts +5 -5
- 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 +8 -8
- package/contributions/three/three-authoring.service.ts +8 -5
- package/contributions/three-story-capture.service.ts +12 -0
- package/contributions/unity.palette.json +102 -0
- package/contributions/unity.style.ts +72 -0
- package/contributions/unity.view.ts +82 -0
- package/contributions/unreal.palette.json +105 -0
- package/contributions/unreal.style.ts +66 -0
- package/contributions/unreal.view.ts +93 -0
- package/dist-node/serving.mjs +16 -0
- package/package.json +33 -16
- package/serving/index.ts +27 -0
- package/src/asset-budget/AssetBudgetPanel.tsx +1 -1
- package/src/asset-budget/asset-budget-model.ts +4 -4
- package/src/asset-budget/optimize-apply.ts +7 -7
- package/src/audio/AudioDebuggerPanel.tsx +1 -1
- package/src/bridge/dispatch.ts +16 -16
- package/src/bridge/live-frames.ts +1 -1
- package/src/bridge/screenshot.ts +6 -6
- 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 +6 -6
- package/src/coverage/live-project-verbs.ts +2 -2
- package/src/coverage/native-system-coverage.ts +6 -6
- package/src/coverage/root-coverage.ts +1 -1
- package/src/coverage/session-coverage.ts +5 -5
- package/src/design-system-stories/ApplicationChrome.stories.tsx +5 -5
- package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +13 -53
- 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 +2 -2
- package/src/game-document/GameDocument.tsx +2 -2
- package/src/game-document/GamePanel.tsx +8 -8
- 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 +6 -8
- package/src/generation/generation-documents.tsx +8 -8
- package/src/generation/generation-jobs.ts +2 -2
- package/src/generation/generation-presentation.ts +1 -1
- package/src/host/adapter-reach.ts +1 -1
- package/src/host/adapter-runtime-bindings.ts +97 -6
- package/src/host/api/configurations.ts +2 -2
- package/src/host/authoring/babylon-authoring-adapter.ts +8 -8
- package/src/host/authoring/contract-hierarchy-authoring.ts +1 -1
- package/src/host/authoring/contract-scenes-stories.ts +1 -1
- package/src/host/authoring/creation-site-related.ts +2 -2
- package/src/host/authoring/ephemeral-persistence.ts +1 -1
- package/src/host/authoring/gesture-persist.ts +2 -2
- package/src/host/authoring/ingest-data-writer.ts +1 -1
- package/src/host/authoring/ingest-source-persistence.ts +8 -8
- package/src/host/authoring/mount-isolated-pixi-screen.ts +1 -1
- 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 +42 -17
- package/src/host/authoring/pixi-creation-site-write-target.ts +2 -2
- package/src/host/authoring/pixi-live-write-target.ts +7 -7
- 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 +2 -2
- package/src/host/authoring/pixi-structure-history.ts +3 -3
- package/src/host/authoring/pixi-transform-channels.ts +16 -14
- package/src/host/authoring/source-persistence-backend.ts +6 -6
- package/src/host/authoring/struct-write-pipe.ts +3 -3
- package/src/host/binding-resolver.ts +8 -9
- package/src/host/browser-transpile.ts +2 -2
- package/src/host/canvas-entry-runtime.ts +59 -48
- package/src/host/canvas-preview-frames.ts +482 -0
- package/src/host/components/CameraAuthoringOverlay.tsx +1 -1
- package/src/host/components/HeaderTelemetry.tsx +9 -16
- package/src/host/components/PixiIsolationSceneContent.tsx +17 -16
- package/src/host/components/ThreeIsolationSceneContent.tsx +5 -5
- 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 +29 -61
- package/src/host/components/utility-view-state.ts +1 -1
- package/src/host/components/world-root-stage-binding.tsx +17 -26
- package/src/host/components/world-root-stage.ts +130 -63
- package/src/host/coverage/capability-coverage.ts +13 -1
- package/src/host/coverage/game-contract-seam-evidence.ts +1 -1
- package/src/host/coverage/project-verb-coverage.ts +2 -17
- package/src/host/coverage/system-adapter-coverage.ts +4 -5
- package/src/host/design-system-stories/fixtures/editor-runtime.tsx +14 -8
- package/src/host/document-preview-three.ts +2 -2
- package/src/host/entry-adjudication.ts +6 -6
- package/src/host/game-css-scope-transform.ts +4 -0
- package/src/host/game-module-access.ts +1 -1
- package/src/host/game-realm-page.ts +16 -8
- package/src/host/game-realm-reclaim.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 +6 -6
- package/src/host/history/json-history-resource.ts +3 -3
- package/src/host/instance-extract-actions.ts +1 -1
- package/src/host/instance-fork-actions.ts +1 -1
- package/src/host/projection/dom.ts +2 -2
- package/src/host/projection/pixi.ts +25 -3
- package/src/host/r3f-entry-runtime.ts +65 -34
- package/src/host/react-mount-runtime.ts +8 -49
- package/src/host/realm-services.ts +2 -2
- package/src/host/roots/canvas-root.tsx +361 -0
- package/src/host/roots/module-root.ts +1 -1
- package/src/host/roots/r3f-root.tsx +473 -0
- package/src/host/roots/react-root.ts +9 -43
- package/src/host/scene-view-drawability.ts +2 -2
- package/src/host/served-bundle-runtime-modules.ts +1 -19
- package/src/host/server-log-bridge.ts +3 -3
- 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/three-ingest-runtime.ts +1 -1
- package/src/host/use-active-performance-source.ts +3 -3
- package/src/host/viewport-pose-memory.ts +1 -1
- package/src/host/viewport-root-presentation.ts +6 -5
- package/src/ingest/active-ingest.ts +2 -2
- package/src/ingest/authoring/ingest-dom-surface-authoring.ts +4 -4
- package/src/ingest/authoring/ingest-root-adapter.ts +13 -13
- package/src/ingest/capture-wait-report.ts +1 -1
- package/src/ingest/deferred-ingest-play.ts +11 -10
- package/src/ingest/discovery-public-ingest.ts +2 -2
- package/src/ingest/ingest-boot-viewport.ts +6 -8
- package/src/ingest/ingest-canvas-scene-document.tsx +17 -16
- package/src/ingest/ingest-canvas-scene.ts +5 -8
- 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 +4 -4
- package/src/ingest/ingest-render-debug.ts +11 -11
- package/src/ingest/ingest-siblings.ts +16 -28
- package/src/ingest/module-mode.ts +18 -19
- package/src/ingest/mount-canvas-ingest-root.ts +27 -27
- package/src/ingest/mount-coverage.ts +4 -4
- package/src/ingest/mount-dom-ingest-root.ts +16 -16
- package/src/ingest/mount-ingest-root.ts +14 -14
- package/src/ingest/mount-three-ingest-root.ts +12 -12
- 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 +7 -7
- 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 +99 -142
- package/src/play/play-recording.ts +2 -2
- 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 +4 -4
- package/src/react/design-time-react-mount.ts +37 -85
- package/src/react/dom-authoring-adapter.ts +11 -11
- package/src/react/react-inspector-section.tsx +13 -13
- package/src/react/react-world-authoring-adapter.ts +31 -143
- package/src/react/story-documents/story-documents.tsx +18 -22
- package/src/react/ui-board-document.tsx +10 -11
- package/src/react/ui-component-board.ts +5 -5
- 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 +4 -3
- package/src/three/authoring/constraint-inspector-section.tsx +8 -7
- package/src/three/authoring/model-asset-inspector-section.tsx +14 -17
- package/src/three/authoring/oid-source-persistence.ts +13 -13
- package/src/three/authoring/r3f-design-session.ts +79 -61
- package/src/three/authoring/r3f-source-authoring-adapter.ts +112 -108
- package/src/three/authoring/reflection-probe-inspector-section.tsx +5 -4
- package/src/three/authoring/spatial-joint-handles.ts +1 -1
- package/src/three/authoring/spatial-lod-handles.ts +1 -1
- package/src/three/authoring/spatial-particle-handles.ts +1 -1
- package/src/three/authoring/three-authoring-adapter.ts +33 -33
- package/src/three/component-verbs/extract-menu.ts +8 -7
- package/src/three/component-verbs/fork-menu.ts +8 -7
- package/src/three/component-verbs/internals-menu.ts +3 -3
- package/src/three/drei-asset-caches.ts +13 -0
- package/src/three/story-documents/three-story-documents.tsx +24 -34
- package/src/three/three-board/ThreeBoardDocument.tsx +25 -25
- package/src/three/three-board/board-scene.ts +7 -7
- package/src/three/three-board/three-component-board.ts +5 -5
- package/contributions/react/pasteboard.action.ts +0 -41
- package/contributions/xstate-behavior.action.ts +0 -42
- package/contributions/xstate-behavior.document.tsx +0 -73
- package/contributions/xstate-behavior.inspector.tsx +0 -28
- package/contributions/xstate-behavior.menu.ts +0 -23
- package/src/react/pasteboard-materialize.ts +0 -154
- package/src/services/game-audio-unlock.ts +0 -48
- package/src/xstate/XStateBehaviorSection.tsx +0 -130
- package/src/xstate/XStateMachineInspector.tsx +0 -566
- package/src/xstate/character-animation-machine.fixture.ts +0 -74
- package/src/xstate/live-behaviors.ts +0 -106
- package/src/xstate/use-live-actor-state.ts +0 -44
- package/src/xstate/xstate-graph.ts +0 -235
- package/src/xstate/xstate-layout.ts +0 -76
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three.js story thumbnail capture (`@volter/editor-sdk/kit/story-thumbnails`): a prefab
|
|
3
|
+
* story in an offscreen R3F stage. Loads its renderer on first use.
|
|
4
|
+
*/
|
|
5
|
+
import { registerStoryThumbnailCapture, StoryMediumMismatch } from '@volter/editor-sdk/kit/story-thumbnails';
|
|
6
|
+
|
|
7
|
+
/** The three.js leg needs WebGL; jsdom (the component tests) has none. */
|
|
8
|
+
function supportsThreeCapture(): boolean {
|
|
9
|
+
return (
|
|
10
|
+
typeof WebGLRenderingContext !== 'undefined' &&
|
|
11
|
+
typeof navigator !== 'undefined' &&
|
|
12
|
+
!navigator.userAgent.toLowerCase().includes('jsdom')
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function registerThreeStoryCapture(): () => void {
|
|
17
|
+
return supportsThreeCapture()
|
|
18
|
+
? registerStoryThumbnailCapture('three', async (component, options) => {
|
|
19
|
+
const preview = await import('./story-three-preview');
|
|
20
|
+
try {
|
|
21
|
+
return await preview.captureStoryComponentThumbnail(
|
|
22
|
+
component as Parameters<typeof preview.captureStoryComponentThumbnail>[0],
|
|
23
|
+
options,
|
|
24
|
+
);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
// The reconciler's qualification rejection of a DOM story is a
|
|
27
|
+
// classification, not a failure: the caller tries its next leg.
|
|
28
|
+
if (preview.isStoryThreeClassificationRefusal(error)) {
|
|
29
|
+
throw new StoryMediumMismatch('This story is not a three.js story.');
|
|
30
|
+
}
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
: () => {};
|
|
35
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** React/Fiber primitives selected from the graph that owns a project story. */
|
|
2
|
+
|
|
3
|
+
import { createRoot as staticCreateR3FRoot, extend as staticExtendThree } from '@react-three/fiber';
|
|
4
|
+
import { createElement as staticCreateElement } from 'react';
|
|
5
|
+
import * as staticThree from 'three';
|
|
6
|
+
import { R3F_RUNTIME_PATH } from '@volter/editor-sdk/host';
|
|
7
|
+
import { isPackagedRuntime } from '@volter/editor-sdk/kit/packaged-runtime';
|
|
8
|
+
|
|
9
|
+
export interface StoryThreePreviewRuntime {
|
|
10
|
+
readonly packaged: boolean;
|
|
11
|
+
readonly createElement: typeof staticCreateElement;
|
|
12
|
+
readonly createR3FRoot: typeof staticCreateR3FRoot;
|
|
13
|
+
readonly extendThree: typeof staticExtendThree;
|
|
14
|
+
readonly three: typeof staticThree;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const STATIC_RUNTIME: StoryThreePreviewRuntime = {
|
|
18
|
+
packaged: false,
|
|
19
|
+
createElement: staticCreateElement,
|
|
20
|
+
createR3FRoot: staticCreateR3FRoot,
|
|
21
|
+
extendThree: staticExtendThree,
|
|
22
|
+
three: staticThree,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
let cachedPackagedRuntime: Promise<StoryThreePreviewRuntime> | null = null;
|
|
26
|
+
|
|
27
|
+
async function loadPackagedRuntime(): Promise<StoryThreePreviewRuntime> {
|
|
28
|
+
const mod = (await import(/* @vite-ignore */ R3F_RUNTIME_PATH)) as Record<string, unknown>;
|
|
29
|
+
for (const name of ['createElement', 'createR3FRoot', 'extendThree']) {
|
|
30
|
+
if (typeof mod[name] !== 'function') {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`The packaged R3F preview runtime did not export ${name} as a function — see ` +
|
|
33
|
+
'vite-plugin-module-doorways.ts.',
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (typeof mod['projectThree'] !== 'object' || mod['projectThree'] === null) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
'The packaged R3F preview runtime did not export projectThree — see ' +
|
|
40
|
+
'vite-plugin-module-doorways.ts.',
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
packaged: true,
|
|
45
|
+
createElement: mod['createElement'] as typeof staticCreateElement,
|
|
46
|
+
createR3FRoot: mod['createR3FRoot'] as typeof staticCreateR3FRoot,
|
|
47
|
+
extendThree: mod['extendThree'] as typeof staticExtendThree,
|
|
48
|
+
three: mod['projectThree'] as typeof staticThree,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function resolveStoryThreePreviewRuntime(): Promise<StoryThreePreviewRuntime> {
|
|
53
|
+
if (!(await isPackagedRuntime())) return STATIC_RUNTIME;
|
|
54
|
+
if (!cachedPackagedRuntime) cachedPackagedRuntime = loadPackagedRuntime();
|
|
55
|
+
return cachedPackagedRuntime;
|
|
56
|
+
}
|
|
@@ -16,7 +16,7 @@ import * as shellThree from 'three';
|
|
|
16
16
|
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
17
17
|
import { CSS3DRenderer } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
|
|
18
18
|
import { THREE_INGEST_RUNTIME_PATH } from '@volter/editor-sdk/host';
|
|
19
|
-
import { isPackagedRuntime } from '@volter/editor-
|
|
19
|
+
import { isPackagedRuntime } from '@volter/editor-sdk/kit/packaged-runtime';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* THE three of the graph an ingested game's modules resolve — the project's
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
inspectedInstanceId,
|
|
15
15
|
inspectedInstanceVersion,
|
|
16
16
|
subscribeInspectedInstance,
|
|
17
|
-
} from '@volter/editor-
|
|
17
|
+
} from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
18
18
|
import {
|
|
19
19
|
type EditorPerformanceSource,
|
|
20
20
|
performanceSourceForDocument,
|
|
21
21
|
performanceSourceForGameInstance,
|
|
22
22
|
performanceSourcesVersion,
|
|
23
23
|
subscribePerformanceSources,
|
|
24
|
-
} from '@volter/editor-
|
|
24
|
+
} from '@volter/editor-sdk/kit/performance-sources';
|
|
25
25
|
import {
|
|
26
26
|
activeWorkspaceDocumentId,
|
|
27
27
|
subscribeWorkspaceDocuments,
|
|
28
28
|
workspaceDocumentRegistryVersion,
|
|
29
|
-
} from '@volter/editor-
|
|
29
|
+
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
30
30
|
|
|
31
31
|
export function useActivePerformanceSource(): EditorPerformanceSource | null {
|
|
32
32
|
useSyncExternalStore(
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import type * as THREE from 'three';
|
|
18
|
-
import { projectLocalSection, writeProjectLocalSection } from '@volter/editor-
|
|
18
|
+
import { projectLocalSection, writeProjectLocalSection } from '@volter/editor-sdk/kit/project-local-state';
|
|
19
19
|
|
|
20
20
|
/** The section of the project-local document this module owns. */
|
|
21
21
|
const SECTION = 'viewportPose';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { ViewportRoot } from '@volter/editor-sdk/host';
|
|
2
1
|
import { stampMountedAuthoringIds } from './authoring/mounted-authoring';
|
|
3
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
4
|
-
import { stampThreeIdentities } from '@volter/editor-
|
|
2
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
3
|
+
import { stampThreeIdentities } from '@volter/editor-threejs/kit/projection/three';
|
|
4
|
+
import { threeRoot } from '@volter/editor-threejs/adapter/three-contract';
|
|
5
|
+
import type { ViewportRoot } from '@volter/editor-threejs/viewport-api';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* The Three viewport's PRESENTER — what `the world root's stage` binds as
|
|
8
|
-
* `
|
|
9
|
+
* `presentViewportRoots` (`@volter/editor-threejs/viewport-door`). The lane that mounted
|
|
9
10
|
* the roots sees only the returned presentation handle. Native Three scene
|
|
10
11
|
* adoption, identity stamping, and restoration stay here, beside the
|
|
11
12
|
* viewport surface that understands them. A composition with no Three root
|
|
@@ -17,7 +18,7 @@ export function presentThreeRoots(
|
|
|
17
18
|
): { readonly worldId: string; dispose(): void } | null {
|
|
18
19
|
const world = roots.find((candidate) => candidate.mounted.kind === 'three');
|
|
19
20
|
if (!world || world.mounted.kind !== 'three') return null;
|
|
20
|
-
const scene = world.mounted.scene;
|
|
21
|
+
const scene = threeRoot(world.mounted).scene;
|
|
21
22
|
const mountedAuthoring = world.mounted.authoring;
|
|
22
23
|
if (mountedAuthoring) stampMountedAuthoringIds(scene, mountedAuthoring);
|
|
23
24
|
stampThreeIdentities(scene, liveWorldId(world.id));
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* makes that whole graph acyclic.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
15
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
16
16
|
import type { MeasuredLoop } from '../host/same-realm-loop-gate';
|
|
17
17
|
import type { DomAuthoringAdapter } from '../react/dom-authoring-adapter';
|
|
18
18
|
import type { AuthoringAdapter } from '@volter/editor-project/adapter/authoring';
|
|
@@ -192,7 +192,7 @@ export function serializeEntry<T>(run: () => Promise<T>): Promise<T> {
|
|
|
192
192
|
return result;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
import { registerLiveSession } from '@volter/editor-
|
|
195
|
+
import { registerLiveSession } from '@volter/editor-sdk/kit/live-session-registry';
|
|
196
196
|
// THE INGEST LANE, as the host sees it (`live-session-registry.ts`). Playing
|
|
197
197
|
// is the host play-control latch, never an inferred loop
|
|
198
198
|
// (`editor-session-mode.ts` records why); a deferred-ingest play counts.
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* only AuthoringAdapter/CompositeAuthoringAdapter currency.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { CompositeAuthoringAdapter } from '@volter/editor-
|
|
7
|
+
import { CompositeAuthoringAdapter } from '@volter/editor-sdk/kit/authoring/composite-authoring-adapter';
|
|
8
8
|
import {
|
|
9
9
|
findCanvasUiElements,
|
|
10
10
|
findPrimaryCanvas,
|
|
11
11
|
type OverlayElement,
|
|
12
12
|
} from '../../host/coverage/capability-coverage';
|
|
13
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
13
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
14
14
|
import { authoringJournal } from '../../host/history/json-history-resource';
|
|
15
|
-
import { sourceWriteBackendIfPrimed } from '@volter/editor-
|
|
15
|
+
import { sourceWriteBackendIfPrimed } from '@volter/editor-sdk/kit/ui-source/tier-source-write-backend';
|
|
16
16
|
import { DomAuthoringAdapter, type DomElementLike } from '../../react/dom-authoring-adapter';
|
|
17
17
|
import {
|
|
18
18
|
type OidElementLike,
|
|
@@ -128,7 +128,7 @@ function domSurfaceAdapter(
|
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
const writeBackend = sourceWriteBackendIfPrimed('An ingested game’s DOM UI surface');
|
|
131
|
-
return new ReactRootAuthoringAdapter(liveUiRoot, store, {
|
|
131
|
+
return new ReactRootAuthoringAdapter(liveUiRoot, store.shell, {
|
|
132
132
|
...(writeBackend ? { writeBackend } : {}),
|
|
133
133
|
});
|
|
134
134
|
}
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
* content uses — no separate editor data model.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { authoringOidOf } from '@volter/editor-
|
|
20
|
+
import { authoringOidOf } from '@volter/editor-threejs/kit/authoring/component-instance-root';
|
|
21
21
|
import { setIngestDataWriter } from '../../host/authoring/ingest-data-writer';
|
|
22
|
-
import { editorConsole } from '@volter/editor-
|
|
23
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
22
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
23
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
24
24
|
import { GAME_SURFACE_CONTAINMENT_CSS } from '../../host/game-realm-page';
|
|
25
25
|
import { clearGameSurface, gameLoopGate, setGameSurface } from '../../host/gated-globals';
|
|
26
26
|
import { authoringJournal } from '../../host/history/json-history-resource';
|
|
27
|
-
import { clearPresentationSurface, recordPresentationSurface } from '@volter/editor-
|
|
28
|
-
import { getCurrentProject } from '@volter/editor-
|
|
29
|
-
import { clearRootReadiness, recordRootReadiness } from '@volter/editor-
|
|
27
|
+
import { clearPresentationSurface, recordPresentationSurface } from '@volter/editor-sdk/kit/presentation-surface';
|
|
28
|
+
import { getCurrentProject } from '@volter/editor-sdk/kit/active-project';
|
|
29
|
+
import { clearRootReadiness, recordRootReadiness } from '@volter/editor-sdk/kit/readiness';
|
|
30
30
|
import {
|
|
31
31
|
type SameRealmLoopGate,
|
|
32
32
|
type SameRealmLoopVerdict,
|
|
33
33
|
verifySameRealmLoopControl,
|
|
34
34
|
} from '../../host/same-realm-loop-gate';
|
|
35
|
-
import { ensureScopedGameStyles } from '@volter/editor-
|
|
35
|
+
import { ensureScopedGameStyles } from '@volter/editor-sdk/kit/scoped-game-css';
|
|
36
36
|
import { resolveThreeIngestRuntimeForEditor } from '../../host/three-ingest-runtime';
|
|
37
|
-
import type { OidEntry } from '@volter/editor-
|
|
38
|
-
import { createHttpSourceWriteBackend } from '@volter/editor-
|
|
39
|
-
import { serverRecordsSourceWrites } from '@volter/editor-
|
|
40
|
-
import { clearWorldAdoption, worldAdoptionRecorder } from '@volter/editor-
|
|
37
|
+
import type { OidEntry } from '@volter/editor-react/source/oid-transform';
|
|
38
|
+
import { createHttpSourceWriteBackend } from '@volter/editor-sdk/kit/ui-source/source-write-backend';
|
|
39
|
+
import { serverRecordsSourceWrites } from '@volter/editor-sdk/kit/ui-source/tier-source-write-backend';
|
|
40
|
+
import { clearWorldAdoption, worldAdoptionRecorder } from '@volter/editor-sdk/kit/world-adoption';
|
|
41
41
|
import { markGameCssScope } from '@volter/editor-sdk/session/game-css-scope';
|
|
42
42
|
import type { MountedThreeRoot } from '@volter/editor-project/adapter';
|
|
43
43
|
import {
|
|
@@ -295,7 +295,7 @@ export function ingestSourceRoots(
|
|
|
295
295
|
* THE SERVE-TIME DOOR: did the OID transform stamp any of THIS root's own
|
|
296
296
|
* source, according to the index the dev server built while serving it?
|
|
297
297
|
*
|
|
298
|
-
* `GET /__ui-source/index` (`
|
|
298
|
+
* `GET /__ui-source/index` (`@volter/editor-react`'s `serving/ui-oid-plugin.ts`) records exactly what the
|
|
299
299
|
* transform stamped, and it is populated at TRANSFORM time — before the module
|
|
300
300
|
* is evaluated, and therefore long before any object exists to carry a stamp.
|
|
301
301
|
* That is precisely the ordering the graph door cannot have: on a project's
|
|
@@ -798,7 +798,7 @@ export async function mountIngestGame(
|
|
|
798
798
|
// `collectState` is push-based — the control API would keep serving a
|
|
799
799
|
// snapshot taken before the measurement existed, reporting `loop: null`
|
|
800
800
|
// forever. Broadcast so `vgai status` sees the verdict it just produced.
|
|
801
|
-
onVerdict: () => store.notifyIngestEdit(),
|
|
801
|
+
onVerdict: () => store.shell.notifyIngestEdit(),
|
|
802
802
|
});
|
|
803
803
|
// The game's DECLARED system surface (`window.vgaiGame.systems`), projected
|
|
804
804
|
// onto the host's ordinary `SystemAdapters.debug`. `activateCapturedThreeIngest`
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* path. A second mount replaces the first's entry; there is only ever one wait.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { notifyLiveSessionsChanged } from '@volter/editor-
|
|
27
|
+
import { notifyLiveSessionsChanged } from '@volter/editor-sdk/kit/live-session-registry';
|
|
28
28
|
import type { VisibleCaptureWindow } from '@volter/threejs-runtime/adapter/ingest/visible-capture-window';
|
|
29
29
|
|
|
30
30
|
/** The wait as `vgai status` reports it. */
|
|
@@ -30,16 +30,17 @@
|
|
|
30
30
|
* ingest keeps its own lifecycle).
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import {
|
|
33
|
+
import { activateLiveDocument } from '@volter/editor-sdk/kit/live-document';
|
|
34
|
+
import { commandLine } from '@volter/editor-sdk/kit/product-command';
|
|
35
|
+
import { queueEditModeRebuild } from '@volter/editor-sdk/kit/authoring/edit-mode-authoring';
|
|
36
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
37
|
+
import { fetchGameManifest } from '@volter/editor-sdk/kit/manifest-project';
|
|
37
38
|
import {
|
|
38
39
|
type ProjectAdapterFacet,
|
|
39
40
|
projectAdapterFacet,
|
|
40
41
|
subscribeProjectAdapter,
|
|
41
|
-
} from '@volter/editor-
|
|
42
|
-
import { sceneTabRow } from '@volter/editor-
|
|
42
|
+
} from '@volter/editor-sdk/kit/project-adapter';
|
|
43
|
+
import { sceneTabRow } from '@volter/editor-sdk/kit/scene-document-plan';
|
|
43
44
|
import { ingestRoots } from '@volter/editor-project/adapter/manifest-interpreter';
|
|
44
45
|
import { activeIngest } from './active-ingest';
|
|
45
46
|
import {
|
|
@@ -188,8 +189,9 @@ export async function mountDeferredIngestForPlay(store: EditorShellStore): Promi
|
|
|
188
189
|
// the Scene tab because, until now, that mount WAS edit mode; a play-time
|
|
189
190
|
// mount belongs on the play surface — which is also what opens the input
|
|
190
191
|
// gate (`mount-three-ingest-root.ts`'s `ingestInputActive` requires the play
|
|
191
|
-
// tab), so the game is drivable rather than
|
|
192
|
-
|
|
192
|
+
// tab, which is the Game document having focus), so the game is drivable rather than
|
|
193
|
+
// merely visible.
|
|
194
|
+
activateLiveDocument();
|
|
193
195
|
getIngestPlayControl()?.play();
|
|
194
196
|
return true;
|
|
195
197
|
}
|
|
@@ -206,8 +208,7 @@ export function exitDeferredIngestPlay(store: EditorShellStore): boolean {
|
|
|
206
208
|
// ownership note) — it unmounts by kind, clears the authoring override and
|
|
207
209
|
// the adopted scene, and resets the play surface.
|
|
208
210
|
exitActiveIngest();
|
|
209
|
-
store.setPlayState('stopped');
|
|
210
|
-
store.setActiveViewportTab('edit');
|
|
211
|
+
store.shell.setPlayState('stopped');
|
|
211
212
|
// Edit mode is rebuilt through the ONE authoritative reinstall path
|
|
212
213
|
// (`the world root's stage`'s `installAll`), which is what recreates the R3F design
|
|
213
214
|
// session over the world component.
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
PUBLIC_INGEST_BASE,
|
|
35
35
|
publicIngestManifestUrl,
|
|
36
36
|
} from '../host/staged-projects';
|
|
37
|
-
import { extractUpstreamPin } from '
|
|
38
|
-
import type { IngestGame2D } from '
|
|
37
|
+
import { extractUpstreamPin } from '../runtime/adapter/ingest/upstream-pin';
|
|
38
|
+
import type { IngestGame2D } from '../runtime/pixi/ingest';
|
|
39
39
|
import { declaredRoots } from '@volter/editor-project/adapter/manifest-interpreter';
|
|
40
40
|
import { loadGameManifest } from '@volter/editor-project/manifest/load';
|
|
41
41
|
import { composeIngestLoad, ingestDataWriter } from './entry-load';
|
|
@@ -15,19 +15,18 @@
|
|
|
15
15
|
* while it constructs, then explicitly releases the hold and flips to Game.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { editorConsole } from '@volter/editor-
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { CANVAS_SCENE_DOCUMENT_ID, SCENE_DOCUMENT_ID } from '@volter/editor-core/workspace-document-ids';
|
|
18
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
19
|
+
import { projectAdapterFacet } from '@volter/editor-sdk/kit/project-adapter';
|
|
20
|
+
import { sceneDocumentId } from '@volter/editor-sdk/kit/scene-document-plan';
|
|
21
|
+
import { CANVAS_SCENE_DOCUMENT_ID, SCENE_DOCUMENT_ID } from '@volter/editor-sdk/kit/workspace-document-ids';
|
|
23
22
|
import {
|
|
24
23
|
activateWorkspaceDocument,
|
|
25
24
|
openWorkspaceDocuments,
|
|
26
|
-
} from '@volter/editor-
|
|
25
|
+
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
27
26
|
import { activeIngest } from './active-ingest';
|
|
28
27
|
import { activeIngestPauseGap, holdIngestContentTimeForMode } from './ingest-play-control';
|
|
29
28
|
|
|
30
|
-
export function landIngestBootInEdit(
|
|
29
|
+
export function landIngestBootInEdit(): void {
|
|
31
30
|
const active = activeIngest();
|
|
32
31
|
if (active) {
|
|
33
32
|
const held = holdIngestContentTimeForMode('edit');
|
|
@@ -42,7 +41,6 @@ export function landIngestBootInEdit(store: EditorShellStore): void {
|
|
|
42
41
|
'ingest',
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
|
-
store.setActiveViewportTab('edit');
|
|
46
44
|
const open = openWorkspaceDocuments();
|
|
47
45
|
const defaultId = projectAdapterFacet()?.scenes.default;
|
|
48
46
|
const isolationId = defaultId ? sceneDocumentId(defaultId) : undefined;
|
|
@@ -17,25 +17,25 @@
|
|
|
17
17
|
import {
|
|
18
18
|
getMountFailureReports,
|
|
19
19
|
subscribeToMountFailures,
|
|
20
|
-
} from '@volter/editor-
|
|
21
|
-
import { installCanvasSceneNavigation } from '@volter/editor-
|
|
22
|
-
import { createRootViewController } from '@volter/editor-
|
|
20
|
+
} from '@volter/editor-sdk/kit/mount-failure-report';
|
|
21
|
+
import { installCanvasSceneNavigation } from '@volter/editor-sdk/kit/authoring/react-canvas-navigation';
|
|
22
|
+
import { createRootViewController } from '@volter/editor-sdk/kit/world-pan-state';
|
|
23
23
|
import {
|
|
24
24
|
CANVAS_SCENE_BACKGROUND,
|
|
25
25
|
CanvasSceneBackdrop,
|
|
26
26
|
CanvasSceneControls,
|
|
27
|
-
} from '@volter/editor-
|
|
28
|
-
import { RootSelectionOverlay } from '@volter/editor-
|
|
29
|
-
import { SurfaceStateOverlay } from '@volter/editor-
|
|
30
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
31
|
-
import { liveDocumentContainer } from '@volter/editor-
|
|
32
|
-
import { projectAdapterFacet } from '@volter/editor-
|
|
33
|
-
import { readinessFacet, subscribeRootReadiness } from '@volter/editor-
|
|
34
|
-
import { explainSurface } from '@volter/editor-
|
|
27
|
+
} from '@volter/editor-sdk/kit/components/CanvasSceneViewport';
|
|
28
|
+
import { RootSelectionOverlay } from '@volter/editor-sdk/kit/components/RootSelectionOverlay';
|
|
29
|
+
import { SurfaceStateOverlay } from '@volter/editor-sdk/kit/components/SurfaceStateOverlay';
|
|
30
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
31
|
+
import { liveDocumentContainer } from '@volter/editor-sdk/kit/live-document';
|
|
32
|
+
import { projectAdapterFacet } from '@volter/editor-sdk/kit/project-adapter';
|
|
33
|
+
import { readinessFacet, subscribeRootReadiness } from '@volter/editor-sdk/kit/readiness';
|
|
34
|
+
import { explainSurface } from '@volter/editor-sdk/kit/surface-state';
|
|
35
35
|
import {
|
|
36
36
|
registerWorkspaceDocumentSelection,
|
|
37
37
|
type WorkspaceDocumentContentProps,
|
|
38
|
-
} from '@volter/editor-
|
|
38
|
+
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
39
39
|
import type { AuthoringAdapter } from '@volter/editor-project/adapter';
|
|
40
40
|
import { useEffect, useRef, useSyncExternalStore } from 'react';
|
|
41
41
|
import { activeIngest } from './active-ingest';
|
|
@@ -71,7 +71,7 @@ export function IngestCanvasSceneContent({
|
|
|
71
71
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
72
72
|
const viewRef = useRef(createRootViewController());
|
|
73
73
|
const view = viewRef.current;
|
|
74
|
-
useSyncExternalStore(store.subscribe, store.getSnapshot);
|
|
74
|
+
useSyncExternalStore(store.shell.subscribe, store.shell.getSnapshot);
|
|
75
75
|
const rootReadiness = useSyncExternalStore(subscribeRootReadiness, readinessFacet);
|
|
76
76
|
const mountFailures = useSyncExternalStore(subscribeToMountFailures, getMountFailureReports);
|
|
77
77
|
const live = activeIngest();
|
|
@@ -98,7 +98,7 @@ export function IngestCanvasSceneContent({
|
|
|
98
98
|
useEffect(() => {
|
|
99
99
|
return registerWorkspaceDocumentSelection(documentId, () => ({
|
|
100
100
|
adapter,
|
|
101
|
-
nodeId: [...store.selectedEntityIds].find((id) => adapter.hierarchy.node(id)) ?? null,
|
|
101
|
+
nodeId: [...store.shell.selectedEntityIds].find((id) => adapter.hierarchy.node(id)) ?? null,
|
|
102
102
|
}));
|
|
103
103
|
}, [adapter, documentId, store]);
|
|
104
104
|
|
|
@@ -147,7 +147,7 @@ export function IngestCanvasSceneContent({
|
|
|
147
147
|
touchAction: 'none',
|
|
148
148
|
}}
|
|
149
149
|
>
|
|
150
|
-
<CanvasSceneBackdrop view={view} />
|
|
150
|
+
<CanvasSceneBackdrop view={view} documentId={documentId} />
|
|
151
151
|
<RootSelectionOverlay adapter={adapter} view={view} transformModeAware />
|
|
152
152
|
<SurfaceStateOverlay
|
|
153
153
|
explanation={surfaceExplanation}
|
|
@@ -159,6 +159,7 @@ export function IngestCanvasSceneContent({
|
|
|
159
159
|
adapter={adapter}
|
|
160
160
|
containerRef={containerRef}
|
|
161
161
|
view={view}
|
|
162
|
+
documentId={documentId}
|
|
162
163
|
/>
|
|
163
164
|
</div>
|
|
164
165
|
);
|
|
@@ -173,5 +174,5 @@ export function installIngestCanvasScene(store: EditorShellStore): () => void {
|
|
|
173
174
|
const Content = (props: WorkspaceDocumentContentProps) => (
|
|
174
175
|
<IngestCanvasSceneContent {...props} adapter={adapter} store={store} worldId={worldId} />
|
|
175
176
|
);
|
|
176
|
-
return installIngestCanvasSceneDocument(
|
|
177
|
+
return installIngestCanvasSceneDocument(Content);
|
|
177
178
|
}
|
|
@@ -4,22 +4,20 @@
|
|
|
4
4
|
* installer can be unit-tested without pulling Pixi/Three into jsdom.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { CANVAS_SCENE_DOCUMENT_ID } from '@volter/editor-core/workspace-document-ids';
|
|
7
|
+
import { projectAdapterFacet } from '@volter/editor-sdk/kit/project-adapter';
|
|
8
|
+
import { isolationTabsReplaceGenericScene } from '@volter/editor-sdk/kit/scene-document-plan';
|
|
9
|
+
import { CANVAS_SCENE_DOCUMENT_ID } from '@volter/editor-sdk/kit/workspace-document-ids';
|
|
11
10
|
import {
|
|
12
11
|
activateWorkspaceDocument,
|
|
13
12
|
closeWorkspaceDocument,
|
|
14
13
|
openWorkspaceDocument,
|
|
15
14
|
type WorkspaceDocumentContentProps,
|
|
16
|
-
} from '@volter/editor-
|
|
17
|
-
import { registerRootDocumentRoute } from '@volter/editor-
|
|
15
|
+
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
16
|
+
import { registerRootDocumentRoute } from '@volter/editor-sdk/kit/world-document-routing';
|
|
18
17
|
import type { ReactNode } from 'react';
|
|
19
18
|
import { activeIngest } from './active-ingest';
|
|
20
19
|
|
|
21
20
|
export function installIngestCanvasSceneDocument(
|
|
22
|
-
store: EditorShellStore,
|
|
23
21
|
Content: (props: WorkspaceDocumentContentProps) => ReactNode,
|
|
24
22
|
): () => void {
|
|
25
23
|
const live = activeIngest();
|
|
@@ -38,7 +36,6 @@ export function installIngestCanvasSceneDocument(
|
|
|
38
36
|
Content,
|
|
39
37
|
closeable: false,
|
|
40
38
|
presentation: () => ({ kind: 'world', id: worldId }),
|
|
41
|
-
onActivate: () => store.setActiveViewportTab('edit'),
|
|
42
39
|
});
|
|
43
40
|
activateWorkspaceDocument(CANVAS_SCENE_DOCUMENT_ID);
|
|
44
41
|
const unregisterRoute = registerRootDocumentRoute(worldId, CANVAS_SCENE_DOCUMENT_ID);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* appears here because the mounted object actually has it.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { getActiveSystems } from '@volter/editor-
|
|
12
|
+
import { getActiveSystems } from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
13
13
|
import { loadIngestOwnership } from '../host/authoring/ingest-source-persistence';
|
|
14
14
|
import { gameLoopGate } from '../host/gated-globals';
|
|
15
15
|
import type { DomAuthoringAdapter } from '../react/dom-authoring-adapter';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `composite-screenshot.ts` reads a game's canvas with `drawImage`, and that
|
|
8
8
|
* only works on a WebGL canvas whose context was created with
|
|
9
9
|
* `preserveDrawingBuffer: true`. Every canvas the vgai RUNTIME mounts sets it
|
|
10
|
-
* (`@volter/game
|
|
10
|
+
* (`@volter/editor-game/runtime/create-runtime`), which is why the composite leg has always
|
|
11
11
|
* worked for first-party play. An INGESTED game creates its own canvas: the
|
|
12
12
|
* racing-game's `<Canvas>` passes no `gl` prop, so fiber's default
|
|
13
13
|
* (`preserveDrawingBuffer: false`) applies, the browser discards the drawing
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { gameContractEpoch } from '../host/coverage/game-contract-seam-evidence';
|
|
12
|
-
import { recordLiveSeamEvidence } from '@volter/editor-
|
|
13
|
-
import { editorConsole } from '@volter/editor-
|
|
14
|
-
import { activateLiveDocument } from '@volter/editor-
|
|
12
|
+
import { recordLiveSeamEvidence } from '@volter/editor-sdk/kit/live-seam-evidence';
|
|
13
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
14
|
+
import { activateLiveDocument } from '@volter/editor-sdk/kit/live-document';
|
|
15
15
|
import type { VgaiGameContract } from '@volter/editor-project/adapter/ingest/game-contract';
|
|
16
16
|
import { activeIngest, type IngestLifecycleControl } from './active-ingest';
|
|
17
17
|
import { readIngestGameContract } from './game-contract-realm';
|
|
@@ -58,7 +58,7 @@ export function ingestPlaying(): boolean {
|
|
|
58
58
|
* THE one write to the ingest play state.
|
|
59
59
|
*
|
|
60
60
|
* An ingested game's input is gated by the same mechanisms a first-party play
|
|
61
|
-
* session's is (
|
|
61
|
+
* session's is (`gated-globals.ts`'s
|
|
62
62
|
* lexical window/document shadow), driven by the input gate the mount installs.
|
|
63
63
|
*/
|
|
64
64
|
export function setIngestPlaying(playing: boolean): void {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* five WebGL2 draw entry points on whatever real context it is handed and knows
|
|
35
35
|
* nothing about three — so it is reused verbatim over the captured Pixi
|
|
36
36
|
* renderer's own `gl`. The bracket is the renderer's own published seam, its
|
|
37
|
-
* `prerender`/`postrender` runners (`@volter/game
|
|
37
|
+
* `prerender`/`postrender` runners (`@volter/editor-game/runtime/pixi/render-pass-bracket`).
|
|
38
38
|
*
|
|
39
39
|
* What is NOT there is per-draw attribution, and it is absent for a structural
|
|
40
40
|
* reason rather than a missing patch point: three calls `onBeforeRender` on the
|
|
@@ -55,22 +55,22 @@
|
|
|
55
55
|
* notice.
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
|
-
import { adapterObservations } from '@volter/editor-
|
|
59
|
-
import { createContractDebugAdapter } from '
|
|
58
|
+
import { adapterObservations } from '@volter/editor-sdk/kit/adapter-observation';
|
|
59
|
+
import { createContractDebugAdapter } from '../runtime/adapter/ingest/contract-debug-adapter';
|
|
60
60
|
import {
|
|
61
61
|
type ContractSurface,
|
|
62
62
|
projectContractSystemAdapters,
|
|
63
|
-
} from '
|
|
64
|
-
import { mergeDebugAdapters } from '
|
|
65
|
-
import { createObservationDebugAdapter } from '
|
|
63
|
+
} from '../runtime/adapter/ingest/contract-system-adapters';
|
|
64
|
+
import { mergeDebugAdapters } from '../runtime/adapter/ingest/merge-debug-adapters';
|
|
65
|
+
import { createObservationDebugAdapter } from '../runtime/adapter/ingest/observation-debug-adapter';
|
|
66
66
|
import {
|
|
67
67
|
createRenderDebugAdapter,
|
|
68
68
|
frameCaptureContextFor,
|
|
69
69
|
type RenderDebugWiring,
|
|
70
|
-
} from '
|
|
71
|
-
import { collectRenderMemory } from '
|
|
72
|
-
import { createWebGLFrameCapture } from '
|
|
73
|
-
import { pixiRenderingContext } from '
|
|
70
|
+
} from '../runtime/dev/render-debug-adapter';
|
|
71
|
+
import { collectRenderMemory } from '../runtime/dev/render-memory';
|
|
72
|
+
import { createWebGLFrameCapture } from '../runtime/dev/webgl-frame-capture';
|
|
73
|
+
import { pixiRenderingContext } from '../runtime/pixi/render-pass-bracket';
|
|
74
74
|
import type { ObservationDeclaration } from '@volter/editor-project/adapter/adapter-module';
|
|
75
75
|
import type { VgaiGameSystems } from '@volter/editor-project/adapter/ingest/game-contract';
|
|
76
76
|
import type { SystemAdapters } from '@volter/editor-project/adapter/system-adapter';
|
|
@@ -197,7 +197,7 @@ export interface IngestSystemsWiring {
|
|
|
197
197
|
* Four sources, each with a different provenance:
|
|
198
198
|
* - `debug` — projected from the contract's own `commands`/`state`;
|
|
199
199
|
* - `debug`, AGAIN — projected from the loaded ADAPTER's observation
|
|
200
|
-
* declarations (`@volter/game
|
|
200
|
+
* declarations (`@volter/editor-game/runtime/adapter/ingest/observation-debug-adapter`).
|
|
201
201
|
* These two are peers onto ONE slot, so they are MERGED
|
|
202
202
|
* (`merge-debug-adapters.ts`) rather than layered: a name declared by both
|
|
203
203
|
* is refused by a coded error naming both sources, never shadowed;
|