@zylem/game-lib 0.8.8 → 0.9.0

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.
Files changed (95) hide show
  1. package/README.md +7 -1
  2. package/dist/actions.d.ts +2 -2
  3. package/dist/actions.js +1 -1
  4. package/dist/api/game-lib.api.json +35786 -18973
  5. package/dist/api/game-lib.api.md +1209 -13
  6. package/dist/api/game-lib.d.ts +1609 -7
  7. package/dist/api/game-lib.typedoc.json +220861 -97409
  8. package/dist/audio.d.ts +193 -1
  9. package/dist/audio.js +1 -1
  10. package/dist/behavior.js +1 -1
  11. package/dist/bridge.d.ts +46 -6
  12. package/dist/bridge.js +1 -1
  13. package/dist/catalog.d.ts +91 -3
  14. package/dist/catalog.js +1 -1
  15. package/dist/chunk-2HSR5XDQ.js +1 -0
  16. package/dist/chunk-2MHB4X6B.js +24 -0
  17. package/dist/chunk-2PFNNGTV.js +1 -0
  18. package/dist/chunk-2XMG3NJS.js +1 -0
  19. package/dist/chunk-4CZZZCFB.js +9 -0
  20. package/dist/{chunk-7NYP4YAG.js → chunk-6FGXC4T6.js} +1 -1
  21. package/dist/chunk-6XFXPIVB.js +1 -0
  22. package/dist/{chunk-CBUQBP2U.js → chunk-BQRMYLYD.js} +1 -1
  23. package/dist/chunk-FZNEWOC5.js +1 -0
  24. package/dist/chunk-GPCSX3M6.js +1 -0
  25. package/dist/chunk-HISTSRAL.js +1 -0
  26. package/dist/chunk-K3NNXZIJ.js +1 -0
  27. package/dist/chunk-KP6DLLJO.js +1 -0
  28. package/dist/{chunk-JNFFTNMH.js → chunk-KSEP7AUF.js} +1 -1
  29. package/dist/{chunk-YOVE25NW.js → chunk-LI43BZQN.js} +1 -1
  30. package/dist/chunk-LSFWI46T.js +1 -0
  31. package/dist/chunk-NVVLLWIM.js +1 -0
  32. package/dist/chunk-QGIYILYI.js +1 -0
  33. package/dist/chunk-STVEILJJ.js +1 -0
  34. package/dist/chunk-UUOPT2N4.js +1 -0
  35. package/dist/chunk-VMXSE3EC.js +0 -0
  36. package/dist/chunk-VSFULLND.js +1 -0
  37. package/dist/chunk-VUJXR5K5.js +1 -0
  38. package/dist/chunk-WOT6VMZA.js +1 -0
  39. package/dist/chunk-YNX3Q3CL.js +1 -0
  40. package/dist/chunk-YQS7CGXE.js +1 -0
  41. package/dist/chunk-ZZO4CKRU.js +1 -0
  42. package/dist/cinematics.d.ts +279 -0
  43. package/dist/cinematics.js +1 -0
  44. package/dist/core.d.ts +13 -10
  45. package/dist/core.js +1 -1
  46. package/dist/cutscene-definition-C479fkei.d.ts +509 -0
  47. package/dist/{debug-state-CpnNRUFh.d.ts → debug-state-Cg3f5FB6.d.ts} +1 -1
  48. package/dist/debug.d.ts +3 -2
  49. package/dist/debug.js +1 -1
  50. package/dist/{entity-XZNGBeca.d.ts → entity-XqvuWgPm.d.ts} +54 -0
  51. package/dist/{entity-type-map-CkkFMSrL.d.ts → entity-type-map-CrsrKT8c.d.ts} +13 -4
  52. package/dist/entity.d.ts +4 -3
  53. package/dist/entity.js +1 -1
  54. package/dist/events.js +1 -1
  55. package/dist/game-9PjI5z2p.d.ts +652 -0
  56. package/dist/game-default-WBKQCEDJ.js +1 -0
  57. package/dist/globals.js +1 -1
  58. package/dist/graphics.d.ts +1 -1
  59. package/dist/graphics.js +1 -1
  60. package/dist/input-ui.js +1 -1
  61. package/dist/input.js +1 -1
  62. package/dist/public.d.ts +14 -8
  63. package/dist/public.js +1 -1
  64. package/dist/runtime.js +1 -1
  65. package/dist/schema/cutscene.schema.json +782 -0
  66. package/dist/schema/entity.schema.json +24 -24
  67. package/dist/schema/game-config.schema.json +10 -10
  68. package/dist/schema/song.schema.json +430 -0
  69. package/dist/schema/stage.schema.json +29 -29
  70. package/dist/schema.d.ts +2 -0
  71. package/dist/schema.js +1 -1
  72. package/dist/selection-bounds-BKmSo9aG.d.ts +50 -0
  73. package/dist/song-definition-rEKksP0B.d.ts +263 -0
  74. package/dist/song-player-7QPLFLAS.js +1 -0
  75. package/dist/{game-BPOr7zTB.d.ts → stage-BuGkjZnr.d.ts} +90 -644
  76. package/dist/web-components.d.ts +7 -5
  77. package/dist/web-components.js +1 -1
  78. package/dist/{zylem-camera-DZTpPOiD.d.ts → zylem-camera-Baf5vH8Z.d.ts} +8 -0
  79. package/package.json +25 -16
  80. package/dist/chunk-34MYRTRP.js +0 -9
  81. package/dist/chunk-AE3CTVHY.js +0 -1
  82. package/dist/chunk-BMRFDDMR.js +0 -1
  83. package/dist/chunk-EVMLNMGU.js +0 -1
  84. package/dist/chunk-F5LROYZL.js +0 -24
  85. package/dist/chunk-GHJQ2HKI.js +0 -1
  86. package/dist/chunk-HNCTOJP7.js +0 -1
  87. package/dist/chunk-IBJLPJLE.js +0 -1
  88. package/dist/chunk-MXO4VGDB.js +0 -1
  89. package/dist/chunk-QDQ4QMAI.js +0 -1
  90. package/dist/chunk-SAQA4SXW.js +0 -1
  91. package/dist/chunk-XK63E4SX.js +0 -1
  92. package/dist/chunk-ZRT3ZQVH.js +0 -1
  93. package/dist/chunk-ZTYNZ2N2.js +0 -1
  94. package/dist/game-default-7HCJJF5S.js +0 -1
  95. /package/dist/{chunk-MSCVL5OK.js → chunk-ELQN62PQ.js} +0 -0
