@zylem/game-lib 0.9.7 → 0.9.8
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/dist/api/game-lib.api.json +179 -219
- package/dist/api/game-lib.api.md +11 -22
- package/dist/api/game-lib.d.ts +63 -114
- package/dist/api/game-lib.typedoc.json +70212 -61079
- package/dist/audio.js +1 -1
- package/dist/bridge.d.ts +14 -2
- package/dist/bridge.js +1 -1
- package/dist/catalog.js +1 -1
- package/dist/chunk-26EJFYDX.js +1 -0
- package/dist/chunk-2NO4YCLR.js +1 -0
- package/dist/{chunk-63T3K5EQ.js → chunk-3LXDHDJB.js} +1 -1
- package/dist/{chunk-CVKEWWIH.js → chunk-5NQGXW75.js} +1 -1
- package/dist/chunk-5WRFDAZN.js +1 -0
- package/dist/{chunk-OCQ7A5IK.js → chunk-B6GDESCB.js} +1 -1
- package/dist/chunk-BIZOIGCZ.js +1 -0
- package/dist/chunk-BJYXY2FB.js +1 -0
- package/dist/{chunk-AJSIVGDX.js → chunk-CI7A5N6G.js} +1 -1
- package/dist/chunk-GQXYD2JG.js +1 -0
- package/dist/{chunk-SD7EHS4W.js → chunk-ICJ2E2OV.js} +1 -1
- package/dist/chunk-NPA6GUGE.js +24 -0
- package/dist/chunk-SIRFF4DY.js +1 -0
- package/dist/chunk-T6O2SGH5.js +1 -0
- package/dist/{chunk-IHGRFR4H.js → chunk-UNCP6V7I.js} +1 -1
- package/dist/{chunk-MJ7RGE47.js → chunk-YFXNZ2RS.js} +1 -1
- package/dist/chunk-YW2GTHCV.js +19 -0
- package/dist/{chunk-DYD7MDWO.js → chunk-YWH5HQDT.js} +1 -1
- package/dist/cinematics.d.ts +1 -2
- package/dist/core.d.ts +13 -12
- package/dist/core.js +1 -1
- package/dist/{debug-state-BgX5Q0Ff.d.ts → debug-state-JRneI6c2.d.ts} +1 -1
- package/dist/debug.d.ts +23 -2
- package/dist/debug.js +1 -1
- package/dist/entity.js +1 -1
- package/dist/fbx-loader-SDI6QYTS.js +1 -0
- package/dist/game-default-AF5QFXSD.js +1 -0
- package/dist/{game-CmkhPP-9.d.ts → game-uQd7k6-m.d.ts} +1 -1
- package/dist/gaussian-splat-loader-ACFJKCCL.js +1 -0
- package/dist/geometry-mesh-loader-XDJV77TU.js +1 -0
- package/dist/graphics.js +1 -1
- package/dist/obj-loader-SI5RVY24.js +1 -0
- package/dist/placement.js +1 -1
- package/dist/public.d.ts +4 -5
- package/dist/public.js +1 -1
- package/dist/sog-loader-BZFMQ3ZB.js +1 -0
- package/dist/{stage-CCGJh9TD.d.ts → stage-Dez16Gxm.d.ts} +10 -9
- package/dist/usd-loader-PCBATNPM.js +1 -0
- package/dist/web-components.d.ts +3 -4
- package/package.json +5 -2
- package/dist/chunk-47HAZZWF.js +0 -1
- package/dist/chunk-JJEYLGD2.js +0 -24
- package/dist/chunk-KL7NGD76.js +0 -1
- package/dist/chunk-M2FZ224T.js +0 -1
- package/dist/chunk-Q22Z4PBD.js +0 -19
- package/dist/chunk-UKNMIHAP.js +0 -1
- package/dist/game-default-LAGMEHNQ.js +0 -1
- package/dist/level-types-D10LiOcn.d.ts +0 -91
package/dist/api/game-lib.api.md
CHANGED
|
@@ -62,7 +62,9 @@ import { ILogger } from 'typescript-fsm';
|
|
|
62
62
|
import { ITransition } from 'typescript-fsm';
|
|
63
63
|
import { length as length_2 } from 'three/tsl';
|
|
64
64
|
import { LevelBuffer } from '@zylem/bridge';
|
|
65
|
+
import { LevelDocument } from '@zylem/bridge';
|
|
65
66
|
import { LevelEntry } from '@zylem/bridge';
|
|
67
|
+
import { LevelSyncPayload } from '@zylem/bridge';
|
|
66
68
|
import { Light } from 'three';
|
|
67
69
|
import { Line2 } from 'three/addons/lines/webgpu/Line2.js';
|
|
68
70
|
import { Material } from 'three';
|
|
@@ -1144,7 +1146,7 @@ export function coneCollision(opts?: ConeCollisionOptions): CollisionComponent;
|
|
|
1144
1146
|
// @public
|
|
1145
1147
|
export function coneMesh(opts?: ConeMeshOptions): Mesh;
|
|
1146
1148
|
|
|
1147
|
-
// @public
|
|
1149
|
+
// @public (undocumented)
|
|
1148
1150
|
export class ConstructionGrid {
|
|
1149
1151
|
constructor();
|
|
1150
1152
|
// (undocumented)
|
|
@@ -1152,6 +1154,9 @@ export class ConstructionGrid {
|
|
|
1152
1154
|
// (undocumented)
|
|
1153
1155
|
dispose(): void;
|
|
1154
1156
|
setIncrement(increment: number): void;
|
|
1157
|
+
// Warning: (ae-forgotten-export) The symbol "GridPlane" needs to be exported by the entry point public.d.ts
|
|
1158
|
+
// Warning: (ae-forgotten-export) The symbol "GridPoint" needs to be exported by the entry point public.d.ts
|
|
1159
|
+
setPlane(plane: GridPlane | null, focus?: GridPoint): void;
|
|
1155
1160
|
// (undocumented)
|
|
1156
1161
|
setVisible(visible: boolean): void;
|
|
1157
1162
|
// (undocumented)
|
|
@@ -1903,7 +1908,7 @@ export type DebugEntityResolver = (uuid: string) => GameEntity<any> | null;
|
|
|
1903
1908
|
export const debugState: DebugState;
|
|
1904
1909
|
|
|
1905
1910
|
// @public (undocumented)
|
|
1906
|
-
export type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'brush' | 'clip' | '
|
|
1911
|
+
export type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'brush' | 'clip' | 'shear' | 'none';
|
|
1907
1912
|
|
|
1908
1913
|
// @public (undocumented)
|
|
1909
1914
|
export const DEFAULT_SNAP_SETTINGS: SnapSettings;
|
|
@@ -2744,6 +2749,7 @@ export class GameBridge {
|
|
|
2744
2749
|
publishLoading(payload: BridgeLoadingPayload): void;
|
|
2745
2750
|
publishNotice(level: GameNoticePayload['level'], message: string): void;
|
|
2746
2751
|
publishSceneOperation(op: SceneOperationPayload): void;
|
|
2752
|
+
publishSelectedPoses(): void;
|
|
2747
2753
|
// (undocumented)
|
|
2748
2754
|
publishStageSnapshot(snapshot: StageSnapshotPayload): void;
|
|
2749
2755
|
// (undocumented)
|
|
@@ -2778,7 +2784,6 @@ export interface GameBridgeHost {
|
|
|
2778
2784
|
};
|
|
2779
2785
|
levelClose?(): void;
|
|
2780
2786
|
levelPlay?(document: LevelDocument): void;
|
|
2781
|
-
// Warning: (ae-forgotten-export) The symbol "LevelSyncPayload" needs to be exported by the entry point public.d.ts
|
|
2782
2787
|
levelSync?(payload: LevelSyncPayload): void;
|
|
2783
2788
|
pickEntity?(ndc: BridgeNdc): EntitySummaryPayload | null;
|
|
2784
2789
|
resolveEntity(uuid: string): GameEntity<any> | null;
|
|
@@ -4063,23 +4068,7 @@ export function lerpVec3(a: Vec3Def, b: Vec3Def, t: number): Vec3Def;
|
|
|
4063
4068
|
|
|
4064
4069
|
export { LevelBuffer }
|
|
4065
4070
|
|
|
4066
|
-
|
|
4067
|
-
export interface LevelDocument {
|
|
4068
|
-
// Warning: (ae-forgotten-export) The symbol "DoodadPlacement" needs to be exported by the entry point public.d.ts
|
|
4069
|
-
//
|
|
4070
|
-
// (undocumented)
|
|
4071
|
-
doodads: DoodadPlacement[];
|
|
4072
|
-
// Warning: (ae-forgotten-export) The symbol "EntityPlacement" needs to be exported by the entry point public.d.ts
|
|
4073
|
-
//
|
|
4074
|
-
// (undocumented)
|
|
4075
|
-
entities: EntityPlacement[];
|
|
4076
|
-
// Warning: (ae-forgotten-export) The symbol "BrushSolid" needs to be exported by the entry point public.d.ts
|
|
4077
|
-
//
|
|
4078
|
-
// (undocumented)
|
|
4079
|
-
solids: BrushSolid[];
|
|
4080
|
-
// (undocumented)
|
|
4081
|
-
version: 2;
|
|
4082
|
-
}
|
|
4071
|
+
export { LevelDocument }
|
|
4083
4072
|
|
|
4084
4073
|
// @public
|
|
4085
4074
|
export interface LevelStage {
|
|
@@ -9365,8 +9354,8 @@ export class ZylemZone extends GameEntity<ZylemZoneOptions> implements Collision
|
|
|
9365
9354
|
// dist/entity-CY75JJSw.d.ts:410:9 - (ae-forgotten-export) The symbol "EntityMeshBuilder" needs to be exported by the entry point public.d.ts
|
|
9366
9355
|
// dist/entity-CY75JJSw.d.ts:411:9 - (ae-forgotten-export) The symbol "EntityCollisionBuilder" needs to be exported by the entry point public.d.ts
|
|
9367
9356
|
// dist/entity-CY75JJSw.d.ts:412:9 - (ae-forgotten-export) The symbol "MaterialBuilder" needs to be exported by the entry point public.d.ts
|
|
9368
|
-
// dist/game-
|
|
9369
|
-
// dist/stage-
|
|
9357
|
+
// dist/game-uQd7k6-m.d.ts:258:5 - (ae-forgotten-export) The symbol "StageInterface" needs to be exported by the entry point public.d.ts
|
|
9358
|
+
// dist/stage-Dez16Gxm.d.ts:1194:5 - (ae-forgotten-export) The symbol "StageAssetLoaderConfig" needs to be exported by the entry point public.d.ts
|
|
9370
9359
|
|
|
9371
9360
|
// (No @packageDocumentation comment for this package)
|
|
9372
9361
|
|
package/dist/api/game-lib.d.ts
CHANGED
|
@@ -56,7 +56,9 @@ import { ILogger } from 'typescript-fsm';
|
|
|
56
56
|
import { ITransition } from 'typescript-fsm';
|
|
57
57
|
import { length as length_2 } from 'three/tsl';
|
|
58
58
|
import { LevelBuffer } from '@zylem/bridge';
|
|
59
|
+
import { LevelDocument } from '@zylem/bridge';
|
|
59
60
|
import { LevelEntry } from '@zylem/bridge';
|
|
61
|
+
import { LevelSyncPayload } from '@zylem/bridge';
|
|
60
62
|
import { Light } from 'three';
|
|
61
63
|
import { Line2 } from 'three/addons/lines/webgpu/Line2.js';
|
|
62
64
|
import { Material } from 'three';
|
|
@@ -1336,35 +1338,6 @@ export { BridgeNdc }
|
|
|
1336
1338
|
|
|
1337
1339
|
export { BridgeVec3 }
|
|
1338
1340
|
|
|
1339
|
-
declare interface BrushPlane {
|
|
1340
|
-
normal: BrushVec3;
|
|
1341
|
-
/** The solid is `normal · point <= distance`. */
|
|
1342
|
-
distance: number;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
/** One convex solid. Planes are world-space half-spaces. */
|
|
1346
|
-
declare interface BrushSolid {
|
|
1347
|
-
id: string;
|
|
1348
|
-
planes: BrushPlane[];
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
/**
|
|
1352
|
-
* Convex brush kernel.
|
|
1353
|
-
*
|
|
1354
|
-
* A brush is the intersection of half-spaces: a point is inside when
|
|
1355
|
-
* `normal · point <= distance` for every plane. The normal points outward.
|
|
1356
|
-
* Planes are world-space, so moving a brush shifts every distance by
|
|
1357
|
-
* `normal · delta`. No Three.js and no physics types.
|
|
1358
|
-
*
|
|
1359
|
-
* Copy of `packages/bridge/src/level/brush.ts`, kept inside this package so
|
|
1360
|
-
* the declaration build does not reach outside `src`.
|
|
1361
|
-
*/
|
|
1362
|
-
declare interface BrushVec3 {
|
|
1363
|
-
x: number;
|
|
1364
|
-
y: number;
|
|
1365
|
-
z: number;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
1341
|
/** Cuboid collider sized as `size.xyz` (full extents — half-extents are computed). */
|
|
1369
1342
|
export declare function buildBoxCollider(size: Vec3Input, options?: RuntimeColliderOptions): StageColliderConfig;
|
|
1370
1343
|
|
|
@@ -1515,7 +1488,7 @@ export declare const CameraKeyframeSchema: _sinclair_typebox.TObject<{
|
|
|
1515
1488
|
* Responsibilities:
|
|
1516
1489
|
* - Named camera registry (add/remove/get by name or reference)
|
|
1517
1490
|
* - Active camera list management (determines which cameras render)
|
|
1518
|
-
* - Editor view cameras
|
|
1491
|
+
* - Editor view cameras, created only while an editor is attached
|
|
1519
1492
|
* - Per-frame update of all active cameras' perspective controllers
|
|
1520
1493
|
* - Coordinating rendering via RendererManager for all active viewports
|
|
1521
1494
|
*/
|
|
@@ -1561,11 +1534,11 @@ export declare class CameraManager implements EditorCameraHost {
|
|
|
1561
1534
|
* Get the primary active camera (first in the active list).
|
|
1562
1535
|
*/
|
|
1563
1536
|
get primaryCamera(): ZylemCamera | null;
|
|
1564
|
-
/** True while
|
|
1537
|
+
/** True while an editor view is the main camera. */
|
|
1565
1538
|
isEditorViewActive(): boolean;
|
|
1566
1539
|
/** Id of the editor view that is currently the main camera, if one is. */
|
|
1567
1540
|
activeEditorCameraId(): string | null;
|
|
1568
|
-
/** True after the
|
|
1541
|
+
/** True after the editor views have been created. */
|
|
1569
1542
|
hasEditorCameras(): boolean;
|
|
1570
1543
|
/**
|
|
1571
1544
|
* World boxes used the first time side, top, or isometric is shown.
|
|
@@ -1623,13 +1596,13 @@ export declare class CameraManager implements EditorCameraHost {
|
|
|
1623
1596
|
*/
|
|
1624
1597
|
setup(scene: Scene, rendererManager: RendererManager): Promise<void>;
|
|
1625
1598
|
/**
|
|
1626
|
-
* Create
|
|
1627
|
-
*
|
|
1599
|
+
* Create the editor view cameras seeded from the current game camera.
|
|
1600
|
+
* Does not change which camera is rendering.
|
|
1628
1601
|
*/
|
|
1629
1602
|
ensureEditorCameras(): Promise<void>;
|
|
1630
1603
|
/**
|
|
1631
1604
|
* Restore the game camera when an editor view is showing, then destroy
|
|
1632
|
-
* the
|
|
1605
|
+
* the editor cameras.
|
|
1633
1606
|
*/
|
|
1634
1607
|
destroyEditorCameras(): void;
|
|
1635
1608
|
/**
|
|
@@ -2354,14 +2327,6 @@ declare interface ConeMeshOptions extends BaseMeshOptions {
|
|
|
2354
2327
|
|
|
2355
2328
|
declare type ConeOptions = BaseNode | Partial<ZylemConeOptions>;
|
|
2356
2329
|
|
|
2357
|
-
/**
|
|
2358
|
-
* The y=0 construction plane, drawn so the snap lattice is legible.
|
|
2359
|
-
*
|
|
2360
|
-
* Two overlaid grids: fine lines at the translation snap increment, and heavier
|
|
2361
|
-
* lines every metre. Without the coarse pass a 0.25 grid over any useful area
|
|
2362
|
-
* reads as flat grey noise.
|
|
2363
|
-
*/
|
|
2364
|
-
|
|
2365
2330
|
export declare class ConstructionGrid {
|
|
2366
2331
|
private group;
|
|
2367
2332
|
private scene;
|
|
@@ -2374,8 +2339,17 @@ export declare class ConstructionGrid {
|
|
|
2374
2339
|
setIncrement(increment: number): void;
|
|
2375
2340
|
setVisible(visible: boolean): void;
|
|
2376
2341
|
get visible(): boolean;
|
|
2342
|
+
/**
|
|
2343
|
+
* Lay the grid on a plane, or back on y=0 with `null`.
|
|
2344
|
+
*
|
|
2345
|
+
* The plane's `u` runs along the grid's X. The grid centres on the lines
|
|
2346
|
+
* nearest `focus`, shifted by whole cells, so it stays on the world lattice.
|
|
2347
|
+
*/
|
|
2348
|
+
setPlane(plane: GridPlane | null, focus?: GridPoint): void;
|
|
2377
2349
|
dispose(): void;
|
|
2378
2350
|
private rebuild;
|
|
2351
|
+
/** The shortest shift that is whole fine steps and whole metres, so neither set of lines moves. */
|
|
2352
|
+
private wholeCell;
|
|
2379
2353
|
private clearHelpers;
|
|
2380
2354
|
}
|
|
2381
2355
|
|
|
@@ -3437,7 +3411,7 @@ declare interface DebugState {
|
|
|
3437
3411
|
|
|
3438
3412
|
export declare const debugState: DebugState;
|
|
3439
3413
|
|
|
3440
|
-
export declare type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'brush' | 'clip' | '
|
|
3414
|
+
export declare type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'brush' | 'clip' | 'shear' | 'none';
|
|
3441
3415
|
|
|
3442
3416
|
export declare const DEFAULT_SNAP_SETTINGS: SnapSettings;
|
|
3443
3417
|
|
|
@@ -3929,14 +3903,6 @@ export declare const DollyPathSchema: _sinclair_typebox.TObject<{
|
|
|
3929
3903
|
/** Point along a dolly path at `u` in 0…1 (arc-length parameterised). */
|
|
3930
3904
|
export declare function dollyPointAt(path: DollyPath, u: number): Vec3Def;
|
|
3931
3905
|
|
|
3932
|
-
/** A visual placement. Spawned with no collider. */
|
|
3933
|
-
declare interface DoodadPlacement {
|
|
3934
|
-
id: string;
|
|
3935
|
-
typeId: string;
|
|
3936
|
-
pose: BridgePose;
|
|
3937
|
-
props: Record<string, unknown>;
|
|
3938
|
-
}
|
|
3939
|
-
|
|
3940
3906
|
export { dot }
|
|
3941
3907
|
|
|
3942
3908
|
declare function drizzle(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
@@ -3975,7 +3941,7 @@ export declare function easeValue(easing: CutsceneEasing, t: number): number;
|
|
|
3975
3941
|
*
|
|
3976
3942
|
* `GameBridge.connect()` runs for every game, so it is not the signal. The
|
|
3977
3943
|
* bridge marks the session attached when an editor subscribes, and every live
|
|
3978
|
-
* camera manager creates or destroys its
|
|
3944
|
+
* camera manager creates or destroys its view cameras from that flag.
|
|
3979
3945
|
*/
|
|
3980
3946
|
declare interface EditorCameraHost {
|
|
3981
3947
|
ensureEditorCameras(): Promise<void>;
|
|
@@ -4352,20 +4318,6 @@ export { EntityPickPayload }
|
|
|
4352
4318
|
|
|
4353
4319
|
export { EntityPickResultPayload }
|
|
4354
4320
|
|
|
4355
|
-
/**
|
|
4356
|
-
* A gameplay marker.
|
|
4357
|
-
*
|
|
4358
|
-
* `typeId` is `spawn` or `zone`. Spawn props carry `spawnKind`
|
|
4359
|
-
* (`player` | `enemy` | `item`) and `archetype`. Trigger props carry `size`.
|
|
4360
|
-
*/
|
|
4361
|
-
declare interface EntityPlacement {
|
|
4362
|
-
id: string;
|
|
4363
|
-
typeId: string;
|
|
4364
|
-
name: string;
|
|
4365
|
-
pose: BridgePose;
|
|
4366
|
-
props: Record<string, unknown>;
|
|
4367
|
-
}
|
|
4368
|
-
|
|
4369
4321
|
export declare interface EntityRepresentative {
|
|
4370
4322
|
source: RepresentativeSource;
|
|
4371
4323
|
options: EntityRepresentativeOptions;
|
|
@@ -5356,6 +5308,8 @@ export declare class GameBridge {
|
|
|
5356
5308
|
private applyingSceneOperation;
|
|
5357
5309
|
/** Frame watch used when the channel cannot report subscriber removal. */
|
|
5358
5310
|
private editorCameraFrame;
|
|
5311
|
+
/** Last pose published for each selected entity, so one at rest sends nothing. */
|
|
5312
|
+
private publishedPoses;
|
|
5359
5313
|
constructor();
|
|
5360
5314
|
/**
|
|
5361
5315
|
* Subscribe to editor commands and announce the game side as ready.
|
|
@@ -5368,6 +5322,17 @@ export declare class GameBridge {
|
|
|
5368
5322
|
/** The previewing camera's projection, for Director mode's viewport overlays. */
|
|
5369
5323
|
publishCutsceneView(view: CutsceneViewPayload): void;
|
|
5370
5324
|
disconnect(): void;
|
|
5325
|
+
/**
|
|
5326
|
+
* Echo the live pose of each selected entity that moved since its pose was
|
|
5327
|
+
* last published. The game loop calls this every frame.
|
|
5328
|
+
*
|
|
5329
|
+
* One watcher covers every mover — gizmo drags, undo/redo, physics, scripts —
|
|
5330
|
+
* so the editor's transform fields follow the selection without each of them
|
|
5331
|
+
* publishing for itself. Only the selection is watched: it is all the
|
|
5332
|
+
* inspector shows, and watching the whole stage would cost a pose read per
|
|
5333
|
+
* entity per frame.
|
|
5334
|
+
*/
|
|
5335
|
+
publishSelectedPoses(): void;
|
|
5371
5336
|
/**
|
|
5372
5337
|
* Run a swatch batch and report back.
|
|
5373
5338
|
*
|
|
@@ -6446,10 +6411,12 @@ export { GameVariablePayload }
|
|
|
6446
6411
|
/**
|
|
6447
6412
|
* The stage's picture of the level document.
|
|
6448
6413
|
*
|
|
6449
|
-
* The editor owns the file. This session draws it,
|
|
6450
|
-
*
|
|
6451
|
-
*
|
|
6452
|
-
*
|
|
6414
|
+
* The editor owns the file. This session draws it, routes level pointer
|
|
6415
|
+
* gestures to the tools, reports what they finish, and on play swaps the
|
|
6416
|
+
* brush faces for one merged mesh and one static body of convex hulls per
|
|
6417
|
+
* sector. Nothing it creates is a normal stage entity except play-mode
|
|
6418
|
+
* trigger zones, and those are marked editor-owned so they are not published
|
|
6419
|
+
* back.
|
|
6453
6420
|
*/
|
|
6454
6421
|
|
|
6455
6422
|
/** The document currently previewed or playing, for hosts that spawn from markers. */
|
|
@@ -6566,6 +6533,28 @@ export declare function globalChanges<T = any>(keys: string[], callback: (values
|
|
|
6566
6533
|
|
|
6567
6534
|
declare type GlobalRecord = Record<string, unknown>;
|
|
6568
6535
|
|
|
6536
|
+
/** A plane as a draw frame names it: a point on it, its in-plane `u`, and its normal. */
|
|
6537
|
+
declare interface GridPlane {
|
|
6538
|
+
origin: GridPoint;
|
|
6539
|
+
u: GridPoint;
|
|
6540
|
+
normal: GridPoint;
|
|
6541
|
+
}
|
|
6542
|
+
|
|
6543
|
+
/**
|
|
6544
|
+
* The construction plane, drawn so the snap lattice is legible. It lies on
|
|
6545
|
+
* y=0 unless a level draw lays it on the draw plane.
|
|
6546
|
+
*
|
|
6547
|
+
* Two overlaid grids: fine lines at the translation snap increment, and heavier
|
|
6548
|
+
* lines every metre. Without the coarse pass a 0.25 grid over any useful area
|
|
6549
|
+
* reads as flat grey noise.
|
|
6550
|
+
*/
|
|
6551
|
+
|
|
6552
|
+
declare interface GridPoint {
|
|
6553
|
+
x: number;
|
|
6554
|
+
y: number;
|
|
6555
|
+
z: number;
|
|
6556
|
+
}
|
|
6557
|
+
|
|
6569
6558
|
export declare function hasAnyWorldBoundary2DHit(hits: WorldBoundary2DHits): boolean;
|
|
6570
6559
|
|
|
6571
6560
|
export declare function hasAnyWorldBoundary3DHit(hits: WorldBoundary3DHits): boolean;
|
|
@@ -7309,40 +7298,7 @@ export declare function lerpVec3(a: Vec3Def, b: Vec3Def, t: number): Vec3Def;
|
|
|
7309
7298
|
|
|
7310
7299
|
export { LevelBuffer }
|
|
7311
7300
|
|
|
7312
|
-
|
|
7313
|
-
* The level file. The editor owns it; the stage only previews and plays it.
|
|
7314
|
-
*
|
|
7315
|
-
* `version` is 2 so a v1 catalog buffer is recognisable and left alone.
|
|
7316
|
-
*/
|
|
7317
|
-
export declare interface LevelDocument {
|
|
7318
|
-
version: 2;
|
|
7319
|
-
solids: BrushSolid[];
|
|
7320
|
-
doodads: DoodadPlacement[];
|
|
7321
|
-
entities: EntityPlacement[];
|
|
7322
|
-
}
|
|
7323
|
-
|
|
7324
|
-
/**
|
|
7325
|
-
* Level document shapes shared with the editor over the bridge.
|
|
7326
|
-
*
|
|
7327
|
-
* Defined here, matching `packages/bridge/src/protocol.ts`, because the
|
|
7328
|
-
* installed `@zylem/bridge` build does not export them yet and the
|
|
7329
|
-
* declaration build cannot import files outside this package.
|
|
7330
|
-
*/
|
|
7331
|
-
|
|
7332
|
-
/** Which list in a level document an edit or a visibility toggle addresses. */
|
|
7333
|
-
declare type LevelLayerId = 'solid' | 'doodad' | 'entity';
|
|
7334
|
-
|
|
7335
|
-
/** What the Add tool will write into the document on the next click. */
|
|
7336
|
-
declare type LevelPlacementArm = {
|
|
7337
|
-
kind: 'doodad';
|
|
7338
|
-
typeId: string;
|
|
7339
|
-
props?: Record<string, unknown>;
|
|
7340
|
-
} | {
|
|
7341
|
-
kind: 'spawn';
|
|
7342
|
-
} | {
|
|
7343
|
-
kind: 'trigger';
|
|
7344
|
-
size: BridgeVec3;
|
|
7345
|
-
};
|
|
7301
|
+
export { LevelDocument }
|
|
7346
7302
|
|
|
7347
7303
|
/**
|
|
7348
7304
|
* Stream a level buffer into a stage through the catalog.
|
|
@@ -7357,15 +7313,6 @@ export declare interface LevelStage {
|
|
|
7357
7313
|
spawnEntity(node: BaseNode): Promise<void> | void;
|
|
7358
7314
|
}
|
|
7359
7315
|
|
|
7360
|
-
/** Edit-time preview. Hidden layers are omitted; play ignores this and streams everything. */
|
|
7361
|
-
declare interface LevelSyncPayload {
|
|
7362
|
-
document: LevelDocument;
|
|
7363
|
-
hiddenLayers: LevelLayerId[];
|
|
7364
|
-
selectedIds: string[];
|
|
7365
|
-
activeLayer: LevelLayerId;
|
|
7366
|
-
placement: LevelPlacementArm | null;
|
|
7367
|
-
}
|
|
7368
|
-
|
|
7369
7316
|
/** B171–B180. Eight rows per table; 128 contexts. Calendar commands close exactly one day.
|
|
7370
7317
|
* Day 0 is weekday 0; seasons are floor(day / seasonLength) % 4. Masks select bits 0..3/0..6.
|
|
7371
7318
|
* Daily order: growth/care, calendar, withering, moisture decay + new-day rain, reward reset,
|
|
@@ -14029,6 +13976,8 @@ declare class StageDebugDelegate {
|
|
|
14029
13976
|
private syncWithDebugState;
|
|
14030
13977
|
/** Hand the transform tool its mode whenever the active tool changes. */
|
|
14031
13978
|
private syncToolMode;
|
|
13979
|
+
/** The entity gizmo stands down while a level is edited; the level session runs its own. */
|
|
13980
|
+
private syncTransformTool;
|
|
14032
13981
|
private syncGrid;
|
|
14033
13982
|
/** Initialize DOM listeners. The rendering camera stays whatever the editor selected. */
|
|
14034
13983
|
private activate;
|