@volter/editor-game 0.5.68 → 0.5.70
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/NOTICE +7 -7
- package/contributions/autoplay.service.ts +1 -1
- package/contributions/build-profiles.document.tsx +1 -1
- package/contributions/build-progress.status.tsx +2 -2
- package/contributions/build.header.tsx +1 -1
- package/contributions/connection.status.tsx +1 -1
- package/contributions/coverage.service.ts +2 -2
- package/contributions/game-eval.command.ts +6 -6
- package/contributions/gameplay.command.ts +2 -2
- package/contributions/generations.status.tsx +1 -1
- package/contributions/ingest.service.ts +2 -2
- package/contributions/play.command.ts +6 -6
- package/contributions/react/react-inspector.service.ts +2 -2
- package/package.json +8 -8
- package/serving/index.ts +1 -1
- package/src/asset-budget/AssetBudgetPanel.tsx +1 -1
- package/src/asset-budget/asset-budget-model.ts +14 -14
- package/src/asset-budget/optimize-apply.ts +8 -8
- package/src/bridge/call.ts +3 -3
- package/src/bridge/dispatch.ts +12 -12
- package/src/bridge/screenshot.ts +6 -6
- package/src/build/BuildProfilesPanel.tsx +8 -8
- package/src/canvas/canvas-board/CanvasBoardDocument.tsx +2 -2
- package/src/canvas/canvas-board/canvas-component-board.ts +1 -1
- package/src/canvas/canvas-design-mount.ts +1 -1
- package/src/coverage/live-project-verbs.ts +3 -3
- package/src/coverage/native-system-coverage.ts +3 -3
- package/src/coverage/root-coverage.ts +2 -2
- package/src/coverage/session-coverage.ts +2 -2
- package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +2 -2
- package/src/game-document/DevicePresetPicker.tsx +6 -6
- package/src/game-document/GameCaptureFrameButton.tsx +1 -1
- package/src/game-document/GameDocument.tsx +2 -2
- package/src/game-document/GamePanel.tsx +9 -9
- package/src/game-document/InstanceInspectorPicker.tsx +1 -1
- package/src/game-document/device-preview.ts +4 -4
- package/src/game-document/physics-debug.ts +2 -2
- package/src/generation/GenerationActivity.tsx +22 -22
- package/src/generation/GenerationGallery.css +79 -79
- package/src/generation/generation-documents.tsx +25 -25
- package/src/generation/generation-presentation.ts +1 -1
- package/src/host/adapter-reach.ts +1 -1
- package/src/host/adapter-runtime-bindings.ts +5 -5
- package/src/host/after-paint.ts +3 -3
- package/src/host/api/configurations.ts +1 -1
- package/src/host/authoring/canvas-runtime-recognition.ts +2 -2
- package/src/host/authoring/contract-hierarchy-authoring.ts +6 -6
- package/src/host/authoring/contract-scenes-stories.ts +5 -5
- package/src/host/authoring/ingest-data-writer.ts +1 -1
- package/src/host/authoring/ingest-source-persistence.ts +2 -2
- package/src/host/authoring/mount-isolated-pixi-screen.ts +1 -1
- package/src/host/authoring/pixi-authoring-adapter.ts +60 -4
- package/src/host/authoring/pixi-creatable-kinds.ts +18 -0
- package/src/host/authoring/pixi-live-write-target.ts +6 -5
- package/src/host/authoring/pixi-source-write-target.ts +5 -2
- package/src/host/authoring/pixi-structure-history.ts +3 -3
- package/src/host/binding-resolver.ts +6 -6
- package/src/host/browser-transpile.ts +11 -11
- package/src/host/canvas-preview-frames.ts +1 -1
- package/src/host/components/CameraAuthoringOverlay.tsx +14 -14
- package/src/host/components/HeaderTelemetry.tsx +11 -11
- package/src/host/components/PixiIsolationSceneContent.tsx +2 -2
- package/src/host/components/ResolutionPicker.tsx +4 -4
- package/src/host/components/scene-document.tsx +3 -3
- package/src/host/components/world-root-stage-binding.tsx +1 -1
- package/src/host/components/world-root-stage.ts +1 -1
- package/src/host/coverage/authoring-read-probe.ts +1 -1
- package/src/host/coverage/capability-coverage.ts +22 -22
- package/src/host/coverage/game-contract-seam-evidence.ts +8 -8
- package/src/host/coverage/project-verb-coverage.ts +1 -1
- package/src/host/coverage/system-adapter-coverage.ts +19 -6
- package/src/host/game-location-guard.ts +4 -4
- package/src/host/game-module-access.ts +6 -6
- package/src/host/game-realm-page.ts +3 -3
- package/src/host/game-realm-reclaim.ts +1 -1
- package/src/host/gameplay-recording.ts +5 -5
- package/src/host/gated-globals.ts +13 -13
- package/src/host/ingest/registry.ts +14 -14
- package/src/host/play-control-hook.ts +1 -1
- package/src/host/playwright-shim.ts +3 -3
- package/src/host/projection/pixi.ts +2 -2
- package/src/host/react-mount-runtime.ts +1 -1
- package/src/host/roots/canvas-root.tsx +2 -2
- package/src/host/roots/r3f-root.tsx +1 -1
- package/src/host/scene-view-drawability.ts +1 -1
- package/src/host/sdk/tools.ts +1 -1
- package/src/host/staged-projects.ts +1 -1
- package/src/host/stories/story-pixi-preview.ts +1 -1
- package/src/host/stories/story-three-preview.ts +1 -1
- package/src/host/three-ingest-runtime.ts +1 -1
- 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 +11 -11
- package/src/ingest/capture-wait-report.ts +4 -4
- package/src/ingest/discovery-public-ingest.ts +4 -4
- package/src/ingest/dom-stub-mark.ts +1 -1
- package/src/ingest/entry-load.ts +1 -1
- package/src/ingest/game-contract-realm.ts +3 -3
- package/src/ingest/game-pointer-lock.ts +1 -1
- package/src/ingest/ingest-canvas-scene-document.tsx +2 -2
- package/src/ingest/ingest-evidence-hook.ts +6 -6
- package/src/ingest/ingest-frame-snapshot.ts +2 -2
- package/src/ingest/ingest-play-commands.ts +1 -1
- package/src/ingest/ingest-play-control.ts +11 -11
- package/src/ingest/ingest-render-debug.ts +5 -5
- package/src/ingest/ingest-siblings.ts +3 -3
- package/src/ingest/module-mode.ts +2 -2
- package/src/ingest/mount-canvas-ingest-root.ts +10 -10
- package/src/ingest/mount-coverage.ts +3 -3
- package/src/ingest/mount-dom-ingest-root.ts +7 -7
- package/src/ingest/mount-ingest-root.ts +11 -11
- package/src/ingest/mount-three-ingest-root.ts +5 -5
- package/src/ingest/resolve-three.ts +2 -2
- package/src/ingest/served-bundle.ts +6 -6
- package/src/ingest/served-html-boot.ts +8 -8
- package/src/ingest/surface-dom.ts +9 -9
- package/src/ingest/surface-three.ts +1 -1
- package/src/ingest/types.ts +1 -1
- package/src/ingest/unmount-ingest-root.ts +3 -3
- package/src/network/NetworkInspectorPanel.tsx +2 -2
- package/src/play/play-boot-stall.ts +1 -1
- package/src/play/play-mode.ts +31 -30
- package/src/play/play-recording.ts +12 -12
- package/src/play-bar/PlayBar.tsx +8 -8
- package/src/play-bar/PlayerCountPicker.tsx +3 -3
- package/src/profiler/FrameDebuggerPanel.tsx +2 -2
- package/src/profiler/PerformancePanel.tsx +4 -4
- package/src/react/design-time-react-mount.ts +5 -5
- package/src/react/dom-authoring-adapter.ts +3 -3
- package/src/react/react-inspector-section.tsx +2 -2
- package/src/react/react-world-authoring-adapter.ts +20 -20
- package/src/react/story-documents/story-documents.tsx +4 -4
- package/src/react/ui-component-board.ts +1 -1
- package/src/runtime/adapter/audio-meter.ts +1 -1
- package/src/runtime/adapter/ingest/contract-debug-adapter.ts +4 -4
- package/src/runtime/adapter/ingest/contract-system-adapters.ts +9 -9
- package/src/runtime/adapter/ingest/merge-debug-adapters.ts +2 -2
- package/src/runtime/adapter/ingest/observation-debug-adapter.ts +1 -1
- package/src/runtime/adapter/native-debug-module.ts +5 -5
- package/src/runtime/audio/pose-guard.ts +1 -1
- package/src/runtime/core/game-scoped-slot.ts +1 -1
- package/src/runtime/create-runtime.ts +15 -15
- package/src/runtime/debug-bridge.ts +25 -25
- package/src/runtime/debug-registry.ts +17 -17
- package/src/runtime/dev/instruments.ts +1 -1
- package/src/runtime/dev/performance-profiler.ts +2 -2
- package/src/runtime/dev/register-render-vitals.ts +2 -2
- package/src/runtime/dev/static-batch-advisor.ts +3 -3
- package/src/runtime/dev-build.ts +3 -3
- package/src/runtime/game.ts +5 -5
- package/src/runtime/input-router.ts +1 -1
- package/src/runtime/mount-manifest.ts +10 -10
- package/src/runtime/pixi/authoring.ts +1 -1
- package/src/runtime/pixi/ingest.ts +1 -1
- package/src/runtime/presentation.ts +1 -1
- package/src/runtime/render-control.ts +21 -21
- package/src/runtime/render-seed.ts +3 -3
- package/src/runtime/run-ticks-settled.ts +1 -1
- package/src/services/game-audio.ts +3 -3
- package/src/services/game-network.ts +4 -4
- package/src/three/authoring/model-asset-inspector-section.css +15 -15
- package/src/three/authoring/model-asset-inspector-section.tsx +7 -7
- package/src/three/authoring/r3f-design-session.ts +10 -10
- package/src/three/authoring/r3f-source-authoring-adapter.ts +5 -5
- package/src/three/authoring/three-authoring-adapter.ts +5 -4
- package/src/three/authoring/typed-three-inspector.ts +1 -1
- package/src/three/story-documents/three-story-documents.tsx +3 -3
- package/src/three/three-board/board-scene.ts +9 -9
- package/src/three/three-board/three-component-board.ts +1 -1
|
@@ -2,40 +2,40 @@
|
|
|
2
2
|
action slot — every projection heads a section the same way — so a block's
|
|
3
3
|
verb sits at the top of its BODY, where it reads identically in the card
|
|
4
4
|
and the column. */
|
|
5
|
-
.
|
|
5
|
+
.volter-model-inspector-actions {
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: flex-end;
|
|
8
|
-
padding: var(--
|
|
8
|
+
padding: var(--volter-space-2) var(--volter-space-3) 0;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.
|
|
11
|
+
.volter-model-inspector-row > div {
|
|
12
12
|
display: grid;
|
|
13
13
|
min-width: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.volter-model-inspector-list {
|
|
17
17
|
display: grid;
|
|
18
18
|
max-height: 360px;
|
|
19
|
-
gap: var(--
|
|
19
|
+
gap: var(--volter-space-2);
|
|
20
20
|
overflow: auto;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
.volter-model-inspector-row {
|
|
24
24
|
display: grid;
|
|
25
25
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
26
26
|
align-items: center;
|
|
27
|
-
gap: var(--
|
|
28
|
-
padding: var(--
|
|
27
|
+
gap: var(--volter-space-3);
|
|
28
|
+
padding: var(--volter-space-3);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
.volter-model-inspector-row:has(.volter-model-material-swatch) {
|
|
32
32
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.
|
|
36
|
-
width: var(--
|
|
37
|
-
height: var(--
|
|
38
|
-
border: var(--
|
|
39
|
-
border-radius: var(--
|
|
40
|
-
background-color: var(--
|
|
35
|
+
.volter-model-material-swatch {
|
|
36
|
+
width: var(--volter-control-default-height);
|
|
37
|
+
height: var(--volter-control-default-height);
|
|
38
|
+
border: var(--volter-stroke-resting) solid var(--volter-boundary-strong);
|
|
39
|
+
border-radius: var(--volter-radius-sm);
|
|
40
|
+
background-color: var(--volter-surface-inset);
|
|
41
41
|
}
|
|
@@ -329,11 +329,11 @@ function MaterialsBody({
|
|
|
329
329
|
/>
|
|
330
330
|
</FieldRow>
|
|
331
331
|
</FieldGroup>
|
|
332
|
-
<div className="
|
|
332
|
+
<div className="volter-model-inspector-list">
|
|
333
333
|
{materials.map(({ material, rowKey }) => (
|
|
334
|
-
<EditorSurface key={rowKey} variant="raised" border className="
|
|
334
|
+
<EditorSurface key={rowKey} variant="raised" border className="volter-model-inspector-row">
|
|
335
335
|
<span
|
|
336
|
-
className="
|
|
336
|
+
className="volter-model-material-swatch"
|
|
337
337
|
style={{ background: material.color ?? undefined }}
|
|
338
338
|
aria-hidden="true"
|
|
339
339
|
/>
|
|
@@ -381,7 +381,7 @@ function SourceBody({
|
|
|
381
381
|
return (
|
|
382
382
|
<>
|
|
383
383
|
{sourceContribution ? (
|
|
384
|
-
<div className="
|
|
384
|
+
<div className="volter-model-inspector-actions">
|
|
385
385
|
<Button
|
|
386
386
|
type="button"
|
|
387
387
|
variant="ghost"
|
|
@@ -583,16 +583,16 @@ function NativeMaterialsBody({
|
|
|
583
583
|
readonly materials: Object3DNodeInspection['materials'];
|
|
584
584
|
}) {
|
|
585
585
|
return (
|
|
586
|
-
<div className="
|
|
586
|
+
<div className="volter-model-inspector-list">
|
|
587
587
|
{materials.map((material) => (
|
|
588
588
|
<EditorSurface
|
|
589
589
|
key={material.id}
|
|
590
590
|
variant="raised"
|
|
591
591
|
border
|
|
592
|
-
className="
|
|
592
|
+
className="volter-model-inspector-row"
|
|
593
593
|
>
|
|
594
594
|
<span
|
|
595
|
-
className="
|
|
595
|
+
className="volter-model-material-swatch"
|
|
596
596
|
style={{ background: material.color ?? undefined }}
|
|
597
597
|
aria-hidden="true"
|
|
598
598
|
/>
|
|
@@ -43,13 +43,13 @@ import { onAssetReload } from '@volter/editor-sdk/kit/project-asset-refresh';
|
|
|
43
43
|
* registered — through the SAME `setActiveSystems` door play/ingest/module
|
|
44
44
|
* modes use, under the UNNAMED (solo) seat. That is what lets the relay
|
|
45
45
|
* answer `list-gameplay-state`/`inspect-gameplay-state`/
|
|
46
|
-
* `list-debug-commands`/`invoke-debug-command` and `
|
|
46
|
+
* `list-debug-commands`/`invoke-debug-command` and `volter-game-editor eval`'s
|
|
47
47
|
* `game.state()`/`game.commands()` from the EDIT world. It publishes
|
|
48
48
|
* declarations, never a run: the loop is still never advanced.
|
|
49
49
|
* - SHARERS: none, ever, at the same instant. Play mode registers its mount
|
|
50
50
|
* under its OWN mount id, so a seat held by both would make
|
|
51
51
|
* `systemsForInstance(undefined)` ambiguous and break every unaddressed
|
|
52
|
-
* `
|
|
52
|
+
* `volter-game-editor eval` call. The store subscription below therefore withdraws this
|
|
53
53
|
* seat the moment `playState` leaves 'stopped' — synchronously, at
|
|
54
54
|
* `store.setPlayState('playing')`, long before play's own
|
|
55
55
|
* `setActiveSystems` lands — and republishes when play ends without a
|
|
@@ -321,7 +321,7 @@ function rebuildWhenPlayStops(store: EditorShellStore): () => void {
|
|
|
321
321
|
* - source write-back posted to `/__ui-source/*` →
|
|
322
322
|
* the session's recorder reads/writes the same files through
|
|
323
323
|
* storage, running the SAME `planSourceEdit` the server does;
|
|
324
|
-
* - the remount trigger was Vite's `
|
|
324
|
+
* - the remount trigger was Vite's `volter:r3f-entry-update` HMR event →
|
|
325
325
|
* `StorageBackend.watch`, which in a server-less editor reports the
|
|
326
326
|
* editor's own writes (exactly the signal absorb-by-remount needs).
|
|
327
327
|
* A hosted EXAMPLE (`?project=<id>`) is still excluded: it is opened read-only
|
|
@@ -697,7 +697,7 @@ export async function mountR3FDesignSession(
|
|
|
697
697
|
clearTimeout(stallTimer);
|
|
698
698
|
// PD-1: report the failure and FALL THROUGH — a first mount that throws
|
|
699
699
|
// must not kill the session. This used to `return`, which skipped the
|
|
700
|
-
// `
|
|
700
|
+
// `volter:r3f-entry-update` subscription and the play-handoff store
|
|
701
701
|
// subscription installed below, so the world stayed a Boundary
|
|
702
702
|
// ("Unavailable" in the hierarchy) with a stale error report for the rest
|
|
703
703
|
// of the page's life: fixing the source recovered NOTHING, and the only
|
|
@@ -901,7 +901,7 @@ export async function mountR3FDesignSession(
|
|
|
901
901
|
const alive = restoreIds.filter((id) => adapter?.hierarchy.node(id) !== null);
|
|
902
902
|
if (alive.length > 0) store.shell.selectMultiple(alive);
|
|
903
903
|
// PD-1: this world is mounted again — retract its failure report so the
|
|
904
|
-
// status item (and `
|
|
904
|
+
// status item (and `volter-game-editor status`) can go back to healthy.
|
|
905
905
|
clearMountFailureReport(worldId);
|
|
906
906
|
// The plane follows the FRESH game (`disposeMounted` withdrew the old
|
|
907
907
|
// one's), so a stat added by the edit that triggered this remount is
|
|
@@ -1101,12 +1101,12 @@ export async function mountR3FDesignSession(
|
|
|
1101
1101
|
// refreshes still need an inspector/viewport notification.
|
|
1102
1102
|
store.shell.notifyIngestEdit();
|
|
1103
1103
|
};
|
|
1104
|
-
hot.on('
|
|
1105
|
-
hot.on('
|
|
1104
|
+
hot.on('volter:r3f-entry-update', onUpdate);
|
|
1105
|
+
hot.on('volter:r3f-refresh-source', onSource);
|
|
1106
1106
|
hot.on('vite:afterUpdate', onRefreshed);
|
|
1107
1107
|
disposeHot = () => {
|
|
1108
|
-
hot.off('
|
|
1109
|
-
hot.off('
|
|
1108
|
+
hot.off('volter:r3f-entry-update', onUpdate);
|
|
1109
|
+
hot.off('volter:r3f-refresh-source', onSource);
|
|
1110
1110
|
hot.off('vite:afterUpdate', onRefreshed);
|
|
1111
1111
|
clearTimeout(revisionFallback);
|
|
1112
1112
|
};
|
|
@@ -1141,7 +1141,7 @@ export async function mountR3FDesignSession(
|
|
|
1141
1141
|
if (torndown) return;
|
|
1142
1142
|
// Seat handover, BEFORE the deferred visual suspend below: play mode
|
|
1143
1143
|
// registers under its own mount id, so holding both seats would make an
|
|
1144
|
-
// unaddressed `
|
|
1144
|
+
// unaddressed `volter-game-editor eval` ambiguous. This fires at
|
|
1145
1145
|
// `store.setPlayState('playing')`, which precedes play's own
|
|
1146
1146
|
// `setActiveSystems` — so the two never overlap in either direction.
|
|
1147
1147
|
if (store.shell.playState === 'stopped') publishPlane();
|
|
@@ -215,13 +215,13 @@ const isHiddenProp = (name: string): boolean =>
|
|
|
215
215
|
HIDDEN_PROPS.has(name) ||
|
|
216
216
|
/^on[A-Z]/.test(name) ||
|
|
217
217
|
name.startsWith('userData-') ||
|
|
218
|
-
// The editor's OWN injected identity props (`
|
|
218
|
+
// The editor's OWN injected identity props (`__volterOid`, `__volterLabel` —
|
|
219
219
|
// `oid-transform.ts`'s callsite stamp). They never reach here today, because
|
|
220
220
|
// attrs are read from the file on disk while the stamp exists only in the
|
|
221
221
|
// transformed module — but they are the one prop family whose removal would
|
|
222
222
|
// break instance identity outright, so the guard is stated rather than
|
|
223
223
|
// inferred from that layering.
|
|
224
|
-
name.startsWith('
|
|
224
|
+
name.startsWith('__volter');
|
|
225
225
|
|
|
226
226
|
/** Owned by the Transform section at the top of the panel, and by the Name
|
|
227
227
|
* field in the header — listing them again showed the same value twice. */
|
|
@@ -498,7 +498,7 @@ const R3F_CREATE_PRESETS: Record<string, string> = {
|
|
|
498
498
|
* no props to configure yet, so the hand-rolled loader component would be a
|
|
499
499
|
* copy of the library's with nothing added — and a component is what an author
|
|
500
500
|
* writes THEMSELVES once the model needs behavior, by editing this callsite.
|
|
501
|
-
* Deliberately NOT a
|
|
501
|
+
* Deliberately NOT a volter wrapper or a runtime indirection: the inserted line is
|
|
502
502
|
* the line a human would write, and every later edit is drei's own API.
|
|
503
503
|
*/
|
|
504
504
|
const MODEL_EXTENSION_RE = /\.(glb|gltf)$/i;
|
|
@@ -958,7 +958,7 @@ export class R3fSourceAuthoringAdapter implements AuthoringAdapter {
|
|
|
958
958
|
// system, positively. Asking it by ATTEMPTING the read routes an
|
|
959
959
|
// ordinary absence through the source backend's failure path, which
|
|
960
960
|
// ANNOUNCES before it throws — so every project that simply never ran
|
|
961
|
-
// `
|
|
961
|
+
// `volter-game-editor add reflections` carried a permanent unresolved console error
|
|
962
962
|
// about a file it is not supposed to have (runhuman pass 92, on the
|
|
963
963
|
// strategy example). The catch swallowed the exception; it could not
|
|
964
964
|
// swallow the report.
|
|
@@ -1029,7 +1029,7 @@ export class R3fSourceAuthoringAdapter implements AuthoringAdapter {
|
|
|
1029
1029
|
* different keys on the SAME object. `@volter/editor-react`'s `serving/ui-oid-plugin.ts`'s transform stamps a
|
|
1030
1030
|
* host element inside a component definition with BOTH
|
|
1031
1031
|
* `userData-oid="<this element, in the definition file>"` AND
|
|
1032
|
-
* `userData-authoringInstance={
|
|
1032
|
+
* `userData-authoringInstance={__volterOid}` (the callsite oid, passed in as a
|
|
1033
1033
|
* prop). `oidOf` deliberately prefers the callsite — that is what makes an
|
|
1034
1034
|
* instance select and write as one authoring object — so the definition entry
|
|
1035
1035
|
* is only reachable by reading the raw `oid` key here.
|
|
@@ -129,7 +129,7 @@ import type {
|
|
|
129
129
|
TruthProvider,
|
|
130
130
|
WriteAnchorKind,
|
|
131
131
|
} from '@volter/editor-project/adapter';
|
|
132
|
-
import { emptyWriteAnchorKindCounts } from '@volter/editor-project/adapter';
|
|
132
|
+
import { emptyWriteAnchorKindCounts, physicsOwnerOf } from '@volter/editor-project/adapter';
|
|
133
133
|
import { isEditorOwnedObject } from '@volter/editor-threejs/viewport/editor-layers';
|
|
134
134
|
import { bodyOwningNode } from '@volter/threejs-runtime/adapter/body-marks';
|
|
135
135
|
import { colorMaterialOf } from '@volter/threejs-runtime/adapter/ingest/structural-ids';
|
|
@@ -388,7 +388,7 @@ export class ThreeAuthoringAdapter implements AuthoringAdapter {
|
|
|
388
388
|
*/
|
|
389
389
|
private physicsFor(id: string): PhysicsAdapter | null {
|
|
390
390
|
const physics = getActivePhysics();
|
|
391
|
-
return physics && physics
|
|
391
|
+
return physics && physicsOwnerOf(physics, id) !== 'unresolved' ? physics : null;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
/** This session's edits, keyed by node id. In-memory only. */
|
|
@@ -760,7 +760,7 @@ export class ThreeAuthoringAdapter implements AuthoringAdapter {
|
|
|
760
760
|
// A custom JSX tag is not necessarily a reusable component boundary. Importer runtimes use a
|
|
761
761
|
// project-local component as the native ENTITY constructor (for example `<UnityNode>` creates
|
|
762
762
|
// one Unity GameObject) and declare that with the existing `authoringRoot` mark. Keep it an
|
|
763
|
-
// ordinary entity here. A real prefab root can carry the same mark plus `
|
|
763
|
+
// ordinary entity here. A real prefab root can carry the same mark plus `volterComponentRoot`;
|
|
764
764
|
// the hierarchy mark projection applies that explicit component identity afterwards.
|
|
765
765
|
const instanceRoot =
|
|
766
766
|
isComponentInstanceRoot(object) && getUserData(object, 'authoringRoot') !== true;
|
|
@@ -1078,7 +1078,8 @@ export class ThreeAuthoringAdapter implements AuthoringAdapter {
|
|
|
1078
1078
|
const cached = this.bodyOwnershipByObject.get(object);
|
|
1079
1079
|
if (cached !== undefined) return cached;
|
|
1080
1080
|
|
|
1081
|
-
const
|
|
1081
|
+
const physics = getActivePhysics();
|
|
1082
|
+
const owner = physics ? physicsOwnerOf(physics, id) : undefined;
|
|
1082
1083
|
if (owner === 'physics') {
|
|
1083
1084
|
this.bodyOwnershipByObject.set(object, true);
|
|
1084
1085
|
return true;
|
|
@@ -128,7 +128,7 @@ function readColor(value: unknown): string | undefined {
|
|
|
128
128
|
* arrived inside a `.glb` has no URL at all. Stamping the path we were handed
|
|
129
129
|
* is what lets the slot read back the same string the picker offered.
|
|
130
130
|
*/
|
|
131
|
-
const ASSET_PATH_KEY = '
|
|
131
|
+
const ASSET_PATH_KEY = 'volterAssetPath';
|
|
132
132
|
|
|
133
133
|
/** Textures THIS module loaded. Only these are disposed on reassign/clear —
|
|
134
134
|
* a texture that came from a GLB or the game's own code may be shared by
|
|
@@ -520,7 +520,7 @@ function ThreeStoryArgsSection() {
|
|
|
520
520
|
</span>
|
|
521
521
|
{descriptor.type === 'boolean' ? (
|
|
522
522
|
<Checkbox
|
|
523
|
-
className="
|
|
523
|
+
className="volter-checkbox"
|
|
524
524
|
data-testid={`three-story-arg-${descriptor.label}`}
|
|
525
525
|
checked={args[descriptor.label] === true}
|
|
526
526
|
onChange={(e) =>
|
|
@@ -530,7 +530,7 @@ function ThreeStoryArgsSection() {
|
|
|
530
530
|
) : descriptor.type === 'number' ? (
|
|
531
531
|
<TextInput
|
|
532
532
|
type="number"
|
|
533
|
-
className="
|
|
533
|
+
className="volter-input"
|
|
534
534
|
data-testid={`three-story-arg-${descriptor.label}`}
|
|
535
535
|
value={args[descriptor.label] as number}
|
|
536
536
|
onChange={(e) => {
|
|
@@ -549,7 +549,7 @@ function ThreeStoryArgsSection() {
|
|
|
549
549
|
) : descriptor.type === 'string' ? (
|
|
550
550
|
<TextInput
|
|
551
551
|
type="text"
|
|
552
|
-
className="
|
|
552
|
+
className="volter-input"
|
|
553
553
|
data-testid={`three-story-arg-${descriptor.label}`}
|
|
554
554
|
value={args[descriptor.label] as string}
|
|
555
555
|
onChange={(e) =>
|
|
@@ -111,16 +111,16 @@ import {
|
|
|
111
111
|
import type { BoardBounds, BoardDistrictPlacement, BoardItemPlacement } from './board-layout';
|
|
112
112
|
|
|
113
113
|
/** `userData` key carrying an exhibit's story id, read by the picking path. */
|
|
114
|
-
export const BOARD_STORY_ID_KEY = '
|
|
114
|
+
export const BOARD_STORY_ID_KEY = 'volterBoardStoryId';
|
|
115
115
|
|
|
116
116
|
/** `userData` key carrying a ghost slot's component key (`<path>#<name>`),
|
|
117
117
|
* read by the picking path exactly like {@link BOARD_STORY_ID_KEY}. */
|
|
118
|
-
export const BOARD_COMPONENT_KEY = '
|
|
118
|
+
export const BOARD_COMPONENT_KEY = 'volterBoardComponentKey';
|
|
119
119
|
|
|
120
120
|
/** The district group key ghost slots share. A sentinel outside the story
|
|
121
121
|
* grouping model's vocabulary, so it can never collide with an authored
|
|
122
122
|
* group; the scene labels it, the layout only clusters by it. */
|
|
123
|
-
export const BOARD_GHOST_GROUP_KEY = '
|
|
123
|
+
export const BOARD_GHOST_GROUP_KEY = 'volter:board:no-story';
|
|
124
124
|
|
|
125
125
|
/** Who a given exhibit is — everything the Inspector shows for a picked object. */
|
|
126
126
|
export interface BoardStoryIdentity {
|
|
@@ -380,7 +380,7 @@ function createDistrictPad(district: BoardDistrictPlacement): THREE.Mesh {
|
|
|
380
380
|
new THREE.BoxGeometry(width, PAD_THICKNESS, depth),
|
|
381
381
|
new THREE.MeshStandardMaterial(PAD_MATERIAL_PARAMS),
|
|
382
382
|
);
|
|
383
|
-
pad.name = `
|
|
383
|
+
pad.name = `volter:board-pad:${district.groupKey || UNGROUPED_LABEL}`;
|
|
384
384
|
pad.position.set(
|
|
385
385
|
(district.extent.minX + district.extent.maxX) / 2,
|
|
386
386
|
PAD_TOP_Y - PAD_THICKNESS / 2,
|
|
@@ -430,7 +430,7 @@ function dashedFloorRectangle(width: number, depth: number): THREE.LineSegments
|
|
|
430
430
|
*/
|
|
431
431
|
function createGhostSlot(slot: BoardGhostSlot): THREE.Object3D {
|
|
432
432
|
const group = new THREE.Group();
|
|
433
|
-
group.name = `
|
|
433
|
+
group.name = `volter:board-ghost:${slot.name}`;
|
|
434
434
|
group.userData[BOARD_COMPONENT_KEY] = slot.key;
|
|
435
435
|
|
|
436
436
|
const [width, depth] = slot.placement.footprint;
|
|
@@ -596,7 +596,7 @@ function createExhibitGroup(
|
|
|
596
596
|
mounted: MountedStoryObject3D,
|
|
597
597
|
): THREE.Object3D {
|
|
598
598
|
const exhibit = new THREE.Group();
|
|
599
|
-
exhibit.name = `
|
|
599
|
+
exhibit.name = `volter:board-exhibit:${identity.label}`;
|
|
600
600
|
exhibit.position.set(...(placement.translation as [number, number, number]));
|
|
601
601
|
exhibit.add(mounted.root);
|
|
602
602
|
exhibit.userData[BOARD_STORY_ID_KEY] = identity.id;
|
|
@@ -744,9 +744,9 @@ async function assembleThreeBoard(
|
|
|
744
744
|
const tAssemble = Date.now();
|
|
745
745
|
|
|
746
746
|
const root = new THREE.Group();
|
|
747
|
-
root.name = '
|
|
747
|
+
root.name = 'volter:three-board';
|
|
748
748
|
const chrome = new THREE.Group();
|
|
749
|
-
chrome.name = '
|
|
749
|
+
chrome.name = 'volter:board-chrome';
|
|
750
750
|
markChrome(chrome);
|
|
751
751
|
root.add(chrome);
|
|
752
752
|
|
|
@@ -761,7 +761,7 @@ async function assembleThreeBoard(
|
|
|
761
761
|
for (const district of layout.districts) {
|
|
762
762
|
const ghostDistrict = district.groupKey === BOARD_GHOST_GROUP_KEY;
|
|
763
763
|
const districtGroup = new THREE.Group();
|
|
764
|
-
districtGroup.name = `
|
|
764
|
+
districtGroup.name = `volter:board-district:${
|
|
765
765
|
ghostDistrict ? GHOST_DISTRICT_LABEL : district.groupKey || UNGROUPED_LABEL
|
|
766
766
|
}`;
|
|
767
767
|
root.add(districtGroup);
|
|
@@ -57,6 +57,6 @@ export const threeComponentBoard: ComponentBoard = {
|
|
|
57
57
|
`This project has no ${THREE_COMPONENTS_TITLE} board (${THREE_COMPONENTS_DOCUMENT_ID}): ` +
|
|
58
58
|
"board presence keys on STORIES, not on roots, and none of this project's stories declares " +
|
|
59
59
|
'the "three" medium. Declare it — a manifest root entry naming the story\'s module, or a ' +
|
|
60
|
-
`\`
|
|
60
|
+
`\`volter.adapter.ts\` regionInclude that covers it — and the board appears. ${commandLine('console')} ` +
|
|
61
61
|
'names every story it could not place.',
|
|
62
62
|
};
|