@vgai/engine 0.5.10 → 0.5.12
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/README.md +6 -5
- package/dist/adapter/authoring.d.ts +51 -28
- package/dist/adapter/authoring.d.ts.map +1 -1
- package/dist/adapter/body-marks.d.ts +59 -0
- package/dist/adapter/body-marks.d.ts.map +1 -0
- package/dist/adapter/body-marks.js +62 -0
- package/dist/adapter/constraint.d.ts +41 -0
- package/dist/adapter/constraint.d.ts.map +1 -0
- package/dist/adapter/constraint.js +27 -0
- package/dist/adapter/hierarchy-marks.d.ts +138 -0
- package/dist/adapter/hierarchy-marks.d.ts.map +1 -0
- package/dist/adapter/hierarchy-marks.js +148 -0
- package/dist/adapter/index.d.ts +1 -1
- package/dist/adapter/index.d.ts.map +1 -1
- package/dist/adapter/ingest/contract-system-adapters.d.ts +64 -0
- package/dist/adapter/ingest/contract-system-adapters.d.ts.map +1 -0
- package/dist/adapter/ingest/contract-system-adapters.js +134 -0
- package/dist/adapter/ingest/game-contract.d.ts +89 -5
- package/dist/adapter/ingest/game-contract.d.ts.map +1 -1
- package/dist/adapter/ingest/game-contract.js +11 -3
- package/dist/adapter/ingest/scene-capture.d.ts +31 -4
- package/dist/adapter/ingest/scene-capture.d.ts.map +1 -1
- package/dist/adapter/ingest/scene-capture.js +29 -7
- package/dist/adapter/ingest/structural-ids.d.ts +1 -1
- package/dist/adapter/ingest/structural-ids.js +2 -2
- package/dist/adapter/reflection-probe.d.ts +53 -0
- package/dist/adapter/reflection-probe.d.ts.map +1 -0
- package/dist/adapter/reflection-probe.js +18 -0
- package/dist/asset-formats/index.d.ts +4 -10
- package/dist/asset-formats/index.d.ts.map +1 -1
- package/dist/asset-formats/index.js +3 -8
- package/dist/asset-formats/material.d.ts +0 -66
- package/dist/asset-formats/material.d.ts.map +1 -1
- package/dist/asset-formats/material.js +0 -8
- package/dist/asset-formats/mesh.d.ts +1 -2
- package/dist/asset-formats/mesh.d.ts.map +1 -1
- package/dist/asset-formats/mesh.js +3 -13
- package/dist/asset-formats/render-env.d.ts +2 -2
- package/dist/asset-parse-error.d.ts +4 -5
- package/dist/asset-parse-error.d.ts.map +1 -1
- package/dist/asset-parse-error.js +4 -5
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -0
- package/dist/data/curve.d.ts +116 -0
- package/dist/data/curve.d.ts.map +1 -0
- package/dist/data/curve.js +230 -0
- package/dist/data/vite-plugin-data.d.ts +2 -2
- package/dist/data/vite-plugin-data.d.ts.map +1 -1
- package/dist/data/vite-plugin-data.js +24 -15
- package/dist/dev/performance-profiler.d.ts +1 -0
- package/dist/dev/performance-profiler.d.ts.map +1 -1
- package/dist/dev/performance-profiler.js +25 -2
- package/dist/dev/register-render-vitals.d.ts +18 -7
- package/dist/dev/register-render-vitals.d.ts.map +1 -1
- package/dist/dev/register-render-vitals.js +35 -8
- package/dist/ecs/user-data.d.ts +49 -1
- package/dist/ecs/user-data.d.ts.map +1 -1
- package/dist/ecs/user-data.js +34 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/manifest/index.d.ts +3 -3
- package/dist/manifest/index.d.ts.map +1 -1
- package/dist/manifest/index.js +2 -2
- package/dist/manifest/load.d.ts +20 -63
- package/dist/manifest/load.d.ts.map +1 -1
- package/dist/manifest/load.js +12 -103
- package/dist/manifest/schema.d.ts +21 -103
- package/dist/manifest/schema.d.ts.map +1 -1
- package/dist/manifest/schema.js +66 -142
- package/dist/pixi/index.d.ts +2 -3
- package/dist/pixi/index.d.ts.map +1 -1
- package/dist/pixi/index.js +2 -3
- package/dist/pixi/ingest.d.ts +7 -75
- package/dist/pixi/ingest.d.ts.map +1 -1
- package/dist/pixi/ingest.js +6 -14
- package/dist/pixi/scene-capture.d.ts +2 -2
- package/dist/pixi/scene-capture.js +2 -2
- package/dist/react/use-data.d.ts +10 -5
- package/dist/react/use-data.d.ts.map +1 -1
- package/dist/react/use-data.js +15 -15
- package/dist/render/viewport-shading.d.ts +1 -1
- package/dist/render/viewport-shading.d.ts.map +1 -1
- package/dist/render/viewport-shading.js +14 -0
- package/dist/runtime/create-runtime.d.ts +12 -0
- package/dist/runtime/create-runtime.d.ts.map +1 -1
- package/dist/runtime/create-runtime.js +7 -2
- package/dist/runtime/mount-game.d.ts +1 -1
- package/dist/runtime/mount-game.d.ts.map +1 -1
- package/dist/runtime/mount-manifest.d.ts.map +1 -1
- package/dist/runtime/mount-manifest.js +5 -1
- package/dist/world3d-react/r3f-adapter.d.ts.map +1 -1
- package/dist/world3d-react/r3f-adapter.js +129 -6
- package/dist/world3d-react/renderer-config.d.ts +15 -0
- package/dist/world3d-react/renderer-config.d.ts.map +1 -1
- package/dist/world3d-react/renderer-config.js +15 -0
- package/dist/world3d-react/world-context.d.ts +11 -1
- package/dist/world3d-react/world-context.d.ts.map +1 -1
- package/dist/world3d-react/world-context.js +1 -0
- package/dist-config/config.js +140 -20
- package/dist-config/config.js.map +4 -4
- package/package.json +1 -1
- package/schemas/engine-capabilities.json +10 -10
- package/schemas/vgai-project.schema.json +22 -73
- package/src/adapter/authoring.ts +54 -31
- package/src/adapter/body-marks.ts +69 -0
- package/src/adapter/constraint.ts +71 -0
- package/src/adapter/hierarchy-marks.ts +155 -0
- package/src/adapter/index.ts +2 -3
- package/src/adapter/ingest/contract-system-adapters.ts +174 -0
- package/src/adapter/ingest/game-contract.ts +104 -6
- package/src/adapter/ingest/scene-capture.ts +61 -11
- package/src/adapter/ingest/structural-ids.ts +2 -2
- package/src/adapter/reflection-probe.ts +75 -0
- package/src/asset-formats/index.ts +4 -10
- package/src/asset-formats/material.ts +0 -11
- package/src/asset-formats/mesh.ts +3 -16
- package/src/asset-parse-error.ts +4 -5
- package/src/config.ts +13 -0
- package/src/data/curve.ts +263 -0
- package/src/data/vite-plugin-data.ts +48 -14
- package/src/dev/performance-profiler.ts +21 -2
- package/src/dev/register-render-vitals.ts +38 -8
- package/src/ecs/user-data.ts +50 -0
- package/src/index.ts +2 -3
- package/src/manifest/index.ts +3 -15
- package/src/manifest/load.ts +33 -139
- package/src/manifest/schema.ts +72 -181
- package/src/pixi/index.ts +2 -15
- package/src/pixi/ingest.ts +13 -87
- package/src/pixi/scene-capture.ts +2 -2
- package/src/react/use-data.ts +15 -20
- package/src/render/viewport-shading.ts +16 -1
- package/src/runtime/create-runtime.ts +30 -5
- package/src/runtime/mount-game.ts +1 -1
- package/src/runtime/mount-manifest.ts +5 -1
- package/src/world3d-react/r3f-adapter.tsx +142 -6
- package/src/world3d-react/renderer-config.ts +31 -0
- package/src/world3d-react/world-context.ts +11 -1
- package/dist/asset-formats/instances.d.ts +0 -17
- package/dist/asset-formats/instances.d.ts.map +0 -1
- package/dist/asset-formats/instances.js +0 -31
- package/dist/asset-formats/parse.d.ts +0 -20
- package/dist/asset-formats/parse.d.ts.map +0 -1
- package/dist/asset-formats/parse.js +0 -34
- package/dist/pixi/ingest-iframe.d.ts +0 -82
- package/dist/pixi/ingest-iframe.d.ts.map +0 -1
- package/dist/pixi/ingest-iframe.js +0 -166
- package/dist/render/instance-mesh.d.ts +0 -5
- package/dist/render/instance-mesh.d.ts.map +0 -1
- package/dist/render/instance-mesh.js +0 -19
- package/schemas/mat.schema.json +0 -255
- package/src/asset-formats/instances.ts +0 -38
- package/src/asset-formats/parse.ts +0 -39
- package/src/pixi/ingest-iframe.ts +0 -255
- package/src/render/instance-mesh.ts +0 -25
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ audio, input, the adapter seam
|
|
|
11
11
|
and the Pixi substrate for canvas-surface games (`src/pixi/`).
|
|
12
12
|
|
|
13
13
|
A world is authored as TSX/R3F **source**, and the source is the
|
|
14
|
-
document — there is no scene file
|
|
14
|
+
document — there is no serialized scene file or schema for one; TSX scene
|
|
15
|
+
composition modules remain ordinary source, and the manifest
|
|
15
16
|
schema is strict, so an unrecognized key is rejected loudly rather than
|
|
16
17
|
ignored.
|
|
17
18
|
|
|
@@ -68,10 +69,10 @@ control integration is used.
|
|
|
68
69
|
architecture and current implementation are marked separately.
|
|
69
70
|
- Schemas, in two homes (every field `.describe()`d; `npm run
|
|
70
71
|
generate-schema` emits JSON Schema for autocomplete):
|
|
71
|
-
`src/asset-formats/` (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
`src/asset-formats/` (runtime descriptors for materials, meshes, lights,
|
|
73
|
+
cameras, colliders, particles, and render settings), and
|
|
74
|
+
`src/manifest/schema.ts` (`vgai.project.json`). Input maps own their schema
|
|
75
|
+
under `src/input/`; models and materials persist in glTF or source.
|
|
75
76
|
- The adapter contracts: `src/adapter/`.
|
|
76
77
|
- Source-checkout tests are headless with real dependencies: `npm run
|
|
77
78
|
test:unit` from the repository root.
|
|
@@ -215,7 +215,7 @@ export interface InspectorProvider {
|
|
|
215
215
|
/** Schema-driven — NOT fixed to `SceneEntity`. */
|
|
216
216
|
properties(id: string): PropertyDescriptor[];
|
|
217
217
|
get(id: string, path: string): unknown;
|
|
218
|
-
set(id: string, path: string, value: unknown): void
|
|
218
|
+
set(id: string, path: string, value: unknown): void | Promise<void>;
|
|
219
219
|
/**
|
|
220
220
|
* Optional — REMOVE a property's authored override entirely (not "set to a
|
|
221
221
|
* value"), letting whatever governs it in its absence take over. The one
|
|
@@ -258,6 +258,17 @@ export interface AssetSubjectProvider {
|
|
|
258
258
|
subject: AuthoringAssetSubject;
|
|
259
259
|
}>;
|
|
260
260
|
}
|
|
261
|
+
/** A semantic jump from one authored subject to another document/subject.
|
|
262
|
+
* The adapter owns resolution and opening; the inspector only presents the
|
|
263
|
+
* title and exposes the same verb to human and serialized projections. */
|
|
264
|
+
export interface RelatedSubjectLink {
|
|
265
|
+
readonly id: string;
|
|
266
|
+
readonly title: string;
|
|
267
|
+
open(): void;
|
|
268
|
+
}
|
|
269
|
+
export interface RelatedSubjectsProvider {
|
|
270
|
+
links(id: string): readonly RelatedSubjectLink[];
|
|
271
|
+
}
|
|
261
272
|
export interface StructureProvider {
|
|
262
273
|
create(kind: string, parentId?: string): string;
|
|
263
274
|
/**
|
|
@@ -362,24 +373,6 @@ export interface PersistenceProvider {
|
|
|
362
373
|
*/
|
|
363
374
|
applyExternal?(content: unknown, rawContent?: string): void;
|
|
364
375
|
}
|
|
365
|
-
/** D8 — mutually-exclusive root groups (radio roots): e.g. a "Scenes" group whose
|
|
366
|
-
* members are the game's scene roots, only one of which is loaded/active at a
|
|
367
|
-
* time (unlike ordinary sibling roots, which all coexist). */
|
|
368
|
-
export interface RootGroup {
|
|
369
|
-
id: string;
|
|
370
|
-
label: string;
|
|
371
|
-
memberRootIds: string[];
|
|
372
|
-
activeRootId: string | null;
|
|
373
|
-
}
|
|
374
|
-
export interface RootGroupsProvider {
|
|
375
|
-
groups(): RootGroup[];
|
|
376
|
-
activate(groupId: string, rootId: string): Promise<void> | void;
|
|
377
|
-
}
|
|
378
|
-
/** D8 — data-file → root mapping ("opening a file" = activating its root). */
|
|
379
|
-
export interface FileMapProvider {
|
|
380
|
-
/** project-relative path → node id this adapter maps it to, else null. */
|
|
381
|
-
rootForFile(path: string): string | null;
|
|
382
|
-
}
|
|
383
376
|
/** D12 — per-layer viewport picking. Coordinates are client (browser) px. */
|
|
384
377
|
export interface PickProvider {
|
|
385
378
|
pick(clientX: number, clientY: number): string | null;
|
|
@@ -490,9 +483,11 @@ export interface BoxEditProvider {
|
|
|
490
483
|
/** Optional single native anchor/pivot affordance for this node. */
|
|
491
484
|
referencePoint?(id: string): BoxEditReferencePoint | null;
|
|
492
485
|
}
|
|
493
|
-
/** Text-content editing
|
|
494
|
-
*
|
|
495
|
-
*
|
|
486
|
+
/** Text-content editing, ON the contract: the react-world adapter implements this
|
|
487
|
+
* provider (`react-world-authoring-adapter.ts`'s `readonly text: TextProvider`),
|
|
488
|
+
* bringing its own `editText(id)` write path onto the seam, so the overlay's
|
|
489
|
+
* double-click-to-edit-text (D3) is contract-driven rather than reaching for a
|
|
490
|
+
* concrete adapter's method. */
|
|
496
491
|
export interface TextProvider {
|
|
497
492
|
/** the element's editable pure-text, or null if the body is dynamic/has child elements */
|
|
498
493
|
get(id: string): string | null;
|
|
@@ -517,19 +512,50 @@ export interface ColorSampleProvider {
|
|
|
517
512
|
backgroundChainAt(clientX: number, clientY: number): string[] | null;
|
|
518
513
|
}
|
|
519
514
|
/**
|
|
520
|
-
* WO-IDX1 — where a node's live object
|
|
515
|
+
* WO-IDX1 — where a node's live object CAME FROM in the game's own truth.
|
|
521
516
|
*
|
|
522
|
-
* `display` is the
|
|
517
|
+
* `display` is the string the editor shows verbatim. The unanchored shape
|
|
523
518
|
* carries a `reason` rather than a blank, because "we don't know" and "a
|
|
524
519
|
* library built it" are different facts and neither may present as silence
|
|
525
520
|
* (the honest-floor rule).
|
|
521
|
+
*
|
|
522
|
+
* TWO ANCHORED KINDS, because a game has two kinds of truth and only one of
|
|
523
|
+
* them is source.
|
|
524
|
+
*
|
|
525
|
+
* - `source` is the original: a `new` expression at a `file:line:col` in the
|
|
526
|
+
* game's own code, which is where an edit to a constructor literal has to be
|
|
527
|
+
* written.
|
|
528
|
+
* - `data` is the sibling a level-based game needs. Descent's placed cargo —
|
|
529
|
+
* the robots, the powerups, the hostages — reaches no source literal at all;
|
|
530
|
+
* it is binary records inside `descent.hog` that the game parses at load. An
|
|
531
|
+
* authored move of a robot is therefore an edit to THE GAME'S OWN DATA, and
|
|
532
|
+
* the honest anchor is the data file plus the index of the record that
|
|
533
|
+
* addresses the object inside it.
|
|
534
|
+
*
|
|
535
|
+
* `kind` is an explicit discriminant rather than an inferred one, so a consumer
|
|
536
|
+
* that only understands source anchors fails to compile against a data anchor
|
|
537
|
+
* instead of silently reading `line` off something that has none.
|
|
538
|
+
*
|
|
539
|
+
* A data record is EXACTLY ONE object by construction — an index addresses one
|
|
540
|
+
* record — so the "how many objects did this site construct?" question that
|
|
541
|
+
* governs a source write has no data-side analogue and must not be invented
|
|
542
|
+
* for one.
|
|
526
543
|
*/
|
|
527
544
|
export type NodeCreationSite = {
|
|
528
545
|
anchored: true;
|
|
546
|
+
kind: 'source';
|
|
529
547
|
file: string;
|
|
530
548
|
line: number;
|
|
531
549
|
col: number;
|
|
532
550
|
display: string;
|
|
551
|
+
} | {
|
|
552
|
+
anchored: true;
|
|
553
|
+
kind: 'data';
|
|
554
|
+
/** Project-relative path of the game's own data file, POSIX separators. */
|
|
555
|
+
file: string;
|
|
556
|
+
/** Index of the record inside that file which addresses this object. */
|
|
557
|
+
record: number;
|
|
558
|
+
display: string;
|
|
533
559
|
} | {
|
|
534
560
|
anchored: false;
|
|
535
561
|
reason: string;
|
|
@@ -554,12 +580,9 @@ export interface AuthoringAdapter {
|
|
|
554
580
|
readonly inspector?: InspectorProvider;
|
|
555
581
|
/** The selected node is an atomic asset that can open in the Asset Editor. */
|
|
556
582
|
readonly assetSubject?: AssetSubjectProvider;
|
|
583
|
+
readonly related?: RelatedSubjectsProvider;
|
|
557
584
|
readonly structure?: StructureProvider;
|
|
558
585
|
readonly persistence?: PersistenceProvider;
|
|
559
|
-
/** D8 — mutually-exclusive root groups (radio roots). Absent ⇒ no grouped roots. */
|
|
560
|
-
readonly rootGroups?: RootGroupsProvider;
|
|
561
|
-
/** D8 — data-file → root mapping. Absent ⇒ this adapter maps no files to roots. */
|
|
562
|
-
readonly files?: FileMapProvider;
|
|
563
586
|
/** D12 — per-layer viewport picking. Absent ⇒ this adapter is not pickable. */
|
|
564
587
|
readonly pickable?: PickProvider;
|
|
565
588
|
/** T0 (spec 27 §2) — per-node screen geometry for a DOM visual editor's overlay/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/adapter/authoring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;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,CAAC;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAC3C,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC;mFAC+E;IAC/E,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B;sEACkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC;uFACmF;IACnF,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B;4EACwE;IACxE,QAAQ,CAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAC3C,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC;2DACuD;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAC7C,iFAAiF;IACjF,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC,wCAAwC;IACxC,SAAS,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC7C;;;;;;;;OAQG;IACH,iBAAiB,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACjF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The transform-AUTHORITY convention: how a game tells the host which of its
|
|
3
|
+
* nodes have their pose written by a rigid body rather than by the node itself.
|
|
4
|
+
*
|
|
5
|
+
* Sibling of `hierarchy-marks.ts`, and the same shape of idea. That module's
|
|
6
|
+
* marks answer "what IS this node" for the panel; this one answers "who WRITES
|
|
7
|
+
* this node's pose" for an edit. Both are written by GAME code at the seam that
|
|
8
|
+
* knows the answer, read generically by the host, and namespaced `vgai*` because
|
|
9
|
+
* they are the host's namespace on a node the game owns.
|
|
10
|
+
*
|
|
11
|
+
* ## Why it exists
|
|
12
|
+
*
|
|
13
|
+
* A world that simulates writes `node.position/quaternion` FROM its bodies every
|
|
14
|
+
* step. Setting the node is therefore not an edit — it is a value that survives
|
|
15
|
+
* until the next step and then vanishes, which is what "the gizmo does nothing"
|
|
16
|
+
* looks like from the outside. The edit has to reach the body.
|
|
17
|
+
*
|
|
18
|
+
* The host cannot find the body on its own. Three.js has no body concept, the
|
|
19
|
+
* body is usually not in the scene graph at all, and the mapping from node to
|
|
20
|
+
* body is private to whichever code built the pair. So the code that ATTACHES a
|
|
21
|
+
* body to a node draws the link in the same breath — one call, at the one place
|
|
22
|
+
* the answer is known — exactly as `markBuiltInternal` is called at the attach
|
|
23
|
+
* seam and never by a later sweep of the tree.
|
|
24
|
+
*
|
|
25
|
+
* ## Prefer the system adapter when you have one
|
|
26
|
+
*
|
|
27
|
+
* A game that already registers `SystemAdapters.physics` needs none of this: the
|
|
28
|
+
* adapter's `ownerOf`/`freeze`/`commit`/`unfreeze` is the richer answer, and the
|
|
29
|
+
* editor asks it first. This mark is for the case that seam cannot cover — a
|
|
30
|
+
* world whose bodies are built by ordinary per-scene code with no central
|
|
31
|
+
* registry to hand a `bodyFor(nodeId)` resolver (every translated import lane),
|
|
32
|
+
* where the only place node and body meet is the constructor that made both.
|
|
33
|
+
* Marked nodes reach the SAME four verbs through
|
|
34
|
+
* {@link createRapierBodyEditing}; this is a second SOURCE for one mechanism,
|
|
35
|
+
* not a second mechanism.
|
|
36
|
+
*
|
|
37
|
+
* ## What to mark
|
|
38
|
+
*
|
|
39
|
+
* The node whose pose the body writes — normally the body's own root node. Not
|
|
40
|
+
* subtree-scoped (unlike `vgaiBuiltInternal`): a child of a body-driven node
|
|
41
|
+
* inherits its parent's motion through the transform chain, and its own local
|
|
42
|
+
* pose is still the node's to keep. Mark exactly the node the sync writes.
|
|
43
|
+
*/
|
|
44
|
+
import type * as THREE from 'three';
|
|
45
|
+
import type { RapierEditableBody } from './rapier-physics-adapter';
|
|
46
|
+
/**
|
|
47
|
+
* Declare that `body` owns `node`'s pose: a transform edit on `node` is applied
|
|
48
|
+
* to `body`, and the next step is what puts the result back on the node.
|
|
49
|
+
*
|
|
50
|
+
* Call it where the pair is created. `body` is the game's OWN Rapier body,
|
|
51
|
+
* passed through unchanged — the parameter type names five of Rapier's own
|
|
52
|
+
* methods structurally (see {@link RapierEditableBody}) because this repo
|
|
53
|
+
* legitimately resolves two copies of `@dimforge/rapier3d-compat` whose
|
|
54
|
+
* `RigidBody` classes are unrelated nominal types.
|
|
55
|
+
*/
|
|
56
|
+
export declare function markBodyOwnedNode(node: THREE.Object3D, body: RapierEditableBody): void;
|
|
57
|
+
/** The body that owns `node`'s pose, or `undefined` for a node that owns its own. */
|
|
58
|
+
export declare function bodyOwningNode(node: THREE.Object3D | null | undefined): RapierEditableBody | undefined;
|
|
59
|
+
//# sourceMappingURL=body-marks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"body-marks.d.ts","sourceRoot":"","sources":["../../src/adapter/body-marks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAEtF;AAED,qFAAqF;AACrF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,GACtC,kBAAkB,GAAG,SAAS,CAGhC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The transform-AUTHORITY convention: how a game tells the host which of its
|
|
3
|
+
* nodes have their pose written by a rigid body rather than by the node itself.
|
|
4
|
+
*
|
|
5
|
+
* Sibling of `hierarchy-marks.ts`, and the same shape of idea. That module's
|
|
6
|
+
* marks answer "what IS this node" for the panel; this one answers "who WRITES
|
|
7
|
+
* this node's pose" for an edit. Both are written by GAME code at the seam that
|
|
8
|
+
* knows the answer, read generically by the host, and namespaced `vgai*` because
|
|
9
|
+
* they are the host's namespace on a node the game owns.
|
|
10
|
+
*
|
|
11
|
+
* ## Why it exists
|
|
12
|
+
*
|
|
13
|
+
* A world that simulates writes `node.position/quaternion` FROM its bodies every
|
|
14
|
+
* step. Setting the node is therefore not an edit — it is a value that survives
|
|
15
|
+
* until the next step and then vanishes, which is what "the gizmo does nothing"
|
|
16
|
+
* looks like from the outside. The edit has to reach the body.
|
|
17
|
+
*
|
|
18
|
+
* The host cannot find the body on its own. Three.js has no body concept, the
|
|
19
|
+
* body is usually not in the scene graph at all, and the mapping from node to
|
|
20
|
+
* body is private to whichever code built the pair. So the code that ATTACHES a
|
|
21
|
+
* body to a node draws the link in the same breath — one call, at the one place
|
|
22
|
+
* the answer is known — exactly as `markBuiltInternal` is called at the attach
|
|
23
|
+
* seam and never by a later sweep of the tree.
|
|
24
|
+
*
|
|
25
|
+
* ## Prefer the system adapter when you have one
|
|
26
|
+
*
|
|
27
|
+
* A game that already registers `SystemAdapters.physics` needs none of this: the
|
|
28
|
+
* adapter's `ownerOf`/`freeze`/`commit`/`unfreeze` is the richer answer, and the
|
|
29
|
+
* editor asks it first. This mark is for the case that seam cannot cover — a
|
|
30
|
+
* world whose bodies are built by ordinary per-scene code with no central
|
|
31
|
+
* registry to hand a `bodyFor(nodeId)` resolver (every translated import lane),
|
|
32
|
+
* where the only place node and body meet is the constructor that made both.
|
|
33
|
+
* Marked nodes reach the SAME four verbs through
|
|
34
|
+
* {@link createRapierBodyEditing}; this is a second SOURCE for one mechanism,
|
|
35
|
+
* not a second mechanism.
|
|
36
|
+
*
|
|
37
|
+
* ## What to mark
|
|
38
|
+
*
|
|
39
|
+
* The node whose pose the body writes — normally the body's own root node. Not
|
|
40
|
+
* subtree-scoped (unlike `vgaiBuiltInternal`): a child of a body-driven node
|
|
41
|
+
* inherits its parent's motion through the transform chain, and its own local
|
|
42
|
+
* pose is still the node's to keep. Mark exactly the node the sync writes.
|
|
43
|
+
*/
|
|
44
|
+
import { getUserData, setUserData } from '../ecs/user-data';
|
|
45
|
+
/**
|
|
46
|
+
* Declare that `body` owns `node`'s pose: a transform edit on `node` is applied
|
|
47
|
+
* to `body`, and the next step is what puts the result back on the node.
|
|
48
|
+
*
|
|
49
|
+
* Call it where the pair is created. `body` is the game's OWN Rapier body,
|
|
50
|
+
* passed through unchanged — the parameter type names five of Rapier's own
|
|
51
|
+
* methods structurally (see {@link RapierEditableBody}) because this repo
|
|
52
|
+
* legitimately resolves two copies of `@dimforge/rapier3d-compat` whose
|
|
53
|
+
* `RigidBody` classes are unrelated nominal types.
|
|
54
|
+
*/
|
|
55
|
+
export function markBodyOwnedNode(node, body) {
|
|
56
|
+
setUserData(node, 'vgaiBodyOwner', body);
|
|
57
|
+
}
|
|
58
|
+
/** The body that owns `node`'s pose, or `undefined` for a node that owns its own. */
|
|
59
|
+
export function bodyOwningNode(node) {
|
|
60
|
+
const body = getUserData(node, 'vgaiBodyOwner');
|
|
61
|
+
return body ?? undefined;
|
|
62
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format-neutral live mark for source-owned spatial constraints.
|
|
3
|
+
*
|
|
4
|
+
* The project capability that performs a solve attaches one or more marks to
|
|
5
|
+
* the Object3D that owns the constrained pose. The editor reads the marks to
|
|
6
|
+
* render an ordinary constraint stack and transient viewport handles. This is
|
|
7
|
+
* observation, not authored data: the owning TS/TSX and its ordinary target /
|
|
8
|
+
* pole Object3Ds remain the only source of truth.
|
|
9
|
+
*/
|
|
10
|
+
import type * as THREE from 'three';
|
|
11
|
+
export type ConstraintStatus = 'ready' | 'disabled' | 'unresolved' | 'error';
|
|
12
|
+
export interface ConstraintConfig {
|
|
13
|
+
/** Stable only within this mounted owner. */
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly type: 'two-bone-ik' | 'ccd-ik' | (string & {});
|
|
16
|
+
readonly label: string;
|
|
17
|
+
readonly enabled: boolean;
|
|
18
|
+
readonly weight: number;
|
|
19
|
+
/** Evaluation order among constraints attached to this owner. */
|
|
20
|
+
readonly order: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ConstraintSnapshot {
|
|
23
|
+
readonly status: ConstraintStatus;
|
|
24
|
+
readonly message?: string;
|
|
25
|
+
/** Root → effector, using the real bones from the live skeleton. */
|
|
26
|
+
readonly chain: readonly THREE.Object3D[];
|
|
27
|
+
readonly target: THREE.Object3D | null;
|
|
28
|
+
readonly pole: THREE.Object3D | null;
|
|
29
|
+
/** Effector-to-target distance after the latest solve, in world units. */
|
|
30
|
+
readonly error: number | null;
|
|
31
|
+
}
|
|
32
|
+
export interface ConstraintMark {
|
|
33
|
+
readonly config: ConstraintConfig;
|
|
34
|
+
getSnapshot(): ConstraintSnapshot;
|
|
35
|
+
}
|
|
36
|
+
export declare function constraintsOf(object: THREE.Object3D | null | undefined): readonly ConstraintMark[];
|
|
37
|
+
/** Add or replace one constraint mark without disturbing sibling constraints. */
|
|
38
|
+
export declare function setConstraintMark(object: THREE.Object3D, mark: ConstraintMark): void;
|
|
39
|
+
/** Remove one mark, or the whole live projection when no id is supplied. */
|
|
40
|
+
export declare function clearConstraintMark(object: THREE.Object3D, id?: string): void;
|
|
41
|
+
//# sourceMappingURL=constraint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraint.d.ts","sourceRoot":"","sources":["../../src/adapter/constraint.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,CAAC;AAE7E,MAAM,WAAW,g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AQ7E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { deleteUserData, getUserData, setUserData } from '../ecs/user-data';
|
|
2
|
+
export function constraintsOf(object) {
|
|
3
|
+
const candidate = getUserData(object, 'constraints');
|
|
4
|
+
if (!Array.isArray(candidate))
|
|
5
|
+
return [];
|
|
6
|
+
return candidate.filter((entry) => Boolean(entry) &&
|
|
7
|
+
typeof entry === 'object' &&
|
|
8
|
+
typeof entry.getSnapshot === 'function' &&
|
|
9
|
+
Boolean(entry.config));
|
|
10
|
+
}
|
|
11
|
+
/** Add or replace one constraint mark without disturbing sibling constraints. */
|
|
12
|
+
export function setConstraintMark(object, mark) {
|
|
13
|
+
const next = constraintsOf(object).filter((entry) => entry.config.id !== mark.config.id);
|
|
14
|
+
setUserData(object, 'constraints', [...next, mark]);
|
|
15
|
+
}
|
|
16
|
+
/** Remove one mark, or the whole live projection when no id is supplied. */
|
|
17
|
+
export function clearConstraintMark(object, id) {
|
|
18
|
+
if (id === undefined) {
|
|
19
|
+
deleteUserData(object, 'constraints');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const next = constraintsOf(object).filter((entry) => entry.config.id !== id);
|
|
23
|
+
if (next.length === 0)
|
|
24
|
+
deleteUserData(object, 'constraints');
|
|
25
|
+
else
|
|
26
|
+
setUserData(object, 'constraints', next);
|
|
27
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hierarchy-presentation convention: how a game tells the editor which
|
|
3
|
+
* parts of its LIVE scene graph are one component instance, and which parts are
|
|
4
|
+
* implementation rather than content.
|
|
5
|
+
*
|
|
6
|
+
* ## Why marks and not a second tree
|
|
7
|
+
*
|
|
8
|
+
* The live tree IS the display surface. A hierarchy derived from source would
|
|
9
|
+
* be a mirror layer — a second model of the world that drifts from the one on
|
|
10
|
+
* screen — so the boundaries a reader needs have to live ON the nodes. That is
|
|
11
|
+
* what these marks are, and it is the whole mechanism: a component WRAPS its
|
|
12
|
+
* functionality and MARKS its root; the editor supports the convention
|
|
13
|
+
* generically and never learns which library, importer or lane produced the
|
|
14
|
+
* node.
|
|
15
|
+
*
|
|
16
|
+
* ## STRUCTURE IS THE TREE'S JOB. MARKS ONLY CLASSIFY.
|
|
17
|
+
*
|
|
18
|
+
* There is deliberately no mark that says "show this row somewhere else". A
|
|
19
|
+
* group owns its children by CONTAINING them; a prefab owns its parts by
|
|
20
|
+
* CONTAINING them. If an object reads as belonging under something it is not
|
|
21
|
+
* parented to, the tree is wrong and the tree is what to fix — because the
|
|
22
|
+
* panel is not the only reader. `getWorldPosition`, raycasting, disposal,
|
|
23
|
+
* `traverse`, every physics or gameplay walk and every person reading the
|
|
24
|
+
* source all follow real parenthood, and a presentation-only "logical parent"
|
|
25
|
+
* would be true for exactly one of them.
|
|
26
|
+
*
|
|
27
|
+
* The usual reason a world gets this wrong is that three's parent chain is a
|
|
28
|
+
* TRANSFORM chain: `matrixWorld` is unconditionally `parent × local`, so an
|
|
29
|
+
* object that must not inherit its owner's pose — a physics-driven body writing
|
|
30
|
+
* a world transform every step, a world-space trail or decal, a follow camera
|
|
31
|
+
* that must escape its target's rotation — gets mounted at the scene root, and
|
|
32
|
+
* ownership is lost as a side effect. **That trade is not necessary.** Set
|
|
33
|
+
* `object.matrixWorldAutoUpdate = false` (three r144+) and the parent's
|
|
34
|
+
* propagation skips it: the object stays parented where it belongs and its
|
|
35
|
+
* `matrixWorld` becomes yours to write. Keep it parented, own the matrix, and
|
|
36
|
+
* the hierarchy needs no help.
|
|
37
|
+
*
|
|
38
|
+
* These two marks then have exactly one job left, which is CLASSIFICATION:
|
|
39
|
+
* which of the objects that really are here is the game, and which is the
|
|
40
|
+
* machinery underneath it.
|
|
41
|
+
*
|
|
42
|
+
* ## What the hierarchy is FOR
|
|
43
|
+
*
|
|
44
|
+
* It shows YOUR GAME: the structure you authored, plus the objects your game
|
|
45
|
+
* makes while it runs. Nothing else. Three consequences, and every rule below
|
|
46
|
+
* follows from them:
|
|
47
|
+
*
|
|
48
|
+
* - **A spawned object is content.** A bullet you fired, a wave of enemies, a
|
|
49
|
+
* prop pulled out of a pool and parented into the level — these are rows.
|
|
50
|
+
* They exist, you can select them, and they are usually the exact things you
|
|
51
|
+
* opened the panel to look at. An object your game frees stops being a row,
|
|
52
|
+
* because it stopped existing.
|
|
53
|
+
* - **An implementation artifact is not.** The bones behind a rig, the batched
|
|
54
|
+
* renderer behind a particle system, the instanced-mesh pools behind a tile
|
|
55
|
+
* field, the `target` object three needs in order to aim a directional
|
|
56
|
+
* light: machinery a library or a helper builds so one thing you DID author
|
|
57
|
+
* can work. It belongs UNDER that thing, folded, not beside it.
|
|
58
|
+
* - **"Not in the source file" is the wrong test for either.** Half of a
|
|
59
|
+
* running world is not in the source file — that is what running means.
|
|
60
|
+
* Folding spawned gameplay because a document does not name it is the same
|
|
61
|
+
* defect as listing bones, in the more damaging direction: the rows it loses
|
|
62
|
+
* are the ones you were looking for.
|
|
63
|
+
*
|
|
64
|
+
* ## The two marks
|
|
65
|
+
*
|
|
66
|
+
* - {@link markComponentRoot} — "this subtree is one instance of `<name>`."
|
|
67
|
+
* The editor renders it as ONE row, closed, expandable on demand. Put it on
|
|
68
|
+
* the EARLIEST point the node exists: the constructor that makes it, or the
|
|
69
|
+
* ref callback that receives it. A component whose root is a plain `<mesh>`
|
|
70
|
+
* marks that mesh.
|
|
71
|
+
* - {@link markBuiltInternal} — "this is IMPLEMENTATION, not content." It is
|
|
72
|
+
* **subtree-scoped**: marking the root of a built subtree marks everything
|
|
73
|
+
* under it, so a 60-bone rig costs one call and folding is transitive. The
|
|
74
|
+
* editor hides these rows and offers them behind the same "Reveal Internals"
|
|
75
|
+
* action a source-backed instance's internals already use — revealed rows
|
|
76
|
+
* are read-only, because there is no authored source for a rename or a
|
|
77
|
+
* reparent to write to.
|
|
78
|
+
*
|
|
79
|
+
* An instance therefore reads as the parent of everything meaningful beneath
|
|
80
|
+
* it: content nested inside an implementation node is listed under the instance
|
|
81
|
+
* rather than lost with it (the editor's `hierarchy-component-marks.ts` calls
|
|
82
|
+
* that promotion), so marking a rig does not hide the mesh skinned to it.
|
|
83
|
+
*
|
|
84
|
+
* ## Mark it where the subtree is ATTACHED, by whoever attaches it
|
|
85
|
+
*
|
|
86
|
+
* A mark belongs at the attach seam: the code that puts an implementation
|
|
87
|
+
* subtree into the world marks it in the same breath, because that code is the
|
|
88
|
+
* only thing that knows the subtree is implementation. Not a later sweep of the
|
|
89
|
+
* tree — "everything present at time T that the source did not name" is the
|
|
90
|
+
* wrong predicate twice over. It arrives too early for anything attached
|
|
91
|
+
* asynchronously (a model clone landing after its bytes resolve, a node gated
|
|
92
|
+
* on an audio decode) and too late in principle for anything attached
|
|
93
|
+
* afterwards (every spawn) — and were it re-run to catch those, it would
|
|
94
|
+
* classify each spawned object as implementation, which is the second bullet
|
|
95
|
+
* above inverted. Attach-seam marking has neither failure: it fires once, at
|
|
96
|
+
* the moment the answer is known, and an unmarked node is content by default.
|
|
97
|
+
*
|
|
98
|
+
* The subtree scope is what keeps this cheap — one call per attached root, not
|
|
99
|
+
* one per node, so a rig or a pool costs one line at the one place that builds
|
|
100
|
+
* it.
|
|
101
|
+
*
|
|
102
|
+
* ## What is NOT built-internal
|
|
103
|
+
*
|
|
104
|
+
* A node your game means as content — even one a class rather than JSX
|
|
105
|
+
* constructs — is content. `vgaiBuiltInternal` is not "the editor cannot write
|
|
106
|
+
* this"; that question is `TransformProvider.editability`'s, answered per
|
|
107
|
+
* channel with a sentence. This mark answers "is this implementation", and
|
|
108
|
+
* getting it wrong hides real content.
|
|
109
|
+
*
|
|
110
|
+
* Both keys live in the typed `userData` registry (`../ecs/user-data.ts`) so
|
|
111
|
+
* their literal strings are spelled exactly once; this module is the only
|
|
112
|
+
* reader/writer, which is why the helpers below exist at all rather than
|
|
113
|
+
* `setUserData` calls scattered through emitters and prefabs.
|
|
114
|
+
*/
|
|
115
|
+
import type * as THREE from 'three';
|
|
116
|
+
/**
|
|
117
|
+
* Declare `node` the root of one component instance, displayed under `name`.
|
|
118
|
+
*
|
|
119
|
+
* `name` is the COMPONENT's name (`'Coin'`, `'HeroBox'`), not the instance's —
|
|
120
|
+
* the instance is already named by `node.name`, and the editor prints both.
|
|
121
|
+
*/
|
|
122
|
+
export declare function markComponentRoot(node: THREE.Object3D, name: string): void;
|
|
123
|
+
/** The component name `node` is the root of, or `undefined` for an ordinary node. */
|
|
124
|
+
export declare function componentRootName(node: THREE.Object3D | null | undefined): string | undefined;
|
|
125
|
+
/** Whether `node` is a marked component-instance root. */
|
|
126
|
+
export declare function isComponentRoot(node: THREE.Object3D | null | undefined): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Declare `node` (and everything under it) IMPLEMENTATION of whatever node it
|
|
129
|
+
* sits under, rather than content of its own. Call it on the ROOT of the built
|
|
130
|
+
* subtree only, at the seam that attaches it — see this module's header for why
|
|
131
|
+
* the seam and not a sweep.
|
|
132
|
+
*/
|
|
133
|
+
export declare function markBuiltInternal(node: THREE.Object3D): void;
|
|
134
|
+
/** Whether `node` itself carries the implementation mark. Ancestry is the
|
|
135
|
+
* CALLER's walk — see this module's header for why the mark is subtree-scoped
|
|
136
|
+
* but not restamped onto descendants. */
|
|
137
|
+
export declare function isBuiltInternal(node: THREE.Object3D | null | undefined): boolean;
|
|
138
|
+
//# sourceMappingURL=hierarchy-marks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchy-marks.d.ts","sourceRoot":"","sources":["../../src/adapter/hierarchy-marks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiHG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAE1E;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG7F;AAED,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEhF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAE5D;AAED;;0CAE0C;AAC1C,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEhF"}
|