@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
|
@@ -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-
|
|
20
|
-
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-
|
|
21
|
-
import { editorConsole } from '@volter/editor-
|
|
22
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
19
|
+
import type { ChannelValue } from '@volter/editor-sdk/kit/creation-site-edit';
|
|
20
|
+
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-sdk/kit/creation-site-registry';
|
|
21
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
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
|
}
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
VgaiGameHierarchyGroup,
|
|
12
12
|
VgaiGameHierarchyProvider,
|
|
13
13
|
} from '@volter/editor-project/adapter/ingest/game-contract';
|
|
14
|
-
import { editorConsole } from '@volter/editor-
|
|
14
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
15
15
|
|
|
16
16
|
const GROUP_PREFIX = 'contract-hierarchy:group:';
|
|
17
17
|
const RENDER_TREE_ID = 'contract-hierarchy:render-tree';
|
|
@@ -31,7 +31,7 @@ import type {
|
|
|
31
31
|
import type { StoriesProvider, StoryRef } from '@volter/editor-project/adapter';
|
|
32
32
|
import type { VgaiGameContract, VgaiGameScene } from '@volter/editor-project/adapter/ingest/game-contract';
|
|
33
33
|
import { readGameScenes } from '@volter/editor-project/adapter/ingest/game-contract';
|
|
34
|
-
import { editorConsole } from '@volter/editor-
|
|
34
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
35
35
|
|
|
36
36
|
function assertScenes(value: unknown): VgaiGameScene[] {
|
|
37
37
|
if (!Array.isArray(value)) throw new Error('scenes.list() did not return an array');
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import type { NodeCreationSite, RelatedSubjectsProvider } from '@volter/editor-project/adapter';
|
|
25
|
-
import { type InstanceSourceLocator, runInstanceSourceAction } from '@volter/editor-
|
|
26
|
-
import { showTransientHint } from '@volter/editor-
|
|
25
|
+
import { type InstanceSourceLocator, runInstanceSourceAction } from '@volter/editor-sdk/kit/instance-source-actions';
|
|
26
|
+
import { showTransientHint } from '@volter/editor-sdk/kit/transient-hint';
|
|
27
27
|
|
|
28
28
|
/** The related provider for an adapter whose truth can place a subject at a
|
|
29
29
|
* creation site. `resolveSite` is the adapter's own id→site hop. */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import type { PersistenceProvider } from '@volter/editor-project/adapter';
|
|
18
|
-
import { EPHEMERAL_DESTINATION } from '@volter/editor-
|
|
18
|
+
import { EPHEMERAL_DESTINATION } from '@volter/editor-sdk/kit/write-pipe';
|
|
19
19
|
|
|
20
20
|
export function createEphemeralPersistence(): PersistenceProvider {
|
|
21
21
|
return {
|
|
@@ -29,9 +29,9 @@
|
|
|
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
|
-
import { resolvesLiveOnly, runWritePipe, type WriteResolution } from '@volter/editor-
|
|
34
|
+
import { resolvesLiveOnly, runWritePipe, type WriteResolution } from '@volter/editor-sdk/kit/write-pipe';
|
|
35
35
|
|
|
36
36
|
/** The one-property-per-gesture refusal, spelled once — it is the persistence
|
|
37
37
|
* pipeline's own rule, not any substrate's voice. */
|
|
@@ -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
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import type { NodeCreationSite } from '@volter/editor-project/adapter';
|
|
28
|
-
import { base64ToBytes, bytesToBase64, sha256Hex } from '@volter/editor-
|
|
28
|
+
import { base64ToBytes, bytesToBase64, sha256Hex } from '@volter/editor-sdk/kit/bytes-codec';
|
|
29
29
|
import type {
|
|
30
30
|
ChannelValue,
|
|
31
31
|
CreationSiteLiteralReport,
|
|
32
32
|
CreationSiteSurface,
|
|
33
33
|
CreationSiteWriteScope,
|
|
34
|
-
} from '@volter/editor-
|
|
35
|
-
import { editorConsole } from '@volter/editor-
|
|
36
|
-
import { editorIsAuthoring } from '@volter/editor-
|
|
37
|
-
import type { HistoryService } from '@volter/editor-
|
|
38
|
-
import { projectSourceAppliedChange } from '@volter/editor-
|
|
39
|
-
import type { ResourceDriver, ResourceKey } from '@volter/editor-
|
|
40
|
-
import type { SourceWriteBackend } from '@volter/editor-
|
|
34
|
+
} from '@volter/editor-sdk/kit/creation-site-edit';
|
|
35
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
36
|
+
import { editorIsAuthoring } from '@volter/editor-sdk/kit/editor-session-mode';
|
|
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
|
+
import type { ResourceDriver, ResourceKey } from '@volter/editor-sdk/kit/history-types';
|
|
40
|
+
import type { SourceWriteBackend } from '@volter/editor-sdk/kit/ui-source/source-write-backend';
|
|
41
41
|
import {
|
|
42
42
|
type DataEditPlan,
|
|
43
43
|
dataPlacementRefusal,
|
|
@@ -17,7 +17,7 @@ import { type CanvasPixiNamespace, resolveCanvasPixiForEditor } from '../canvas-
|
|
|
17
17
|
import { createWithOwnedPixiTickerListeners } from './owned-pixi-ticker-listeners';
|
|
18
18
|
import { initializePixiIsolationAssets } from './pixi-isolation-assets';
|
|
19
19
|
import { fitSceneView, registerStillFramePresenter } from './pixi-still-presentation';
|
|
20
|
-
import type { RootViewController } from '@volter/editor-
|
|
20
|
+
import type { RootViewController } from '@volter/editor-sdk/kit/world-pan-state';
|
|
21
21
|
|
|
22
22
|
export type IsolatedPixiScreenCtor = (new () => IsolatedPixiScreen) & {
|
|
23
23
|
readonly assetBundles?: readonly string[];
|
|
@@ -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
|
}
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
AuthoringAdapter2D,
|
|
35
35
|
type CanvasIdentity,
|
|
36
36
|
type Transform2DValue,
|
|
37
|
-
} from '
|
|
37
|
+
} from '../../runtime/pixi/authoring';
|
|
38
38
|
import type {
|
|
39
39
|
AssetDropContext,
|
|
40
40
|
AssetDropProvider,
|
|
@@ -70,9 +70,9 @@ import type {
|
|
|
70
70
|
import type { Container, Graphics, Matrix, PointData, Sprite, Text, Texture } from 'pixi.js';
|
|
71
71
|
import * as shellPixi from 'pixi.js';
|
|
72
72
|
import type { CanvasPixiNamespace } from '../canvas-entry-runtime';
|
|
73
|
-
import { componentStatesProvider } from '@volter/editor-
|
|
74
|
-
import { editorConsole } from '@volter/editor-
|
|
75
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
73
|
+
import { componentStatesProvider } from '@volter/editor-sdk/kit/component-states-registry';
|
|
74
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
75
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
76
76
|
import type { JournalSubject } from '../history/json-history-resource';
|
|
77
77
|
import { PixiProjector } from '../projection/pixi';
|
|
78
78
|
import { creationSiteRelated } from './creation-site-related';
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
} from './pixi-source-identity';
|
|
84
84
|
import { CanvasStructureHistory } from './pixi-structure-history';
|
|
85
85
|
import { fromNeutralTransform, toNeutralTransform } from './pixi-transform-channels';
|
|
86
|
-
import { resolvesLiveOnly, runWritePipe } from '@volter/editor-
|
|
86
|
+
import { resolvesLiveOnly, runWritePipe } from '@volter/editor-sdk/kit/write-pipe';
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* What a write target is handed at construction — the live view it edits
|
|
@@ -347,7 +347,7 @@ const ORIGIN_UNWRITABLE_REASON =
|
|
|
347
347
|
* from the one this prebuilt shell bundles — so a real `Sprite` from the world
|
|
348
348
|
* fails `instanceof Sprite` here and every selected sprite would silently read
|
|
349
349
|
* as a pivot node. The engine's own 2D authoring walk already refuses class
|
|
350
|
-
* identity for the same reason (`@volter/game
|
|
350
|
+
* identity for the same reason (`@volter/editor-game/runtime/pixi/authoring`'s `kindOf` keys on the
|
|
351
351
|
* constructor NAME); asking for the two fields the anchor question is actually
|
|
352
352
|
* about is the same move without depending on a name a minifier may mangle.
|
|
353
353
|
*
|
|
@@ -670,6 +670,9 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
670
670
|
private listeners = new Set<() => void>();
|
|
671
671
|
private boxEditSessions = new Map<string, CanvasBoxEditSession>();
|
|
672
672
|
private lockedIds = new Set<string>();
|
|
673
|
+
/** Godot's Group: a click on any node inside a grouped one selects the group. Session-local, as
|
|
674
|
+
* the lock is. */
|
|
675
|
+
private groupedIds = new Set<string>();
|
|
673
676
|
|
|
674
677
|
constructor(
|
|
675
678
|
private readonly root: Container,
|
|
@@ -721,13 +724,16 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
721
724
|
const surface = opts.surface;
|
|
722
725
|
if (surface) {
|
|
723
726
|
this.pickable = {
|
|
724
|
-
pick: (clientX, clientY) =>
|
|
725
|
-
this.projector.pick(clientX, clientY, (id) => this.isPickLocked(id))
|
|
727
|
+
pick: (clientX, clientY) => {
|
|
728
|
+
const hit = this.projector.pick(clientX, clientY, (id) => this.isPickLocked(id));
|
|
729
|
+
return hit ? this.groupOf(hit) : hit;
|
|
730
|
+
},
|
|
726
731
|
candidates: (clientX, clientY) =>
|
|
727
732
|
this.projector.candidates(clientX, clientY, (id) => this.isPickLocked(id)),
|
|
728
733
|
};
|
|
729
734
|
this.rects = {
|
|
730
735
|
rect: (id) => this.projector.rect(id),
|
|
736
|
+
frame: (id) => this.projector.frame(id),
|
|
731
737
|
contextRects: (id) => this.projector.contextRects(id),
|
|
732
738
|
};
|
|
733
739
|
}
|
|
@@ -767,7 +773,7 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
767
773
|
if (!opts.stories && this.target.componentIdentity) {
|
|
768
774
|
this.stories = componentStatesProvider(
|
|
769
775
|
'canvas',
|
|
770
|
-
store,
|
|
776
|
+
store.shell,
|
|
771
777
|
(id) => this.target.componentIdentity?.(id) ?? null,
|
|
772
778
|
);
|
|
773
779
|
}
|
|
@@ -848,7 +854,7 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
848
854
|
this.watchStructure(this.root);
|
|
849
855
|
this.target.onReindex();
|
|
850
856
|
this.notify();
|
|
851
|
-
this.store.notifyIngestEdit();
|
|
857
|
+
this.store.shell.notifyIngestEdit();
|
|
852
858
|
});
|
|
853
859
|
};
|
|
854
860
|
|
|
@@ -914,9 +920,9 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
914
920
|
}
|
|
915
921
|
|
|
916
922
|
readonly selection: SelectionProvider = {
|
|
917
|
-
get: () => [...this.store.selectedEntityIds],
|
|
923
|
+
get: () => [...this.store.shell.selectedEntityIds],
|
|
918
924
|
set: (ids) => {
|
|
919
|
-
this.store.selectMultiple(ids);
|
|
925
|
+
this.store.shell.selectMultiple(ids);
|
|
920
926
|
this.notify();
|
|
921
927
|
},
|
|
922
928
|
};
|
|
@@ -1012,7 +1018,7 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
1012
1018
|
this.watchStructure(this.root);
|
|
1013
1019
|
this.target.onReindex();
|
|
1014
1020
|
this.notify();
|
|
1015
|
-
this.store.notifyIngestEdit();
|
|
1021
|
+
this.store.shell.notifyIngestEdit();
|
|
1016
1022
|
}
|
|
1017
1023
|
|
|
1018
1024
|
private idOf(object: Container): string {
|
|
@@ -1504,12 +1510,19 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
1504
1510
|
properties: (id) => [
|
|
1505
1511
|
...this.target.properties(id),
|
|
1506
1512
|
{ path: 'locked', label: 'Locked', type: 'boolean', group: 'Visibility' },
|
|
1513
|
+
{ path: 'grouped', label: 'Grouped', type: 'boolean', group: 'Visibility' },
|
|
1507
1514
|
],
|
|
1508
|
-
get: (id, path) =>
|
|
1515
|
+
get: (id, path) =>
|
|
1516
|
+
path === 'locked'
|
|
1517
|
+
? this.lockedIds.has(id)
|
|
1518
|
+
: path === 'grouped'
|
|
1519
|
+
? this.groupedIds.has(id)
|
|
1520
|
+
: this.target.get(id, path),
|
|
1509
1521
|
set: (id, path, value) => {
|
|
1510
|
-
if (path === 'locked') {
|
|
1511
|
-
|
|
1512
|
-
|
|
1522
|
+
if (path === 'locked' || path === 'grouped') {
|
|
1523
|
+
const set = path === 'locked' ? this.lockedIds : this.groupedIds;
|
|
1524
|
+
if (value === true) set.add(id);
|
|
1525
|
+
else set.delete(id);
|
|
1513
1526
|
this.notify();
|
|
1514
1527
|
return;
|
|
1515
1528
|
}
|
|
@@ -1519,6 +1532,17 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
1519
1532
|
remove: (id, path) => this.target.remove?.(id, path),
|
|
1520
1533
|
};
|
|
1521
1534
|
|
|
1535
|
+
/** The outermost grouped node that contains `id`, or `id` itself when none does. */
|
|
1536
|
+
private groupOf(id: string): string {
|
|
1537
|
+
let group = id;
|
|
1538
|
+
let current: string | null = id;
|
|
1539
|
+
while (current) {
|
|
1540
|
+
if (this.groupedIds.has(current)) group = current;
|
|
1541
|
+
current = this.projector.node(current)?.parentId ?? null;
|
|
1542
|
+
}
|
|
1543
|
+
return group;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1522
1546
|
private isPickLocked(id: string): boolean {
|
|
1523
1547
|
let current: string | null = id;
|
|
1524
1548
|
while (current) {
|
|
@@ -1542,6 +1566,7 @@ export class PixiAuthoringAdapter implements AuthoringAdapter {
|
|
|
1542
1566
|
dispose(): void {
|
|
1543
1567
|
this.boxEditSessions.clear();
|
|
1544
1568
|
this.lockedIds.clear();
|
|
1569
|
+
this.groupedIds.clear();
|
|
1545
1570
|
for (const object of this.watchedForStructure) {
|
|
1546
1571
|
object.off('childAdded', this.onStructureChanged);
|
|
1547
1572
|
object.off('childRemoved', this.onStructureChanged);
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
* place a fallback could quietly pretend to persist.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
import type { PhysicsAdapter2D } from '
|
|
31
|
-
import type { HistoryService } from '@volter/editor-
|
|
30
|
+
import type { PhysicsAdapter2D } from '../../runtime/pixi/system-adapters';
|
|
31
|
+
import type { HistoryService } from '@volter/editor-sdk/kit/history/history-service';
|
|
32
32
|
import type { IngestSourcePersistence } from './ingest-source-persistence';
|
|
33
33
|
import type { CanvasWriteTarget } from './pixi-authoring-adapter';
|
|
34
34
|
import { createLiveCanvasWriteTarget } from './pixi-live-write-target';
|
|
@@ -34,8 +34,8 @@ import type {
|
|
|
34
34
|
AuthoringAdapter2D,
|
|
35
35
|
Overlay2D,
|
|
36
36
|
Transform2DValue,
|
|
37
|
-
} from '
|
|
38
|
-
import type { PhysicsAdapter2D } from '
|
|
37
|
+
} from '../../runtime/pixi/authoring';
|
|
38
|
+
import type { PhysicsAdapter2D } from '../../runtime/pixi/system-adapters';
|
|
39
39
|
import type {
|
|
40
40
|
ComponentInstanceApplyResult,
|
|
41
41
|
ComponentInstanceDescription,
|
|
@@ -48,9 +48,9 @@ import type {
|
|
|
48
48
|
TransformEditability,
|
|
49
49
|
} from '@volter/editor-project/adapter';
|
|
50
50
|
import type { Container } from 'pixi.js';
|
|
51
|
-
import type { ChannelValue, CreationSiteLiteralReport } from '@volter/editor-
|
|
52
|
-
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-
|
|
53
|
-
import { editorConsole } from '@volter/editor-
|
|
51
|
+
import type { ChannelValue, CreationSiteLiteralReport } from '@volter/editor-sdk/kit/creation-site-edit';
|
|
52
|
+
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-sdk/kit/creation-site-registry';
|
|
53
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
54
54
|
import { JsonHistoryResource } from '../history/json-history-resource';
|
|
55
55
|
import { createEphemeralPersistence } from './ephemeral-persistence';
|
|
56
56
|
import { multiChannelRefusal, persistChannelWrite } from './gesture-persist';
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
runWritePipe,
|
|
65
65
|
type WriteAck,
|
|
66
66
|
type WriteResolution,
|
|
67
|
-
} from '@volter/editor-
|
|
67
|
+
} from '@volter/editor-sdk/kit/write-pipe';
|
|
68
68
|
|
|
69
69
|
interface PixiLiveHistoryState {
|
|
70
70
|
overlay: Overlay2D;
|
|
@@ -750,7 +750,7 @@ export function createLiveCanvasWriteTarget(
|
|
|
750
750
|
bind(context: CanvasWriteContext): void {
|
|
751
751
|
a2d = context.a2d;
|
|
752
752
|
notify = context.notify;
|
|
753
|
-
const history = context.store.projectHistory;
|
|
753
|
+
const history = context.store.shell.projectHistory;
|
|
754
754
|
historyResource = history
|
|
755
755
|
? new JsonHistoryResource({
|
|
756
756
|
history,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The OID half of the canvas authoring surface's IDENTITY axis
|
|
3
|
-
* (`@volter/game
|
|
3
|
+
* (`@volter/editor-game/runtime/pixi/authoring`'s {@link CanvasIdentity}) — what a row is called
|
|
4
4
|
* when the display tree was authored as first-party `@pixi/react` TSX, and the
|
|
5
5
|
* resolution from such an id back to the source tag it addresses.
|
|
6
6
|
*
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
* selection survives one.
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
import type { CanvasIdentity } from '
|
|
37
|
+
import type { CanvasIdentity } from '../../runtime/pixi/authoring';
|
|
38
38
|
import type { Container } from 'pixi.js';
|
|
39
|
-
import { occurrenceId } from '@volter/editor-
|
|
39
|
+
import { occurrenceId } from '@volter/editor-threejs/kit/authoring/component-instance-root';
|
|
40
40
|
|
|
41
41
|
const PREFIX = 'pixi';
|
|
42
42
|
|