@@ -0,0 +1,279 @@
1
+ import { k as CutsceneEasing, V as Vec3Def, h as CutsceneScene, n as CameraShot, g as CutsceneDefinition, s as DollyPath, i as CutsceneCamera, o as CameraTrack, x as SceneTransition, y as SceneTransitionType, v as EventItem, w as AudioItem } from './cutscene-definition-C479fkei.js';
2
+ export { A as AudioItemSchema, q as AudioTrack, l as CameraKeyframe, c as CameraKeyframeSchema, m as CameraPoseDef, d as CameraShotSchema, j as CutsceneCameraKind, b as CutsceneCameraSchema, C as CutsceneDefinitionSchema, u as CutsceneEvent, e as CutsceneEventSchema, a as CutsceneSceneSchema, r as CutsceneTrack, f as CutsceneTrackSchema, D as DollyPathSchema, E as EventItemSchema, p as EventTrack, S as SceneTransitionSchema, t as ShotBlend } from './cutscene-definition-C479fkei.js';
3
+ import { f as CameraBehavior, d as CameraContext, C as CameraPose, k as ZylemCamera } from './zylem-camera-Baf5vH8Z.js';
4
+ import { Z as ZylemTransitionShader } from './stage-transition-CmGpV4tc.js';
5
+ import { Z as ZylemStage, l as Stage } from './stage-BuGkjZnr.js';
6
+ import { g as SongDefinition } from './song-definition-rEKksP0B.js';
7
+ import { CutsceneStatusPayload, CutsceneViewPayload, CutsceneLoadPayload, CameraPosePayload } from '@zylem/bridge';
8
+ import '@sinclair/typebox';
9
+ import 'three';
10
+ import './entity-BIf_a4dl.js';
11
+ import './simulation-body-zQw-emOr.js';
12
+ import '@zylem/behaviors/core';
13
+ import 'three/webgpu';
14
+ import './base-node-idopiSw5.js';
15
+ import './base-node-life-cycle-BK9xebT9.js';
16
+ import './entity-type-map-CrsrKT8c.js';
17
+ import './entity-XqvuWgPm.js';
18
+ import './vector-D3eDzvcA.js';
19
+ import './material-CxxAyJYp.js';
20
+ import './collision-builder-BckxkdmA.js';
21
+ import './events.js';
22
+ import 'mitt';
23
+ import './selection-bounds-BKmSo9aG.js';
24
+ import '@zylem/behaviors/particle-emitter';
25
+ import 'three/addons/lines/webgpu/Line2.js';
26
+ import './game-interfaces-vF5sRi1n.js';
27
+
28
+ /**
29
+ * Pure evaluation of a cutscene at a point in time: which scene and shot are
30
+ * active, where each camera is, and the blended pose the picture should
31
+ * show. Nothing here touches Three.js cameras or the stage, so the same code
32
+ * drives the runtime player, the editor's scrubbing, and the unit specs.
33
+ */
34
+ declare function easeValue(easing: CutsceneEasing, t: number): number;
35
+ interface EvaluatedPose {
36
+ position: Vec3Def;
37
+ lookAt: Vec3Def;
38
+ fov: number;
39
+ }
40
+ declare function lerpVec3(a: Vec3Def, b: Vec3Def, t: number): Vec3Def;
41
+ declare function lerpPose(a: EvaluatedPose, b: EvaluatedPose, t: number): EvaluatedPose;
42
+ /** The scene containing `time` (last one wins on shared boundaries; the final scene past the end). */
43
+ declare function sceneAt(scenes: readonly CutsceneScene[], time: number): CutsceneScene | undefined;
44
+ /** The shot covering `time` on one track, if any (last one wins on overlaps). */
45
+ declare function shotAt(shots: readonly CameraShot[], time: number): CameraShot | undefined;
46
+ /**
47
+ * The active shot across every camera track. Tracks are prioritised in
48
+ * order, so a shot on the first camera track overrides one on the second.
49
+ */
50
+ declare function activeShot(definition: CutsceneDefinition, time: number): CameraShot | undefined;
51
+ /** The shot that ended most recently before `shot` began, on any camera track. */
52
+ declare function previousShot(definition: CutsceneDefinition, shot: CameraShot): CameraShot | undefined;
53
+ /** Point along a dolly path at `u` in 0…1 (arc-length parameterised). */
54
+ declare function dollyPointAt(path: DollyPath, u: number): Vec3Def;
55
+ /** Evenly spaced samples of a dolly path, for drawing it. */
56
+ declare function sampleDollyPath(path: DollyPath, segments?: number): Vec3Def[];
57
+ /** Positions of named entities the cameras may reference, by name. */
58
+ type TargetLookup = (name: string) => Vec3Def | undefined;
59
+ /**
60
+ * Where a camera is at `time` while `shot` is active: base pose, then dolly
61
+ * progress or follow target, then keyframes on top.
62
+ */
63
+ declare function evaluateCameraPose(camera: CutsceneCamera, definition: Pick<CutsceneDefinition, 'dollies'>, shot: Pick<CameraShot, 'start' | 'end'>, time: number, lookup?: TargetLookup): EvaluatedPose;
64
+ interface CutsceneFrame {
65
+ scene: CutsceneScene | undefined;
66
+ shot: CameraShot | undefined;
67
+ camera: CutsceneCamera | undefined;
68
+ pose: EvaluatedPose | undefined;
69
+ /** 0…1 while blending in from the previous shot, else 1. */
70
+ blend: number;
71
+ }
72
+ /**
73
+ * Everything the picture needs at `time`: the active scene and shot, and the
74
+ * camera pose after blending from the previous shot when the shot asks for
75
+ * it. Without an active shot the pose is `undefined` and the gameplay camera
76
+ * keeps control.
77
+ */
78
+ declare function evaluateCutscene(definition: CutsceneDefinition, time: number, lookup?: TargetLookup): CutsceneFrame;
79
+ /** Items on every event/audio track with `time` in `(from, to]`, in time order. */
80
+ declare function itemsBetween<T extends {
81
+ time: number;
82
+ }>(items: readonly T[], from: number, to: number): T[];
83
+ /** Camera tracks in priority order. */
84
+ declare function cameraTracks(definition: CutsceneDefinition): CameraTrack[];
85
+ /** Total length: the declared duration, or the furthest scene end if longer. */
86
+ declare function cutsceneLength(definition: Pick<CutsceneDefinition, 'duration' | 'scenes'>): number;
87
+
88
+ /** Pipeline key the cutscene player registers its behavior under. */
89
+ declare const CUTSCENE_BEHAVIOR_KEY = "cutscene";
90
+ /**
91
+ * Camera behavior that hands the pipeline a fixed pose each frame while a
92
+ * cutscene is playing. It runs after the game's own behaviors (high
93
+ * priority) so shots override follow/look-at logic, and it disables itself
94
+ * when the player has no pose (no active shot) so gameplay framing resumes.
95
+ *
96
+ * `damping` applies optional per-frame smoothing for follow cameras; the
97
+ * player passes 0 for authored moves so keyframes land exactly.
98
+ */
99
+ declare class CutsceneCameraBehavior implements CameraBehavior {
100
+ priority: number;
101
+ enabled: boolean;
102
+ private target;
103
+ private smoothed;
104
+ private damping;
105
+ /** Sets the pose to show; `null` releases the camera back to gameplay. */
106
+ setPose(pose: EvaluatedPose | null, damping?: number): void;
107
+ /** Snap smoothing state so the next frame lands exactly on the pose (seeks, cuts). */
108
+ snap(): void;
109
+ onDetach(): void;
110
+ update(ctx: CameraContext, pose: CameraPose): CameraPose;
111
+ }
112
+
113
+ type CutscenePlayerState = 'idle' | 'playing' | 'paused' | 'finished';
114
+ /**
115
+ * What the player needs from the running game. `createStageCutsceneHost`
116
+ * builds one from a live stage; tests and the editor can hand in stubs.
117
+ */
118
+ interface CutsceneHost {
119
+ /** The camera the cutscene drives; resolved each frame so stage swaps are safe. */
120
+ camera: () => ZylemCamera | null;
121
+ /** World position of a named entity, for follow cameras and dolly look-ats. */
122
+ entityPosition?: (name: string) => Vec3Def | undefined;
123
+ playAnimation?: (entity: string, key: string) => void;
124
+ /** Stage event dispatch (`emit` events). */
125
+ dispatch?: (name: string, payload: Record<string, unknown>) => void;
126
+ setVariable?: (name: string, value: unknown) => void;
127
+ playSong?: (ref: string, options: {
128
+ loop: boolean;
129
+ volume: number;
130
+ }) => void;
131
+ stopSong?: (ref?: string) => void;
132
+ playSfx?: (url: string, options: {
133
+ volume: number;
134
+ loop: boolean;
135
+ }) => void;
136
+ /**
137
+ * Runs a picture transition into the new scene: snapshot the current frame
138
+ * and blend it into the frames that follow. Omit to hard-cut everywhere.
139
+ */
140
+ beginTransition?: (transition: SceneTransition, shader: ZylemTransitionShader | undefined) => void;
141
+ }
142
+ interface CutscenePlayerOptions {
143
+ host: CutsceneHost;
144
+ /**
145
+ * `auto` (default) advances on `requestAnimationFrame`; `manual` leaves it
146
+ * to the caller's `update(dt)` — e.g. a stage `update` hook, so the
147
+ * cutscene pauses with the game.
148
+ */
149
+ tick?: 'auto' | 'manual';
150
+ /** Maps a transition type to a blend shader (e.g. `createStageTransition({ pattern }).shader`). */
151
+ transitionShader?: (type: SceneTransitionType) => ZylemTransitionShader | undefined;
152
+ /** Fire events/audio crossed by a `seek`. Off by default: scrubbing should not trigger gameplay. */
153
+ fireEventsOnSeek?: boolean;
154
+ timeScale?: number;
155
+ }
156
+ interface CutscenePlayerEvents {
157
+ time: (time: number) => void;
158
+ state: (state: CutscenePlayerState) => void;
159
+ scene: (scene: CutsceneScene | undefined) => void;
160
+ shot: (shot: CameraShot | undefined) => void;
161
+ event: (item: EventItem) => void;
162
+ audio: (item: AudioItem) => void;
163
+ complete: () => void;
164
+ skip: () => void;
165
+ }
166
+ interface CutscenePlayer {
167
+ readonly definition: CutsceneDefinition;
168
+ readonly state: CutscenePlayerState;
169
+ /** Seconds. */
170
+ readonly time: number;
171
+ readonly length: number;
172
+ /** The pose the picture shows right now, if a shot is active. */
173
+ readonly pose: EvaluatedPose | undefined;
174
+ play(from?: number): void;
175
+ pause(): void;
176
+ /** Stops, rewinds, and returns the camera to gameplay. */
177
+ stop(): void;
178
+ seek(time: number): void;
179
+ /** Jumps to the end (when `skippable`) and completes. */
180
+ skip(): boolean;
181
+ /** Advances by `dt` seconds; only needed with `tick: 'manual'`. */
182
+ update(dt: number): void;
183
+ /** Swaps the definition in place, keeping time and state (live editing). */
184
+ setDefinition(definition: CutsceneDefinition): void;
185
+ on<K extends keyof CutscenePlayerEvents>(event: K, handler: CutscenePlayerEvents[K]): () => void;
186
+ dispose(): void;
187
+ }
188
+ /**
189
+ * Plays a cutscene against a live stage: drives the camera through a
190
+ * pipeline behavior, fires event/audio items as the playhead crosses them,
191
+ * and runs scene transitions through the renderer.
192
+ *
193
+ * ```ts
194
+ * const player = createCutscenePlayer(INTRO_CUTSCENE, { host: createStageCutsceneHost(stage) });
195
+ * player.on('complete', () => player.dispose());
196
+ * player.play();
197
+ * ```
198
+ */
199
+ declare function createCutscenePlayer(initial: CutsceneDefinition, options: CutscenePlayerOptions): CutscenePlayer;
200
+
201
+ interface StageCutsceneHostOptions {
202
+ /**
203
+ * Looks a song reference (slug or URL from a `playSong` event / audio
204
+ * item) up to a definition the audio module can play. Without it song
205
+ * items are ignored.
206
+ */
207
+ resolveSong?: (ref: string) => SongDefinition | Promise<SongDefinition | undefined> | undefined;
208
+ /** Maps a transition type to a blend shader; defaults to a crossfade for every type. */
209
+ transitionShader?: (type: SceneTransitionType) => ZylemTransitionShader | undefined;
210
+ /** Called for `emit` events in addition to the stage dispatch. */
211
+ onEvent?: (name: string, payload: Record<string, unknown>) => void;
212
+ }
213
+ /**
214
+ * Registers the blend shaders every stage-bound cutscene uses for its scene
215
+ * transitions, typically once at startup:
216
+ *
217
+ * ```ts
218
+ * import { createStageTransition } from '@zylem/shaders';
219
+ * setCutsceneTransitionShaders((type) => createStageTransition({ pattern: type }).shader);
220
+ * ```
221
+ *
222
+ * Without this, every non-`cut` transition is a plain crossfade.
223
+ */
224
+ declare function setCutsceneTransitionShaders(resolver: ((type: SceneTransitionType) => ZylemTransitionShader | undefined) | null): void;
225
+ /**
226
+ * A `CutsceneHost` bound to a live stage: drives the stage camera, resolves
227
+ * entities by name, dispatches stage events, writes stage variables, plays
228
+ * songs through `@zylem/game-lib/audio` (loaded on demand) and one-shots
229
+ * through Howler, and runs scene transitions on the stage renderer.
230
+ */
231
+ /** What a stage-bound cutscene plays on: the public `Stage` wrapper or the internal stage. */
232
+ type CutsceneStageLike = ZylemStage | Stage;
233
+ declare function createStageCutsceneHost(stageLike: CutsceneStageLike, options?: StageCutsceneHostOptions): CutsceneHost;
234
+
235
+ /**
236
+ * Editor preview of a cutscene inside the running game: answers the bridge's
237
+ * `cutscene:*` commands with a player bound to the current stage and reports
238
+ * progress back. Owned by `ZylemGame`; Director mode drives it.
239
+ */
240
+ declare class CutscenePreviewController {
241
+ private readonly getStage;
242
+ private readonly publish;
243
+ private readonly hostOptions;
244
+ private readonly publishView?;
245
+ private player;
246
+ private lastStatus;
247
+ /** A load that arrived before the stage existed; replayed by `stageReady()`. */
248
+ private pending;
249
+ private readonly viewInverse;
250
+ private readonly viewProjection;
251
+ private lastView;
252
+ constructor(getStage: () => ZylemStage | null, publish: (status: CutsceneStatusPayload) => void, hostOptions?: StageCutsceneHostOptions, publishView?: ((view: CutsceneViewPayload) => void) | undefined);
253
+ get active(): boolean;
254
+ /**
255
+ * The game reports itself running before its first stage finishes loading,
256
+ * so an editor that loads a cutscene straight away would find no stage.
257
+ * The game calls this once a stage is up; a held load runs then.
258
+ */
259
+ stageReady(): void;
260
+ load(payload: CutsceneLoadPayload): void;
261
+ play(from?: number): void;
262
+ pause(): void;
263
+ stop(): void;
264
+ seek(time: number): void;
265
+ /** Drops the player because its stage is going away; a held load survives for the next stage. */
266
+ releaseStage(): void;
267
+ /**
268
+ * Once per rendered frame while a cutscene is loaded: publishes the
269
+ * camera's projection and the canvas box when either changed, so the
270
+ * editor's overlays track the view without polling.
271
+ */
272
+ frame(): void;
273
+ unload(): void;
274
+ /** The live camera as position + look-at, for "capture from viewport". */
275
+ cameraPose(): Omit<CameraPosePayload, 'requestId'> | null;
276
+ private report;
277
+ }
278
+
279
+ export { AudioItem, CUTSCENE_BEHAVIOR_KEY, CameraShot, CameraTrack, CutsceneCamera, CutsceneCameraBehavior, CutsceneDefinition, CutsceneEasing, type CutsceneFrame, type CutsceneHost, type CutscenePlayer, type CutscenePlayerEvents, type CutscenePlayerOptions, type CutscenePlayerState, CutscenePreviewController, CutsceneScene, type CutsceneStageLike, DollyPath, type EvaluatedPose, EventItem, SceneTransition, SceneTransitionType, type StageCutsceneHostOptions, type TargetLookup, Vec3Def, activeShot, cameraTracks, createCutscenePlayer, createStageCutsceneHost, cutsceneLength, dollyPointAt, easeValue, evaluateCameraPose, evaluateCutscene, itemsBetween, lerpPose, lerpVec3, previousShot, sampleDollyPath, sceneAt, setCutsceneTransitionShaders, shotAt };
@@ -0,0 +1 @@
1
+ import"./chunk-VMXSE3EC.js";import{a as u,b as v,c as w,d as x,e as y,f as z,g as A,h as B,i as C,j as D,k as E}from"./chunk-YNX3Q3CL.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-2XMG3NJS.js";import"./chunk-7GYFZKK7.js";import"./chunk-QGIYILYI.js";import"./chunk-WOT6VMZA.js";export{C as AudioItemSchema,a as CUTSCENE_BEHAVIOR_KEY,w as CameraKeyframeSchema,z as CameraShotSchema,b as CutsceneCameraBehavior,x as CutsceneCameraSchema,E as CutsceneDefinitionSchema,A as CutsceneEventSchema,t as CutscenePreviewController,v as CutsceneSceneSchema,D as CutsceneTrackSchema,y as DollyPathSchema,B as EventItemSchema,u as SceneTransitionSchema,h as activeShot,o as cameraTracks,q as createCutscenePlayer,s as createStageCutsceneHost,p as cutsceneLength,j as dollyPointAt,c as easeValue,l as evaluateCameraPose,m as evaluateCutscene,n as itemsBetween,e as lerpPose,d as lerpVec3,i as previousShot,k as sampleDollyPath,f as sceneAt,r as setCutsceneTransitionShaders,g as shotAt};
package/dist/core.d.ts CHANGED
@@ -1,29 +1,32 @@
1
- import { B as Stage, E as StageStateInterface, C as CameraWrapper } from './game-BPOr7zTB.js';
2
- export { A as AspectRatio, q as AspectRatioValue, k as CameraManager, j as CameraOptions, D as DeviceProfile, p as FirstPersonOptions, l as FirstPersonPerspective, o as Fixed2DOptions, F as Fixed2DPerspective, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, P as PerspectiveOptions, y as RenderBundleManager, z as RenderStrategyManager, R as ResolutionInput, e as ResolveGameConfigRuntime, v as RetroPreset, w as RetroPresetKey, x as RetroResolution, S as StageConfigLike, h as StageOptions, n as ThirdPersonOptions, T as ThirdPersonPerspective, i as createCamera, c as createGame, m as createPerspective, f as createStage, g as gameConfig, r as getDisplayAspect, t as getPresetResolution, u as parseResolution, s as stageConfig } from './game-BPOr7zTB.js';
1
+ import { S as StageStateInterface } from './game-9PjI5z2p.js';
2
+ export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-9PjI5z2p.js';
3
3
  export { G as GameInputConfig, a as GameInputPlayerConfig, K as KeyboardMapping, M as MouseConfig, b as MouseMapping, V as VirtualTouchButtonConfig, d as VirtualTouchButtonSlot, c as VirtualTouchButtonsConfig, e as VirtualTouchConfig, f as VirtualTouchJoystickConfig, g as VirtualTouchJoysticksConfig, h as VirtualTouchPosition, i as VirtualTouchStyle, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
4
+ import { l as Stage, C as CameraWrapper } from './stage-BuGkjZnr.js';
5
+ export { e as CameraManager, d as CameraOptions, j as FirstPersonOptions, f as FirstPersonPerspective, i as Fixed2DOptions, F as Fixed2DPerspective, P as PerspectiveOptions, R as RenderBundleManager, k as RenderStrategyManager, S as StageConfigLike, a as StageOptions, h as ThirdPersonOptions, T as ThirdPersonPerspective, b as createCamera, g as createPerspective, c as createStage, s as stageConfig } from './stage-BuGkjZnr.js';
4
6
  import { Vector2 } from 'three';
5
- import { G as GameEntity, a as GameEntityOptions } from './entity-XZNGBeca.js';
7
+ import { G as GameEntity, a as GameEntityOptions } from './entity-XqvuWgPm.js';
6
8
  import { S as StageBlueprint } from './blueprints-TbGY-h53.js';
7
9
  import { a as SetupContext, k as LoadedContext, U as UpdateContext, D as DestroyContext, l as CleanupContext } from './base-node-life-cycle-BK9xebT9.js';
8
10
  export { L as LoadingEvent, S as StageNavigationOptions } from './base-node-life-cycle-BK9xebT9.js';
9
11
  export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
10
- import { f as CameraBehavior } from './zylem-camera-DZTpPOiD.js';
11
- export { g as CameraAction, d as CameraContext, e as CameraPerspective, j as CameraPipeline, h as CameraPipelineState, C as CameraPose, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-DZTpPOiD.js';
12
+ import { f as CameraBehavior } from './zylem-camera-Baf5vH8Z.js';
13
+ export { g as CameraAction, d as CameraContext, e as CameraPerspective, j as CameraPipeline, h as CameraPipelineState, C as CameraPose, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-Baf5vH8Z.js';
12
14
  import { e as Vec3Input, c as Vec3 } from './vector-D3eDzvcA.js';
13
15
  export { f as VEC2_ONE, g as VEC2_ZERO, h as VEC3_ONE, i as VEC3_ZERO, V as Vec2, a as Vec2Components, b as Vec2Input, d as Vec3Components, n as normalizeVec2, j as normalizeVec3, t as toThreeVector2, k as toThreeVector3 } from './vector-D3eDzvcA.js';
14
16
  import { S as StageEntity } from './entity-BIf_a4dl.js';
15
17
  import { B as BaseNode, N as NodeInterface } from './base-node-idopiSw5.js';
16
- import './entity-type-map-CkkFMSrL.js';
18
+ import './default-controls-CAKJ5zlo.js';
19
+ import './events.js';
20
+ import 'mitt';
21
+ import '@zylem/behaviors/core';
22
+ import './entity-type-map-CrsrKT8c.js';
17
23
  import './material-CxxAyJYp.js';
18
24
  import 'three/webgpu';
19
- import '@zylem/behaviors/core';
25
+ import './selection-bounds-BKmSo9aG.js';
20
26
  import '@zylem/behaviors/particle-emitter';
21
27
  import 'three/addons/lines/webgpu/Line2.js';
22
28
  import './simulation-body-zQw-emOr.js';
23
29
  import '@zylem/bridge';
24
- import './events.js';
25
- import 'mitt';
26
- import './default-controls-CAKJ5zlo.js';
27
30
  import './collision-builder-BckxkdmA.js';
28
31
  import '@sinclair/typebox';
29
32
 
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- import{a as b,b as c,c as d,d as e,e as f,f as H,g as I,h as J,i as K,j as L,k as M,l as N,m as O,n as P,o as Q}from"./chunk-F5LROYZL.js";import{a,c as p,d as q,e as r,f as s,g as t,h as u,i as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,v as G}from"./chunk-IBJLPJLE.js";import{a as o}from"./chunk-7GYFZKK7.js";import"./chunk-Q2YDBMVY.js";import"./chunk-BCFFS3FP.js";import"./chunk-QDQ4QMAI.js";import"./chunk-AE3CTVHY.js";import"./chunk-ZTYNZ2N2.js";import"./chunk-CBUQBP2U.js";import"./chunk-EVMLNMGU.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-YOVE25NW.js";import"./chunk-MXO4VGDB.js";import"./chunk-BMRFDDMR.js";import"./chunk-SAQA4SXW.js";import"./chunk-7NYP4YAG.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-EVYHPR3J.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import{a as g,b as h,c as i,d as j,g as k,h as l,i as m,j as n}from"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-PCFF4LLO.js";import"./chunk-UG22Z42P.js";export{b as AspectRatio,B as CameraManager,w as CameraPipeline,C as CameraWrapper,z as FirstPersonPerspective,y as Fixed2DPerspective,J as Game,v as Perspectives,s as RenderBundleManager,t as RenderStrategyManager,M as STAGE_STATE_CHANGE,I as StageManager,x as ThirdPersonPerspective,h as VEC2_ONE,g as VEC2_ZERO,j as VEC3_ONE,i as VEC3_ZERO,D as createCamera,P as createFollowTarget,K as createGame,A as createPerspective,G as createStage,o as crossfadeTransitionShader,O as dispatchStageState,L as entitySpawner,f as gameConfig,c as getDisplayAspect,d as getPresetResolution,N as initStageStateDispatcher,r as isManagedRenderEntity,a as isWebGPUSupported,k as normalizeVec2,l as normalizeVec3,e as parseResolution,p as resolveRenderCategory,Q as setCameraFeed,u as setStageFrameProfilerEnabled,E as stageConfig,H as stageState,m as toThreeVector2,n as toThreeVector3,q as usesManagedRenderPath,F as vessel};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as H,g as I,h as J,i as K,j as L,k as M,l as N,m as O,n as P,o as Q}from"./chunk-2MHB4X6B.js";import{a,c as p,d as q,e as r,f as s,g as t,h as u,i as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,v as G}from"./chunk-LSFWI46T.js";import"./chunk-PCFF4LLO.js";import"./chunk-Q2YDBMVY.js";import"./chunk-BCFFS3FP.js";import"./chunk-VSFULLND.js";import"./chunk-2HSR5XDQ.js";import"./chunk-HISTSRAL.js";import"./chunk-BQRMYLYD.js";import"./chunk-GPCSX3M6.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-LI43BZQN.js";import"./chunk-YQS7CGXE.js";import"./chunk-STVEILJJ.js";import"./chunk-KP6DLLJO.js";import"./chunk-6FGXC4T6.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-EVYHPR3J.js";import"./chunk-VUJXR5K5.js";import"./chunk-2XMG3NJS.js";import{a as o}from"./chunk-7GYFZKK7.js";import"./chunk-QGIYILYI.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import{a as g,b as h,c as i,d as j,g as k,h as l,i as m,j as n}from"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-UG22Z42P.js";import"./chunk-WOT6VMZA.js";export{b as AspectRatio,B as CameraManager,w as CameraPipeline,C as CameraWrapper,z as FirstPersonPerspective,y as Fixed2DPerspective,J as Game,v as Perspectives,s as RenderBundleManager,t as RenderStrategyManager,M as STAGE_STATE_CHANGE,I as StageManager,x as ThirdPersonPerspective,h as VEC2_ONE,g as VEC2_ZERO,j as VEC3_ONE,i as VEC3_ZERO,D as createCamera,P as createFollowTarget,K as createGame,A as createPerspective,G as createStage,o as crossfadeTransitionShader,O as dispatchStageState,L as entitySpawner,f as gameConfig,c as getDisplayAspect,d as getPresetResolution,N as initStageStateDispatcher,r as isManagedRenderEntity,a as isWebGPUSupported,k as normalizeVec2,l as normalizeVec3,e as parseResolution,p as resolveRenderCategory,Q as setCameraFeed,u as setStageFrameProfilerEnabled,E as stageConfig,H as stageState,m as toThreeVector2,n as toThreeVector3,q as usesManagedRenderPath,F as vessel};