@volter/editor-game 0.5.71 → 0.5.72
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/package.json +7 -7
- package/src/host/components/scene-document.tsx +1 -1
- package/src/host/components/world-root-stage-binding.tsx +1 -1
- package/src/host/game-realm-page.ts +4 -10
- package/src/ingest/authoring/ingest-root-adapter.ts +2 -0
- package/src/ingest/mount-canvas-ingest-root.ts +4 -2
- package/src/play/play-mode.ts +3 -0
- package/src/runtime/adapter/native-debug-module.ts +1 -1
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.72",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
"serving": "./dist-node/serving.mjs"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@volter/editor-sdk": "0.5.
|
|
105
|
-
"@volter/editor-project": "0.5.
|
|
106
|
-
"@volter/editor-threejs": "0.5.
|
|
107
|
-
"@volter/threejs-runtime": "0.5.
|
|
108
|
-
"@volter/game-runtime": "0.5.
|
|
104
|
+
"@volter/editor-sdk": "0.5.72",
|
|
105
|
+
"@volter/editor-project": "0.5.72",
|
|
106
|
+
"@volter/editor-threejs": "0.5.72",
|
|
107
|
+
"@volter/threejs-runtime": "0.5.72",
|
|
108
|
+
"@volter/game-runtime": "0.5.72",
|
|
109
109
|
"@colyseus/msgpackr": "^1.11.3",
|
|
110
110
|
"@colyseus/schema": "^4.0.14",
|
|
111
111
|
"@colyseus/sdk": "^0.17.34",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"xstate": "^5.32.4",
|
|
139
139
|
"zod": "^4.3.6",
|
|
140
140
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
141
|
-
"@volter/editor-react": "0.5.
|
|
141
|
+
"@volter/editor-react": "0.5.72"
|
|
142
142
|
},
|
|
143
143
|
"peerDependencies": {
|
|
144
144
|
"@sparkjsdev/spark": "^2.1.0",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `Scene` (the subject, not its entry file — see SCENE_DOCUMENT_TITLE),
|
|
4
4
|
* closeable and discoverable in Content, content = the world root's stage.
|
|
5
5
|
*
|
|
6
|
-
* Transcribed from the Scene half of
|
|
6
|
+
* Transcribed from the Scene half of Volter's `components/CenterDocuments.tsx`.
|
|
7
7
|
* The kit keeps the other half (`@volter/editor-core/components/CenterDocuments`
|
|
8
8
|
* `useCenterDocuments`): it binds the Game document's tab, reports the
|
|
9
9
|
* live/stopped edge and closes every document on session teardown. What moved
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (`@volter/editor-threejs/kit/components/world-root-binding`): the world's surface,
|
|
4
4
|
* its stage, and the overlays the stage shows only over a world.
|
|
5
5
|
*
|
|
6
|
-
* `Overlays` is the world-root half of
|
|
6
|
+
* `Overlays` is the world-root half of Volter's `stage-overlay-set.tsx` — every
|
|
7
7
|
* part it rendered only when `worldRoot` held (the root selection layer, the
|
|
8
8
|
* camera-authoring pin, the scene's
|
|
9
9
|
* surface-state card). The rest of that overlay set is the kit's
|
|
@@ -49,17 +49,11 @@
|
|
|
49
49
|
* pane — the one CSS primitive that does this without the side effects of the alternatives
|
|
50
50
|
* (`transform`/`filter` also create the containing block but force a compositing layer and,
|
|
51
51
|
* on the ADOPTED element itself, are exactly the stamp {@link claimHostSurfaceBox} exists to
|
|
52
|
-
* clear).
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* when it ships: otherwise the editor's own typography (11px, its line height and colour)
|
|
56
|
-
* inherited into the game's DOM, and a game's text rendered smaller in the editor than in
|
|
57
|
-
* its build.
|
|
52
|
+
* clear). The inherited text defaults are `markGameSurface`'s
|
|
53
|
+
* (`@volter/editor-sdk/kit/game-surface-defaults`), at zero specificity so the game's own
|
|
54
|
+
* page rules win.
|
|
58
55
|
*/
|
|
59
|
-
export const GAME_SURFACE_CONTAINMENT_CSS =
|
|
60
|
-
'contain: layout; font: initial; color: initial; letter-spacing: normal; word-spacing: normal;' +
|
|
61
|
-
' text-align: start; text-indent: 0; text-transform: none; white-space: normal;' +
|
|
62
|
-
' direction: ltr; cursor: auto; visibility: visible;';
|
|
56
|
+
export const GAME_SURFACE_CONTAINMENT_CSS = 'contain: layout; visibility: visible;';
|
|
63
57
|
|
|
64
58
|
/** `EventTarget`'s own listener identity is (type, callback, capture) — read
|
|
65
59
|
* the capture flag out of either options form so the page's registration
|
|
@@ -72,6 +72,7 @@ import { claimHostSurfaceBox, hostSurfaceBackingSize } from '../host-surface-box
|
|
|
72
72
|
import { clearIngestFrameSource } from '../ingest-frame-snapshot';
|
|
73
73
|
import { wireIngestSystems } from '../ingest-render-debug';
|
|
74
74
|
import type { IngestGame } from '../types';
|
|
75
|
+
import { markGameSurface } from '@volter/editor-sdk/kit/game-surface-defaults';
|
|
75
76
|
|
|
76
77
|
export interface MountIngestOptions {
|
|
77
78
|
/**
|
|
@@ -506,6 +507,7 @@ export async function mountIngestGame(
|
|
|
506
507
|
const hostEl = document.createElement('div');
|
|
507
508
|
hostEl.id = 'container';
|
|
508
509
|
hostEl.style.cssText = `position:absolute;inset:0;width:100%;height:100%;overflow:hidden;${GAME_SURFACE_CONTAINMENT_CSS}`;
|
|
510
|
+
markGameSurface(hostEl);
|
|
509
511
|
gameContainer.appendChild(hostEl);
|
|
510
512
|
|
|
511
513
|
// THE GAME'S PAGE IS THIS BOX, from before its first module runs. A game
|
|
@@ -89,6 +89,7 @@ import { LOOP_PROBE_ABSENT, recordMountCoverage } from './mount-coverage';
|
|
|
89
89
|
import { resolveIngest2DDescriptor } from './resolve-canvas';
|
|
90
90
|
import { getIngestGame2D } from './surface-canvas';
|
|
91
91
|
import { exitActiveIngest } from './unmount-ingest-root';
|
|
92
|
+
import { markGameSurface } from '@volter/editor-sdk/kit/game-surface-defaults';
|
|
92
93
|
|
|
93
94
|
/** How this mount reached the game's runtime, in the words a capability
|
|
94
95
|
* warning hands the reader. Mechanism only — never a grade. */
|
|
@@ -148,10 +149,10 @@ function publishCanvasIngestSystems(
|
|
|
148
149
|
setActiveSystems(systems);
|
|
149
150
|
editorConsole.log(
|
|
150
151
|
contractSystems
|
|
151
|
-
? `canvas ingest: "${gameName}" declares the
|
|
152
|
+
? `canvas ingest: "${gameName}" declares the Volter game contract — ` +
|
|
152
153
|
`${contractSystems.commands?.length ?? 0} commands, ` +
|
|
153
154
|
`${contractSystems.state?.length ?? 0} state providers`
|
|
154
|
-
: `canvas ingest: "${gameName}" declares no
|
|
155
|
+
: `canvas ingest: "${gameName}" declares no Volter game contract — game.commands()/` +
|
|
155
156
|
'game.state() have nothing to answer and will refuse by naming that',
|
|
156
157
|
'ingest',
|
|
157
158
|
);
|
|
@@ -460,6 +461,7 @@ async function mountCanvasIngestRootInner(
|
|
|
460
461
|
const hostEl = document.createElement('div');
|
|
461
462
|
hostEl.id = 'container';
|
|
462
463
|
hostEl.style.cssText = `position:absolute;inset:0;width:100%;height:100%;overflow:hidden;background:#000;${GAME_SURFACE_CONTAINMENT_CSS}`;
|
|
464
|
+
markGameSurface(hostEl);
|
|
463
465
|
gameContainer.appendChild(hostEl);
|
|
464
466
|
setGameSurface(hostEl);
|
|
465
467
|
// Same scoped-CSS contract the three lane holds (ingest-root-adapter.ts):
|
package/src/play/play-mode.ts
CHANGED
|
@@ -129,6 +129,7 @@ import { bindPlayRecordingStop, endPlayRecording } from './play-recording';
|
|
|
129
129
|
import { createReactPlayAuthoringAdapter } from './react-play-live-authoring';
|
|
130
130
|
import { onThreeStore } from '@volter/editor-threejs/kit/three-state';
|
|
131
131
|
import { presentViewportRoots } from '@volter/editor-threejs/viewport-door';
|
|
132
|
+
import { markGameSurface } from '@volter/editor-sdk/kit/game-surface-defaults';
|
|
132
133
|
|
|
133
134
|
/** Context needed by the orchestrator (passed from the world root's stage). */
|
|
134
135
|
export interface PlayModeContext {
|
|
@@ -1603,6 +1604,7 @@ async function enterPlayModeInner(
|
|
|
1603
1604
|
if (!gameContainer.style.contain) {
|
|
1604
1605
|
gameContainer.style.cssText += GAME_SURFACE_CONTAINMENT_CSS;
|
|
1605
1606
|
}
|
|
1607
|
+
markGameSurface(gameContainer);
|
|
1606
1608
|
markGameCssScope(gameContainer);
|
|
1607
1609
|
setGameSurface(gameContainer);
|
|
1608
1610
|
|
|
@@ -1967,6 +1969,7 @@ export async function mountAdditionalInstance(
|
|
|
1967
1969
|
if (!container.style.contain) {
|
|
1968
1970
|
container.style.cssText += GAME_SURFACE_CONTAINMENT_CSS;
|
|
1969
1971
|
}
|
|
1972
|
+
markGameSurface(container);
|
|
1970
1973
|
markGameCssScope(container);
|
|
1971
1974
|
setGameSurface(container, mountId);
|
|
1972
1975
|
const { mountManifestRoots } = await import('../runtime/mount-manifest');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* export { debug } from './commands';
|
|
7
7
|
*
|
|
8
|
-
* The command module imports no
|
|
8
|
+
* The command module imports no Volter API. Its functions are the application's
|
|
9
9
|
* own functions over its own stores; the native adapter merely projects that
|
|
10
10
|
* existing registry onto the session debug/input doors after the root mounts.
|
|
11
11
|
* Loading through the root entry is load-bearing: the functions close over the
|