@volter/editor-game 0.5.66 → 0.5.68
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/build-player.document.tsx +95 -0
- 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 +21 -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 +14 -3
- package/src/build/build-session.ts +35 -0
- package/src/canvas/canvas-board/CanvasBoardDocument.tsx +749 -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 +178 -31
- package/src/host/authoring/pixi-creatable-kinds.ts +62 -0
- 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 +1709 -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 +11 -11
- 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 +373 -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 +3 -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 +9 -9
- 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 +939 -37
- package/src/network/network-inspector-model.ts +20 -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 +182 -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 +767 -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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three.js story thumbnail capture (`@volter/editor-sdk/kit/story-thumbnails`), installed at
|
|
3
|
+
* boot (`workspace.service`): a prefab story renders in an offscreen React Three Fiber stage
|
|
4
|
+
* (`src/host/stories/three-story-captures.ts`). It is the game's, because prefab stories are R3F.
|
|
5
|
+
*/
|
|
6
|
+
import { registerThreeStoryCapture } from '../src/host/stories/three-story-captures';
|
|
7
|
+
|
|
8
|
+
export const point = 'workspace.service';
|
|
9
|
+
|
|
10
|
+
export function start(): () => void {
|
|
11
|
+
return registerThreeStoryCapture();
|
|
12
|
+
}
|
|
@@ -31,16 +31,26 @@ export const style: StyleContribution = {
|
|
|
31
31
|
large: '0 6px 18px rgba(0,0,0,0.55)',
|
|
32
32
|
},
|
|
33
33
|
stage: {
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
|
|
34
|
+
// THE SCENE VIEW'S OWN CHROME (`NewEmptyScene_01.png`, `PrimitiveCube.png`): the Scene
|
|
35
|
+
// view's toolbar is a flush band with the draw mode first ("Shaded"); the tools are
|
|
36
|
+
// Unity's Tools overlay at the view's left; the view's name is the label under the scene
|
|
37
|
+
// gizmo ("Persp"), which toggles the projection.
|
|
38
|
+
chrome: { bar: 'strip', viewName: 'gizmo', tools: 'shelf', display: 'bar-start' },
|
|
39
|
+
// Unity's draw modes and its Gizmos menu (`NewEmptyScene_01.png`: `Shaded`, `Gizmos`).
|
|
40
|
+
words: { shading: { solid: 'Shaded', wireframe: 'Wireframe' }, helpers: 'Gizmos' },
|
|
41
|
+
// A handle is 80 points on screen whatever the distance (`HandleUtility.GetHandleSize`,
|
|
42
|
+
// `k_KHandleSize`), the radius of the rotate disc; the stage's ring radius is this many
|
|
43
|
+
// CSS px. The documentation's frames are small Scene views at about half scale, so their
|
|
44
|
+
// arrows look long beside the object; on screen they are these points.
|
|
45
|
+
gizmoSize: 80,
|
|
38
46
|
// Unity's scene gizmo: cones round a grey cube (`Editor-SceneGizmo.png`).
|
|
39
47
|
navigationGizmo: 'cones',
|
|
40
|
-
//
|
|
41
|
-
//
|
|
48
|
+
// `Handles.ArrowHandleCap`: a shaft to 0.9 of the handle and a cone centred at 1.0, scaled
|
|
49
|
+
// 0.2 of it. The cone mesh's own proportions are the editor's resource, so they are read
|
|
50
|
+
// off `TransformGizmo35.png` at 1x: a tip at about 1.1 handles and a cone about 0.25 of
|
|
51
|
+
// the handle long, 1.25 of three's head.
|
|
42
52
|
gizmoArrowLength: 1.1,
|
|
43
|
-
gizmoArrowHead: 1.
|
|
53
|
+
gizmoArrowHead: 1.25,
|
|
44
54
|
// The axis colours' alpha (`Handles.cs`); hover and drag are fixed colours (the palette).
|
|
45
55
|
gizmoOpacity: 0.93,
|
|
46
56
|
// `SceneViewGrid`: one-pixel lines at both levels, the ten-cell level a little stronger.
|
|
@@ -12,6 +12,9 @@ export const view: ViewPreset = {
|
|
|
12
12
|
id: 'unity',
|
|
13
13
|
title: 'Unity',
|
|
14
14
|
layer: {
|
|
15
|
+
// Unity's Scene camera: `kDefaultPerspectiveFov` 60, vertical when the view is wider than tall
|
|
16
|
+
// and horizontal otherwise (`SceneView.GetVerticalFOV`) — on its smaller side.
|
|
17
|
+
camera: { fov: { degrees: 60, axis: 'smaller' } },
|
|
15
18
|
all: {
|
|
16
19
|
lighting: {
|
|
17
20
|
source: 'preview',
|
|
@@ -49,6 +52,9 @@ export const view: ViewPreset = {
|
|
|
49
52
|
},
|
|
50
53
|
},
|
|
51
54
|
overlays: {
|
|
55
|
+
// No zoom and pan buttons under the gizmo and no camera readout: the engine draws neither.
|
|
56
|
+
navigationControls: false,
|
|
57
|
+
cameraReadout: false,
|
|
52
58
|
grid: {
|
|
53
59
|
visible: true,
|
|
54
60
|
majorEvery: 10,
|
|
@@ -31,9 +31,17 @@ export const style: StyleContribution = {
|
|
|
31
31
|
large: '0 6px 18px rgba(0,0,0,0.6)',
|
|
32
32
|
},
|
|
33
33
|
stage: {
|
|
34
|
+
// THE LEVEL VIEWPORT'S OWN CHROME (`level-editor.png`): one row of rounded pills over the
|
|
35
|
+
// view that runs on from its start: the view's name ("Perspective") and the view mode
|
|
36
|
+
// ("Lit"), then the transform tools, then the transform controls with the snap steps
|
|
37
|
+
// (`10`, `10°`, `0.5`).
|
|
38
|
+
chrome: { bar: 'pills', viewName: 'bar', tools: 'bar-start', display: 'bar-start', transformControls: 'bar' },
|
|
39
|
+
// Unreal's words for the view modes and the Show menu (`level-editor.png`: `Lit`, `Show`).
|
|
40
|
+
words: { shading: { solid: 'Lit', unlit: 'Unlit', wireframe: 'Wireframe' }, helpers: 'Show' },
|
|
34
41
|
// Unreal keeps its widget a constant size on screen; in `level-editor.png` the Move
|
|
35
|
-
// arrows reach 85 to 100 px from the centre sphere. Fitted, not transcribed
|
|
36
|
-
|
|
42
|
+
// arrows reach 85 to 100 px from the centre sphere. Fitted, not transcribed: the stage's
|
|
43
|
+
// ring radius is this many CSS px, so the 0.85 tip below stands at 94 px.
|
|
44
|
+
gizmoSize: 110,
|
|
37
45
|
// The axis triad in the viewport's bottom-left corner (`level-editor.png`).
|
|
38
46
|
navigationGizmo: 'triad',
|
|
39
47
|
navigationCorner: 'bottom-left',
|
|
@@ -15,6 +15,8 @@ export const view: ViewPreset = {
|
|
|
15
15
|
id: 'unreal',
|
|
16
16
|
title: 'Unreal',
|
|
17
17
|
layer: {
|
|
18
|
+
// Unreal's level viewport: a 90° horizontal field of view, its viewport setting's default.
|
|
19
|
+
camera: { fov: { degrees: 90, axis: 'horizontal' } },
|
|
18
20
|
all: {
|
|
19
21
|
lighting: {
|
|
20
22
|
source: 'preview',
|
|
@@ -53,6 +55,9 @@ export const view: ViewPreset = {
|
|
|
53
55
|
},
|
|
54
56
|
},
|
|
55
57
|
overlays: {
|
|
58
|
+
// No zoom and pan buttons under the gizmo and no camera readout: the engine draws neither.
|
|
59
|
+
navigationControls: false,
|
|
60
|
+
cameraReadout: false,
|
|
56
61
|
navigation: 'indicator',
|
|
57
62
|
grid: {
|
|
58
63
|
visible: false,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@volter/editor-game",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.68",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
"./contributions/*": "./contributions/*",
|
|
26
26
|
"./*": "./src/*",
|
|
27
|
-
"./package.json": "./package.json"
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
"./host/canvas-preview-frames": "./src/host/canvas-preview-frames.ts",
|
|
29
|
+
"./host/stories/pixi-story-model": "./src/host/stories/pixi-story-model.ts",
|
|
30
|
+
"./host/stories/story-pixi-preview": "./src/host/stories/story-pixi-preview.ts",
|
|
31
|
+
"./host/stories/story-media-captures": "./src/host/stories/story-media-captures.ts"
|
|
28
32
|
},
|
|
29
33
|
"vgai": {
|
|
30
34
|
"contributions": [
|
|
@@ -33,10 +37,12 @@
|
|
|
33
37
|
"./contributions/asset-budget.document.tsx",
|
|
34
38
|
"./contributions/asset-budget.menu.ts",
|
|
35
39
|
"./contributions/audio-unlock.service.ts",
|
|
40
|
+
"./contributions/network-observer.service.ts",
|
|
36
41
|
"./contributions/audio.utility.tsx",
|
|
37
42
|
"./contributions/autoplay.service.ts",
|
|
38
43
|
"./contributions/bridge.command.ts",
|
|
39
44
|
"./contributions/build-profiles.document.tsx",
|
|
45
|
+
"./contributions/build-player.document.tsx",
|
|
40
46
|
"./contributions/build-progress.status.tsx",
|
|
41
47
|
"./contributions/build.action.ts",
|
|
42
48
|
"./contributions/build.command.ts",
|
|
@@ -74,6 +80,8 @@
|
|
|
74
80
|
"./contributions/unity.view.ts",
|
|
75
81
|
"./contributions/unreal.style.ts",
|
|
76
82
|
"./contributions/unreal.view.ts",
|
|
83
|
+
"./contributions/canvas/component-board.service.ts",
|
|
84
|
+
"./contributions/canvas/design-time-mount.service.ts",
|
|
77
85
|
"./contributions/react/component-board.service.ts",
|
|
78
86
|
"./contributions/react/design-time-mount.service.ts",
|
|
79
87
|
"./contributions/react/react-inspector.service.ts",
|
|
@@ -86,17 +94,19 @@
|
|
|
86
94
|
"./contributions/three/model-asset-sections.service.ts",
|
|
87
95
|
"./contributions/three/reflection-probe-capture.inspector.tsx",
|
|
88
96
|
"./contributions/three/story-documents.service.ts",
|
|
89
|
-
"./contributions/three/three-authoring.service.ts"
|
|
97
|
+
"./contributions/three/three-authoring.service.ts",
|
|
98
|
+
"./contributions/three-story-capture.service.ts",
|
|
99
|
+
"./contributions/canvas-story-capture.service.ts"
|
|
90
100
|
],
|
|
91
101
|
"serving": "./dist-node/serving.mjs"
|
|
92
102
|
},
|
|
93
103
|
"dependencies": {
|
|
94
|
-
"@volter/editor-
|
|
95
|
-
"@volter/editor-
|
|
96
|
-
"@volter/editor-
|
|
97
|
-
"@volter/
|
|
98
|
-
"@volter/
|
|
99
|
-
"@
|
|
104
|
+
"@volter/editor-sdk": "0.5.68",
|
|
105
|
+
"@volter/editor-project": "0.5.68",
|
|
106
|
+
"@volter/editor-threejs": "0.5.68",
|
|
107
|
+
"@volter/threejs-runtime": "0.5.68",
|
|
108
|
+
"@volter/game-runtime": "0.5.68",
|
|
109
|
+
"@colyseus/msgpackr": "^1.11.3",
|
|
100
110
|
"@colyseus/schema": "^4.0.14",
|
|
101
111
|
"@colyseus/sdk": "^0.17.34",
|
|
102
112
|
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
@@ -110,6 +120,7 @@
|
|
|
110
120
|
"draco3d": "^1.5.7",
|
|
111
121
|
"esbuild-wasm": "0.25.12",
|
|
112
122
|
"fastnoise-lite": "^1.1.1",
|
|
123
|
+
"loglayer": "^9.1.0",
|
|
113
124
|
"mediabunny": "1.56.2",
|
|
114
125
|
"meshoptimizer": "^1.2.0",
|
|
115
126
|
"three": "^0.180.0",
|
|
@@ -127,7 +138,7 @@
|
|
|
127
138
|
"xstate": "^5.32.4",
|
|
128
139
|
"zod": "^4.3.6",
|
|
129
140
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
130
|
-
"@volter/editor-react": "0.5.
|
|
141
|
+
"@volter/editor-react": "0.5.68"
|
|
131
142
|
},
|
|
132
143
|
"peerDependencies": {
|
|
133
144
|
"@sparkjsdev/spark": "^2.1.0",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* rendered with an explicit `≥`, inspection failures with their reason).
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { getStorageBackend } from '@volter/editor-
|
|
15
|
+
import { getStorageBackend } from '@volter/editor-sdk/kit/storage/index';
|
|
16
16
|
import { editorHost } from '@volter/editor-sdk/host';
|
|
17
17
|
import {
|
|
18
18
|
accent,
|
|
@@ -288,7 +288,7 @@ const MANIFEST_NAME = 'vgai.project.json';
|
|
|
288
288
|
* The manifest is the ONLY JSON document that owns asset references. An
|
|
289
289
|
* `.inputmap.json` was scanned as one too, and could not be. `collectStringPaths`
|
|
290
290
|
* below yields string VALUES only (action names are record KEYS — never
|
|
291
|
-
* candidates), and every string value
|
|
291
|
+
* candidates), and every string value an input map carries is a binding
|
|
292
292
|
* `type` literal, a `KeyboardEvent.code`, a `direction`/`valueType` enum, or an
|
|
293
293
|
* injected/touch `sourceId`; button/axis indexes are numbers. None of them is a
|
|
294
294
|
* path, so the only value that could ever have resolved to an asset was a
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
import { editorHost } from '@volter/editor-sdk/host';
|
|
25
25
|
import { Button, fontSizeVar, spaceVar, themeVars } from '@volter/editor-sdk/widgets';
|
|
26
|
-
import { meterPercent } from '
|
|
26
|
+
import { meterPercent } from '../runtime/adapter/audio-meter';
|
|
27
27
|
import type { AudioAdapter, AudioDebugEvent, AudioMeterFrame } from '@volter/editor-project/adapter';
|
|
28
28
|
import { useEffect, useReducer, useRef, useState } from 'react';
|
|
29
29
|
import {
|
package/src/bridge/dispatch.ts
CHANGED
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
getActiveSystems,
|
|
14
14
|
InstanceResolutionError,
|
|
15
15
|
systemsForInstance,
|
|
16
|
-
} from '@volter/editor-
|
|
17
|
-
import { collectPlayRunPageErrors } from '@volter/editor-
|
|
16
|
+
} from '@volter/editor-sdk/kit/authoring/active-systems';
|
|
17
|
+
import { collectPlayRunPageErrors } from '@volter/editor-sdk/kit/command-listener';
|
|
18
18
|
import { gameContractEpoch } from '../host/coverage/game-contract-seam-evidence';
|
|
19
19
|
import { recordLiveSeamEvidence } from '@volter/editor-sdk/kit/live-seam-evidence';
|
|
20
20
|
import { systemAdapterEpoch } from '@volter/editor-sdk/kit/system-seam-evidence';
|
|
21
21
|
import {
|
|
22
22
|
HOLD_STARVED_NO_DRIVER_REASON,
|
|
23
23
|
waitForHoldBudget,
|
|
24
|
-
} from '
|
|
24
|
+
} from '../runtime/debug-bridge';
|
|
25
25
|
import type { SystemAdapters } from '@volter/editor-project/adapter';
|
|
26
26
|
import { activeIngestContract } from '../ingest/ingest-play-control';
|
|
27
27
|
import { getPlayRuntimeAccess } from '../play/play-mode';
|
|
@@ -39,7 +39,7 @@ import { getPlayRuntimeAccess } from '../play/play-mode';
|
|
|
39
39
|
* game, so it never creates a play session at all, and what it publishes
|
|
40
40
|
* through `setActiveSystems` is the debug adapter projected from its own
|
|
41
41
|
* declared contract (`ingest-root-adapter.ts` →
|
|
42
|
-
* `@volter/game
|
|
42
|
+
* `@volter/editor-game/runtime/adapter/ingest/contract-debug-adapter`). The question asked here is
|
|
43
43
|
* only ever "has a live mount published a plane", never who mounted it.
|
|
44
44
|
* `notPlayingResult()` stays the answer for the genuinely-no-world case. */
|
|
45
45
|
export const hasLiveDebugPlane = (): boolean => getActiveSystems().debug != null;
|
|
@@ -48,7 +48,7 @@ export const hasLiveDebugPlane = (): boolean => getActiveSystems().debug != null
|
|
|
48
48
|
* `Error` carrying a machine-readable `code` (and optional `data`), the same
|
|
49
49
|
* shape `DebugError`/`InputActionError` already throw. Used by
|
|
50
50
|
* `dispatchBridgeMethod` below for its OWN precondition failures (no debug
|
|
51
|
-
* adapter installed, no
|
|
51
|
+
* adapter installed, no input door wired) so they survive
|
|
52
52
|
* `structuredErrorResult` exactly like an engine-thrown error would. */
|
|
53
53
|
export function bridgeError(code: string, message: string, data?: Record<string, unknown>): Error {
|
|
54
54
|
const err = new Error(message) as Error & { code: string; data?: unknown };
|
|
@@ -109,7 +109,7 @@ function recordContractSystemUse(member: string, value: unknown, name?: string):
|
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* #140 — the generic session-wire dispatch table: the SAME method-name
|
|
112
|
-
* surface `window.__vgai` exposes (`@volter/game
|
|
112
|
+
* surface `window.__vgai` exposes (`@volter/editor-game/runtime/debug-bridge`'s
|
|
113
113
|
* `VgaiDebugHandle` — `state`/`stateAll`/`providers`/`commands`/`events`/
|
|
114
114
|
* `snapshot`/`invoke`/`runTicks`/`input.*`), built from the SAME
|
|
115
115
|
* registry-backed accessors the sibling
|
|
@@ -337,8 +337,8 @@ export async function dispatchBridgeMethod(
|
|
|
337
337
|
if (!inputTarget) {
|
|
338
338
|
throw bridgeError(
|
|
339
339
|
'DEBUG_INPUT_UNAVAILABLE',
|
|
340
|
-
`session wire: ${method}() has no virtual-input target wired — no
|
|
341
|
-
"
|
|
340
|
+
`session wire: ${method}() has no virtual-input target wired — no root ` +
|
|
341
|
+
"entry exports `debug.input` (the game's own input door), or none has mounted yet",
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
344
|
if (method === 'input.setVirtualAction') {
|
|
@@ -382,8 +382,8 @@ export async function dispatchBridgeMethod(
|
|
|
382
382
|
if (!inputTarget) {
|
|
383
383
|
throw bridgeError(
|
|
384
384
|
'DEBUG_INPUT_UNAVAILABLE',
|
|
385
|
-
'session wire: input.scheduleActionAtTick() has no virtual-input target wired — no ' +
|
|
386
|
-
"
|
|
385
|
+
'session wire: input.scheduleActionAtTick() has no virtual-input target wired — no root ' +
|
|
386
|
+
"entry exports `debug.input` (the game's own input door), or none has mounted yet",
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
return inputTarget.scheduleActionAtTick(tick, action, value);
|
|
@@ -405,8 +405,8 @@ export async function dispatchBridgeMethod(
|
|
|
405
405
|
if (!inputTarget) {
|
|
406
406
|
throw bridgeError(
|
|
407
407
|
'DEBUG_INPUT_UNAVAILABLE',
|
|
408
|
-
`session wire: ${method}() has no virtual-input target wired — no
|
|
409
|
-
"
|
|
408
|
+
`session wire: ${method}() has no virtual-input target wired — no root ` +
|
|
409
|
+
"entry exports `debug.input` (the game's own input door), or none has mounted yet",
|
|
410
410
|
);
|
|
411
411
|
}
|
|
412
412
|
if (method === 'input.injectPointerDelta') {
|
|
@@ -430,8 +430,8 @@ export async function dispatchBridgeMethod(
|
|
|
430
430
|
if (!inputTarget) {
|
|
431
431
|
throw bridgeError(
|
|
432
432
|
'DEBUG_INPUT_UNAVAILABLE',
|
|
433
|
-
'session wire: holdFor() has no virtual-input target wired — no
|
|
434
|
-
"
|
|
433
|
+
'session wire: holdFor() has no virtual-input target wired — no root ' +
|
|
434
|
+
"entry exports `debug.input` (the game's own input door), or none has mounted yet",
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
437
|
const action = callArgs[0] as string;
|
|
@@ -14,7 +14,7 @@ import { getPlayRuntimeAccess } from '../play/play-mode';
|
|
|
14
14
|
export async function captureLiveCanvasFrame(
|
|
15
15
|
canvas: HTMLCanvasElement,
|
|
16
16
|
): Promise<CanvasImageSource | null> {
|
|
17
|
-
const { liveCanvasFrame } = await import('@volter/editor-
|
|
17
|
+
const { liveCanvasFrame } = await import('@volter/editor-sdk/kit/live-canvas-frame');
|
|
18
18
|
return liveCanvasFrame(canvas);
|
|
19
19
|
}
|
|
20
20
|
|
package/src/bridge/screenshot.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
CaptureLayerError,
|
|
13
13
|
capturePlayComposite,
|
|
14
14
|
sampleFlatness,
|
|
15
|
-
} from '@volter/editor-
|
|
15
|
+
} from '@volter/editor-sdk/kit/composite-screenshot';
|
|
16
16
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
17
17
|
import { presentationSurface } from '@volter/editor-sdk/kit/presentation-surface';
|
|
18
18
|
import type { EditorCommandMessage, EditorCommandResult } from '@volter/editor-sdk/commands';
|
|
@@ -51,7 +51,7 @@ import { captureLiveCanvasFrame } from './live-frames';
|
|
|
51
51
|
*
|
|
52
52
|
* BOTH legs read a canvas, and a canvas is only readable after its frame when
|
|
53
53
|
* its WebGL context was created with `preserveDrawingBuffer: true`. Every
|
|
54
|
-
* canvas the vgai RUNTIME mounts sets it (`@volter/game
|
|
54
|
+
* canvas the vgai RUNTIME mounts sets it (`@volter/editor-game/runtime/create-runtime`,
|
|
55
55
|
* D5 §1/§4); a canvas an INGESTED game created is the game's own and usually
|
|
56
56
|
* does not, which read as a silently BLACK screenshot over a perfectly
|
|
57
57
|
* healthy running game. {@link liveCanvasFrame} is the answer for that
|
|
@@ -279,7 +279,7 @@ export async function handleBridgeScreenshot(
|
|
|
279
279
|
// Same seam as the composite leg, for the same reason: a game's own canvas
|
|
280
280
|
// is unreadable this late, so ask for a same-frame copy first and fall back
|
|
281
281
|
// to reading the canvas itself.
|
|
282
|
-
const frameModule = await import('@volter/editor-
|
|
282
|
+
const frameModule = await import('@volter/editor-sdk/kit/live-canvas-frame');
|
|
283
283
|
const readable =
|
|
284
284
|
frameModule.readablePngSource(await frameModule.liveCanvasFrame(canvas)) ?? canvas;
|
|
285
285
|
const dataUrl = readable.toDataURL('image/png');
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* build takes real seconds and a modal would block the viewport.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { workspaceHistoryService } from '@volter/editor-
|
|
12
|
-
import { getDownloadUrl, readProjectTextFile, saveFile } from '@volter/editor-
|
|
13
|
-
import { getProjectFileHistory } from '@volter/editor-
|
|
11
|
+
import { workspaceHistoryService } from '@volter/editor-sdk/kit/components/workspace-history';
|
|
12
|
+
import { getDownloadUrl, readProjectTextFile, saveFile } from '@volter/editor-sdk/kit/editor-api';
|
|
13
|
+
import { getProjectFileHistory } from '@volter/editor-sdk/kit/history/project-file-history';
|
|
14
14
|
import { faGlobe } from '@fortawesome/free-solid-svg-icons';
|
|
15
15
|
import type { BuildReport } from '@volter/editor-sdk/session/build-report';
|
|
16
16
|
import {
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
33
33
|
import {
|
|
34
34
|
type BuildTarget,
|
|
35
|
+
buildAndRun,
|
|
35
36
|
buildSessionVersion,
|
|
36
37
|
cancelBuild,
|
|
37
38
|
getBuildSession,
|
|
@@ -331,6 +332,16 @@ export function BuildProfilesPanel() {
|
|
|
331
332
|
>
|
|
332
333
|
{phase === 'done' ? 'Build Again' : 'Build'}
|
|
333
334
|
</Button>
|
|
335
|
+
<Button
|
|
336
|
+
data-testid="build-profiles-build-and-run"
|
|
337
|
+
onClick={() => {
|
|
338
|
+
if (!selected) return;
|
|
339
|
+
if (phase === 'done') resetBuildSession();
|
|
340
|
+
void buildAndRun(selected);
|
|
341
|
+
}}
|
|
342
|
+
>
|
|
343
|
+
Build And Run
|
|
344
|
+
</Button>
|
|
334
345
|
</>
|
|
335
346
|
)}
|
|
336
347
|
</div>
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from '../host/api/configurations';
|
|
18
18
|
import type { EditorHostOutputDiagnostic } from '@volter/editor-sdk/host';
|
|
19
19
|
import { editorHost } from '@volter/editor-sdk/host';
|
|
20
|
+
import { BASE } from '@volter/editor-sdk/kit/api-base';
|
|
20
21
|
import type { BuildReport } from '@volter/editor-sdk/session/build-report';
|
|
21
22
|
import { useEffect, useState } from 'react';
|
|
22
23
|
import { formatBytes } from './format-bytes';
|
|
@@ -34,6 +35,40 @@ export function openBuildProfilesDocument(): boolean {
|
|
|
34
35
|
return editorHost().workspace.openContributedDocument(BUILD_PROFILES_DOCUMENT_ID);
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
/** The Build Player document's contribution id (`build-player.document.tsx`). */
|
|
39
|
+
export const BUILD_PLAYER_DOCUMENT_ID = 'build-player.document';
|
|
40
|
+
|
|
41
|
+
/** Where the editor server serves the project's built `dist/` (`routes/configurations.ts`). */
|
|
42
|
+
export const BUILD_PLAYER_URL = `${BASE}/build/web/index.html`;
|
|
43
|
+
|
|
44
|
+
let _runs = 0;
|
|
45
|
+
const _runListeners = new Set<() => void>();
|
|
46
|
+
|
|
47
|
+
/** How many times the build has been run: the player reloads on each. */
|
|
48
|
+
export function buildRunCount(): number {
|
|
49
|
+
return _runs;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function subscribeBuildRuns(fn: () => void): () => void {
|
|
53
|
+
_runListeners.add(fn);
|
|
54
|
+
return () => {
|
|
55
|
+
_runListeners.delete(fn);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Run the last build in the Build Player document, fresh. */
|
|
60
|
+
export function runBuild(): boolean {
|
|
61
|
+
_runs++;
|
|
62
|
+
for (const fn of _runListeners) fn();
|
|
63
|
+
return editorHost().workspace.openContributedDocument(BUILD_PLAYER_DOCUMENT_ID);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Unity's Build And Run: build, and run the result when the build succeeds. */
|
|
67
|
+
export async function buildAndRun(target: BuildTarget): Promise<void> {
|
|
68
|
+
await startBuild(target);
|
|
69
|
+
if (_session.phase === 'done' && _session.result?.ok) runBuild();
|
|
70
|
+
}
|
|
71
|
+
|
|
37
72
|
/** A build-role configuration's id (ARCHITECTURE-CORE §The project model). */
|
|
38
73
|
export type BuildTarget = string;
|
|
39
74
|
export type BuildPhase = 'idle' | 'building' | 'done';
|