@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,509 @@
1
+ import * as _sinclair_typebox from '@sinclair/typebox';
2
+ import { Static } from '@sinclair/typebox';
3
+
4
+ /**
5
+ * TypeBox schema for a cutscene the cinematics module can play: a timeline in
6
+ * seconds split into scenes, cameras (static, dolly along a spline, or
7
+ * following an entity) placed on camera tracks as shots, camera keyframes,
8
+ * and event/audio tracks that fire gameplay hooks at points in time.
9
+ *
10
+ * Creator's Director mode authors `.cutscene.json` documents that strip down
11
+ * to this shape (`toRuntimeCutscene` in `@zylem-creator/shared`).
12
+ */
13
+ declare const Vec3Schema: _sinclair_typebox.TObject<{
14
+ x: _sinclair_typebox.TNumber;
15
+ y: _sinclair_typebox.TNumber;
16
+ z: _sinclair_typebox.TNumber;
17
+ }>;
18
+ type Vec3Def = Static<typeof Vec3Schema>;
19
+ declare const CutsceneEasingSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
20
+ type CutsceneEasing = Static<typeof CutsceneEasingSchema>;
21
+ declare const SceneTransitionTypeSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
22
+ type SceneTransitionType = Static<typeof SceneTransitionTypeSchema>;
23
+ declare const SceneTransitionSchema: _sinclair_typebox.TObject<{
24
+ type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
25
+ /** Seconds; ignored for `cut`. */
26
+ duration: _sinclair_typebox.TNumber;
27
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
28
+ }>;
29
+ type SceneTransition = Static<typeof SceneTransitionSchema>;
30
+ declare const CutsceneSceneSchema: _sinclair_typebox.TObject<{
31
+ id: _sinclair_typebox.TString;
32
+ name: _sinclair_typebox.TString;
33
+ /** Seconds from the cutscene start. */
34
+ start: _sinclair_typebox.TNumber;
35
+ end: _sinclair_typebox.TNumber;
36
+ /** How the picture arrives at this scene's start. */
37
+ transitionIn: _sinclair_typebox.TObject<{
38
+ type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
39
+ /** Seconds; ignored for `cut`. */
40
+ duration: _sinclair_typebox.TNumber;
41
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
42
+ }>;
43
+ }>;
44
+ type CutsceneScene = Static<typeof CutsceneSceneSchema>;
45
+ declare const CameraPoseDefSchema: _sinclair_typebox.TObject<{
46
+ position: _sinclair_typebox.TObject<{
47
+ x: _sinclair_typebox.TNumber;
48
+ y: _sinclair_typebox.TNumber;
49
+ z: _sinclair_typebox.TNumber;
50
+ }>;
51
+ lookAt: _sinclair_typebox.TObject<{
52
+ x: _sinclair_typebox.TNumber;
53
+ y: _sinclair_typebox.TNumber;
54
+ z: _sinclair_typebox.TNumber;
55
+ }>;
56
+ }>;
57
+ type CameraPoseDef = Static<typeof CameraPoseDefSchema>;
58
+ declare const CameraKeyframeSchema: _sinclair_typebox.TObject<{
59
+ id: _sinclair_typebox.TString;
60
+ /** Seconds from the cutscene start. */
61
+ time: _sinclair_typebox.TNumber;
62
+ position: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
63
+ x: _sinclair_typebox.TNumber;
64
+ y: _sinclair_typebox.TNumber;
65
+ z: _sinclair_typebox.TNumber;
66
+ }>>;
67
+ lookAt: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
68
+ x: _sinclair_typebox.TNumber;
69
+ y: _sinclair_typebox.TNumber;
70
+ z: _sinclair_typebox.TNumber;
71
+ }>>;
72
+ fov: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
73
+ /** Easing used to arrive at this keyframe from the previous one. */
74
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
75
+ }>;
76
+ type CameraKeyframe = Static<typeof CameraKeyframeSchema>;
77
+ declare const CutsceneCameraKindSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"static">, _sinclair_typebox.TLiteral<"dolly">, _sinclair_typebox.TLiteral<"follow">]>;
78
+ type CutsceneCameraKind = Static<typeof CutsceneCameraKindSchema>;
79
+ declare const CutsceneCameraSchema: _sinclair_typebox.TObject<{
80
+ id: _sinclair_typebox.TString;
81
+ name: _sinclair_typebox.TString;
82
+ kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"static">, _sinclair_typebox.TLiteral<"dolly">, _sinclair_typebox.TLiteral<"follow">]>;
83
+ /** Vertical field of view in degrees. */
84
+ fov: _sinclair_typebox.TNumber;
85
+ /** Base pose; `static` cameras hold it, keyframes and dollies start from it. */
86
+ pose: _sinclair_typebox.TObject<{
87
+ position: _sinclair_typebox.TObject<{
88
+ x: _sinclair_typebox.TNumber;
89
+ y: _sinclair_typebox.TNumber;
90
+ z: _sinclair_typebox.TNumber;
91
+ }>;
92
+ lookAt: _sinclair_typebox.TObject<{
93
+ x: _sinclair_typebox.TNumber;
94
+ y: _sinclair_typebox.TNumber;
95
+ z: _sinclair_typebox.TNumber;
96
+ }>;
97
+ }>;
98
+ /** `dolly` cameras ride this path over each shot. */
99
+ dollyId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
100
+ /** Progress curve along the dolly path (0 → 1 over the shot). */
101
+ dollyEasing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
102
+ /** Entity name a `follow` camera tracks, and what a dolly looks at when set. */
103
+ target: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
104
+ /** Offset from the target for `follow` cameras. */
105
+ offset: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
106
+ x: _sinclair_typebox.TNumber;
107
+ y: _sinclair_typebox.TNumber;
108
+ z: _sinclair_typebox.TNumber;
109
+ }>>;
110
+ /** Smoothing for `follow` cameras, 0 (instant) … 1 (very slow). */
111
+ damping: _sinclair_typebox.TNumber;
112
+ keyframes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
113
+ id: _sinclair_typebox.TString;
114
+ /** Seconds from the cutscene start. */
115
+ time: _sinclair_typebox.TNumber;
116
+ position: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
117
+ x: _sinclair_typebox.TNumber;
118
+ y: _sinclair_typebox.TNumber;
119
+ z: _sinclair_typebox.TNumber;
120
+ }>>;
121
+ lookAt: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
122
+ x: _sinclair_typebox.TNumber;
123
+ y: _sinclair_typebox.TNumber;
124
+ z: _sinclair_typebox.TNumber;
125
+ }>>;
126
+ fov: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
127
+ /** Easing used to arrive at this keyframe from the previous one. */
128
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
129
+ }>>;
130
+ }>;
131
+ type CutsceneCamera = Static<typeof CutsceneCameraSchema>;
132
+ declare const DollyPathSchema: _sinclair_typebox.TObject<{
133
+ id: _sinclair_typebox.TString;
134
+ name: _sinclair_typebox.TString;
135
+ points: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
136
+ x: _sinclair_typebox.TNumber;
137
+ y: _sinclair_typebox.TNumber;
138
+ z: _sinclair_typebox.TNumber;
139
+ }>>;
140
+ closed: _sinclair_typebox.TBoolean;
141
+ /** Catmull-Rom tension; 0.5 is centripetal. */
142
+ tension: _sinclair_typebox.TNumber;
143
+ }>;
144
+ type DollyPath = Static<typeof DollyPathSchema>;
145
+ declare const ShotBlendSchema: _sinclair_typebox.TObject<{
146
+ /** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
147
+ duration: _sinclair_typebox.TNumber;
148
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
149
+ }>;
150
+ type ShotBlend = Static<typeof ShotBlendSchema>;
151
+ declare const CameraShotSchema: _sinclair_typebox.TObject<{
152
+ id: _sinclair_typebox.TString;
153
+ cameraId: _sinclair_typebox.TString;
154
+ start: _sinclair_typebox.TNumber;
155
+ end: _sinclair_typebox.TNumber;
156
+ blend: _sinclair_typebox.TObject<{
157
+ /** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
158
+ duration: _sinclair_typebox.TNumber;
159
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
160
+ }>;
161
+ }>;
162
+ type CameraShot = Static<typeof CameraShotSchema>;
163
+ declare const CutsceneEventSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
164
+ type: _sinclair_typebox.TLiteral<"emit">;
165
+ /** Stage event name. */
166
+ name: _sinclair_typebox.TString;
167
+ payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
168
+ }>, _sinclair_typebox.TObject<{
169
+ type: _sinclair_typebox.TLiteral<"playAnimation">;
170
+ /** Entity name. */
171
+ entity: _sinclair_typebox.TString;
172
+ /** Animation key as passed to `playAnimation({ key })`. */
173
+ key: _sinclair_typebox.TString;
174
+ }>, _sinclair_typebox.TObject<{
175
+ type: _sinclair_typebox.TLiteral<"playSong">;
176
+ /** Song slug or URL; resolved by the host. */
177
+ song: _sinclair_typebox.TString;
178
+ loop: _sinclair_typebox.TBoolean;
179
+ }>, _sinclair_typebox.TObject<{
180
+ type: _sinclair_typebox.TLiteral<"stopSong">;
181
+ song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
182
+ }>, _sinclair_typebox.TObject<{
183
+ type: _sinclair_typebox.TLiteral<"setVariable">;
184
+ name: _sinclair_typebox.TString;
185
+ value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
186
+ }>]>;
187
+ type CutsceneEvent = Static<typeof CutsceneEventSchema>;
188
+ declare const EventItemSchema: _sinclair_typebox.TObject<{
189
+ id: _sinclair_typebox.TString;
190
+ time: _sinclair_typebox.TNumber;
191
+ event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
192
+ type: _sinclair_typebox.TLiteral<"emit">;
193
+ /** Stage event name. */
194
+ name: _sinclair_typebox.TString;
195
+ payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
196
+ }>, _sinclair_typebox.TObject<{
197
+ type: _sinclair_typebox.TLiteral<"playAnimation">;
198
+ /** Entity name. */
199
+ entity: _sinclair_typebox.TString;
200
+ /** Animation key as passed to `playAnimation({ key })`. */
201
+ key: _sinclair_typebox.TString;
202
+ }>, _sinclair_typebox.TObject<{
203
+ type: _sinclair_typebox.TLiteral<"playSong">;
204
+ /** Song slug or URL; resolved by the host. */
205
+ song: _sinclair_typebox.TString;
206
+ loop: _sinclair_typebox.TBoolean;
207
+ }>, _sinclair_typebox.TObject<{
208
+ type: _sinclair_typebox.TLiteral<"stopSong">;
209
+ song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
210
+ }>, _sinclair_typebox.TObject<{
211
+ type: _sinclair_typebox.TLiteral<"setVariable">;
212
+ name: _sinclair_typebox.TString;
213
+ value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
214
+ }>]>;
215
+ }>;
216
+ type EventItem = Static<typeof EventItemSchema>;
217
+ declare const AudioItemSchema: _sinclair_typebox.TObject<{
218
+ id: _sinclair_typebox.TString;
219
+ time: _sinclair_typebox.TNumber;
220
+ kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
221
+ /** Song slug for `song`, asset URL for `sfx`. */
222
+ ref: _sinclair_typebox.TString;
223
+ loop: _sinclair_typebox.TBoolean;
224
+ /** Gain in dB. */
225
+ volume: _sinclair_typebox.TNumber;
226
+ }>;
227
+ type AudioItem = Static<typeof AudioItemSchema>;
228
+ declare const CameraTrackSchema: _sinclair_typebox.TObject<{
229
+ kind: _sinclair_typebox.TLiteral<"camera">;
230
+ id: _sinclair_typebox.TString;
231
+ name: _sinclair_typebox.TString;
232
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
233
+ id: _sinclair_typebox.TString;
234
+ cameraId: _sinclair_typebox.TString;
235
+ start: _sinclair_typebox.TNumber;
236
+ end: _sinclair_typebox.TNumber;
237
+ blend: _sinclair_typebox.TObject<{
238
+ /** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
239
+ duration: _sinclair_typebox.TNumber;
240
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
241
+ }>;
242
+ }>>;
243
+ }>;
244
+ declare const EventTrackSchema: _sinclair_typebox.TObject<{
245
+ kind: _sinclair_typebox.TLiteral<"event">;
246
+ id: _sinclair_typebox.TString;
247
+ name: _sinclair_typebox.TString;
248
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
249
+ id: _sinclair_typebox.TString;
250
+ time: _sinclair_typebox.TNumber;
251
+ event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
252
+ type: _sinclair_typebox.TLiteral<"emit">;
253
+ /** Stage event name. */
254
+ name: _sinclair_typebox.TString;
255
+ payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
256
+ }>, _sinclair_typebox.TObject<{
257
+ type: _sinclair_typebox.TLiteral<"playAnimation">;
258
+ /** Entity name. */
259
+ entity: _sinclair_typebox.TString;
260
+ /** Animation key as passed to `playAnimation({ key })`. */
261
+ key: _sinclair_typebox.TString;
262
+ }>, _sinclair_typebox.TObject<{
263
+ type: _sinclair_typebox.TLiteral<"playSong">;
264
+ /** Song slug or URL; resolved by the host. */
265
+ song: _sinclair_typebox.TString;
266
+ loop: _sinclair_typebox.TBoolean;
267
+ }>, _sinclair_typebox.TObject<{
268
+ type: _sinclair_typebox.TLiteral<"stopSong">;
269
+ song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
270
+ }>, _sinclair_typebox.TObject<{
271
+ type: _sinclair_typebox.TLiteral<"setVariable">;
272
+ name: _sinclair_typebox.TString;
273
+ value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
274
+ }>]>;
275
+ }>>;
276
+ }>;
277
+ declare const AudioTrackSchema: _sinclair_typebox.TObject<{
278
+ kind: _sinclair_typebox.TLiteral<"audio">;
279
+ id: _sinclair_typebox.TString;
280
+ name: _sinclair_typebox.TString;
281
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
282
+ id: _sinclair_typebox.TString;
283
+ time: _sinclair_typebox.TNumber;
284
+ kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
285
+ /** Song slug for `song`, asset URL for `sfx`. */
286
+ ref: _sinclair_typebox.TString;
287
+ loop: _sinclair_typebox.TBoolean;
288
+ /** Gain in dB. */
289
+ volume: _sinclair_typebox.TNumber;
290
+ }>>;
291
+ }>;
292
+ declare const CutsceneTrackSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
293
+ kind: _sinclair_typebox.TLiteral<"camera">;
294
+ id: _sinclair_typebox.TString;
295
+ name: _sinclair_typebox.TString;
296
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
297
+ id: _sinclair_typebox.TString;
298
+ cameraId: _sinclair_typebox.TString;
299
+ start: _sinclair_typebox.TNumber;
300
+ end: _sinclair_typebox.TNumber;
301
+ blend: _sinclair_typebox.TObject<{
302
+ /** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
303
+ duration: _sinclair_typebox.TNumber;
304
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
305
+ }>;
306
+ }>>;
307
+ }>, _sinclair_typebox.TObject<{
308
+ kind: _sinclair_typebox.TLiteral<"event">;
309
+ id: _sinclair_typebox.TString;
310
+ name: _sinclair_typebox.TString;
311
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
312
+ id: _sinclair_typebox.TString;
313
+ time: _sinclair_typebox.TNumber;
314
+ event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
315
+ type: _sinclair_typebox.TLiteral<"emit">;
316
+ /** Stage event name. */
317
+ name: _sinclair_typebox.TString;
318
+ payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
319
+ }>, _sinclair_typebox.TObject<{
320
+ type: _sinclair_typebox.TLiteral<"playAnimation">;
321
+ /** Entity name. */
322
+ entity: _sinclair_typebox.TString;
323
+ /** Animation key as passed to `playAnimation({ key })`. */
324
+ key: _sinclair_typebox.TString;
325
+ }>, _sinclair_typebox.TObject<{
326
+ type: _sinclair_typebox.TLiteral<"playSong">;
327
+ /** Song slug or URL; resolved by the host. */
328
+ song: _sinclair_typebox.TString;
329
+ loop: _sinclair_typebox.TBoolean;
330
+ }>, _sinclair_typebox.TObject<{
331
+ type: _sinclair_typebox.TLiteral<"stopSong">;
332
+ song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
333
+ }>, _sinclair_typebox.TObject<{
334
+ type: _sinclair_typebox.TLiteral<"setVariable">;
335
+ name: _sinclair_typebox.TString;
336
+ value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
337
+ }>]>;
338
+ }>>;
339
+ }>, _sinclair_typebox.TObject<{
340
+ kind: _sinclair_typebox.TLiteral<"audio">;
341
+ id: _sinclair_typebox.TString;
342
+ name: _sinclair_typebox.TString;
343
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
344
+ id: _sinclair_typebox.TString;
345
+ time: _sinclair_typebox.TNumber;
346
+ kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
347
+ /** Song slug for `song`, asset URL for `sfx`. */
348
+ ref: _sinclair_typebox.TString;
349
+ loop: _sinclair_typebox.TBoolean;
350
+ /** Gain in dB. */
351
+ volume: _sinclair_typebox.TNumber;
352
+ }>>;
353
+ }>]>;
354
+ type CameraTrack = Static<typeof CameraTrackSchema>;
355
+ type EventTrack = Static<typeof EventTrackSchema>;
356
+ type AudioTrack = Static<typeof AudioTrackSchema>;
357
+ type CutsceneTrack = Static<typeof CutsceneTrackSchema>;
358
+ declare const CutsceneDefinitionSchema: _sinclair_typebox.TObject<{
359
+ id: _sinclair_typebox.TString;
360
+ name: _sinclair_typebox.TString;
361
+ /** Seconds. */
362
+ duration: _sinclair_typebox.TNumber;
363
+ /** Stage the cutscene was authored against; informational. */
364
+ stage: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
365
+ skippable: _sinclair_typebox.TBoolean;
366
+ scenes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
367
+ id: _sinclair_typebox.TString;
368
+ name: _sinclair_typebox.TString;
369
+ /** Seconds from the cutscene start. */
370
+ start: _sinclair_typebox.TNumber;
371
+ end: _sinclair_typebox.TNumber;
372
+ /** How the picture arrives at this scene's start. */
373
+ transitionIn: _sinclair_typebox.TObject<{
374
+ type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
375
+ /** Seconds; ignored for `cut`. */
376
+ duration: _sinclair_typebox.TNumber;
377
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
378
+ }>;
379
+ }>>;
380
+ cameras: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
381
+ id: _sinclair_typebox.TString;
382
+ name: _sinclair_typebox.TString;
383
+ kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"static">, _sinclair_typebox.TLiteral<"dolly">, _sinclair_typebox.TLiteral<"follow">]>;
384
+ /** Vertical field of view in degrees. */
385
+ fov: _sinclair_typebox.TNumber;
386
+ /** Base pose; `static` cameras hold it, keyframes and dollies start from it. */
387
+ pose: _sinclair_typebox.TObject<{
388
+ position: _sinclair_typebox.TObject<{
389
+ x: _sinclair_typebox.TNumber;
390
+ y: _sinclair_typebox.TNumber;
391
+ z: _sinclair_typebox.TNumber;
392
+ }>;
393
+ lookAt: _sinclair_typebox.TObject<{
394
+ x: _sinclair_typebox.TNumber;
395
+ y: _sinclair_typebox.TNumber;
396
+ z: _sinclair_typebox.TNumber;
397
+ }>;
398
+ }>;
399
+ /** `dolly` cameras ride this path over each shot. */
400
+ dollyId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
401
+ /** Progress curve along the dolly path (0 → 1 over the shot). */
402
+ dollyEasing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
403
+ /** Entity name a `follow` camera tracks, and what a dolly looks at when set. */
404
+ target: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
405
+ /** Offset from the target for `follow` cameras. */
406
+ offset: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
407
+ x: _sinclair_typebox.TNumber;
408
+ y: _sinclair_typebox.TNumber;
409
+ z: _sinclair_typebox.TNumber;
410
+ }>>;
411
+ /** Smoothing for `follow` cameras, 0 (instant) … 1 (very slow). */
412
+ damping: _sinclair_typebox.TNumber;
413
+ keyframes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
414
+ id: _sinclair_typebox.TString;
415
+ /** Seconds from the cutscene start. */
416
+ time: _sinclair_typebox.TNumber;
417
+ position: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
418
+ x: _sinclair_typebox.TNumber;
419
+ y: _sinclair_typebox.TNumber;
420
+ z: _sinclair_typebox.TNumber;
421
+ }>>;
422
+ lookAt: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
423
+ x: _sinclair_typebox.TNumber;
424
+ y: _sinclair_typebox.TNumber;
425
+ z: _sinclair_typebox.TNumber;
426
+ }>>;
427
+ fov: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
428
+ /** Easing used to arrive at this keyframe from the previous one. */
429
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
430
+ }>>;
431
+ }>>;
432
+ dollies: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
433
+ id: _sinclair_typebox.TString;
434
+ name: _sinclair_typebox.TString;
435
+ points: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
436
+ x: _sinclair_typebox.TNumber;
437
+ y: _sinclair_typebox.TNumber;
438
+ z: _sinclair_typebox.TNumber;
439
+ }>>;
440
+ closed: _sinclair_typebox.TBoolean;
441
+ /** Catmull-Rom tension; 0.5 is centripetal. */
442
+ tension: _sinclair_typebox.TNumber;
443
+ }>>;
444
+ tracks: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
445
+ kind: _sinclair_typebox.TLiteral<"camera">;
446
+ id: _sinclair_typebox.TString;
447
+ name: _sinclair_typebox.TString;
448
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
449
+ id: _sinclair_typebox.TString;
450
+ cameraId: _sinclair_typebox.TString;
451
+ start: _sinclair_typebox.TNumber;
452
+ end: _sinclair_typebox.TNumber;
453
+ blend: _sinclair_typebox.TObject<{
454
+ /** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
455
+ duration: _sinclair_typebox.TNumber;
456
+ easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
457
+ }>;
458
+ }>>;
459
+ }>, _sinclair_typebox.TObject<{
460
+ kind: _sinclair_typebox.TLiteral<"event">;
461
+ id: _sinclair_typebox.TString;
462
+ name: _sinclair_typebox.TString;
463
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
464
+ id: _sinclair_typebox.TString;
465
+ time: _sinclair_typebox.TNumber;
466
+ event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
467
+ type: _sinclair_typebox.TLiteral<"emit">;
468
+ /** Stage event name. */
469
+ name: _sinclair_typebox.TString;
470
+ payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
471
+ }>, _sinclair_typebox.TObject<{
472
+ type: _sinclair_typebox.TLiteral<"playAnimation">;
473
+ /** Entity name. */
474
+ entity: _sinclair_typebox.TString;
475
+ /** Animation key as passed to `playAnimation({ key })`. */
476
+ key: _sinclair_typebox.TString;
477
+ }>, _sinclair_typebox.TObject<{
478
+ type: _sinclair_typebox.TLiteral<"playSong">;
479
+ /** Song slug or URL; resolved by the host. */
480
+ song: _sinclair_typebox.TString;
481
+ loop: _sinclair_typebox.TBoolean;
482
+ }>, _sinclair_typebox.TObject<{
483
+ type: _sinclair_typebox.TLiteral<"stopSong">;
484
+ song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
485
+ }>, _sinclair_typebox.TObject<{
486
+ type: _sinclair_typebox.TLiteral<"setVariable">;
487
+ name: _sinclair_typebox.TString;
488
+ value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
489
+ }>]>;
490
+ }>>;
491
+ }>, _sinclair_typebox.TObject<{
492
+ kind: _sinclair_typebox.TLiteral<"audio">;
493
+ id: _sinclair_typebox.TString;
494
+ name: _sinclair_typebox.TString;
495
+ items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
496
+ id: _sinclair_typebox.TString;
497
+ time: _sinclair_typebox.TNumber;
498
+ kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
499
+ /** Song slug for `song`, asset URL for `sfx`. */
500
+ ref: _sinclair_typebox.TString;
501
+ loop: _sinclair_typebox.TBoolean;
502
+ /** Gain in dB. */
503
+ volume: _sinclair_typebox.TNumber;
504
+ }>>;
505
+ }>]>>;
506
+ }>;
507
+ type CutsceneDefinition = Static<typeof CutsceneDefinitionSchema>;
508
+
509
+ export { AudioItemSchema as A, CutsceneDefinitionSchema as C, DollyPathSchema as D, EventItemSchema as E, SceneTransitionSchema as S, type Vec3Def as V, CutsceneSceneSchema as a, CutsceneCameraSchema as b, CameraKeyframeSchema as c, CameraShotSchema as d, CutsceneEventSchema as e, CutsceneTrackSchema as f, type CutsceneDefinition as g, type CutsceneScene as h, type CutsceneCamera as i, type CutsceneCameraKind as j, type CutsceneEasing as k, type CameraKeyframe as l, type CameraPoseDef as m, type CameraShot as n, type CameraTrack as o, type EventTrack as p, type AudioTrack as q, type CutsceneTrack as r, type DollyPath as s, type ShotBlend as t, type CutsceneEvent as u, type EventItem as v, type AudioItem as w, type SceneTransition as x, type SceneTransitionType as y };
@@ -1,4 +1,4 @@
1
- import { G as GameEntity } from './entity-XZNGBeca.js';
1
+ import { G as GameEntity } from './entity-XqvuWgPm.js';
2
2
 
3
3
  type DebugTools = 'select' | 'translate' | 'rotate' | 'scale' | 'delete' | 'add' | 'none';
4
4
  /** Tools that manipulate a selected entity's transform via the gizmo. */
package/dist/debug.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-CpnNRUFh.js';
1
+ export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-Cg3f5FB6.js';
2
2
  import * as three from 'three';
3
3
  import { Group, Scene, Vector3, Camera, Object3D } from 'three';
4
4
  import { c as Vec3 } from './vector-D3eDzvcA.js';
5
- import { G as GameEntity } from './entity-XZNGBeca.js';
5
+ import { G as GameEntity } from './entity-XqvuWgPm.js';
6
+ export { S as SELECTION_BOUNDS_MARGIN, a as SELECTION_THIN_AXIS_FRACTION, c as SELECTION_THIN_AXIS_MAX, b as SELECTION_THIN_AXIS_MIN, d as SelectionBoundsProvider, m as measureObjectSelectionBounds, p as padSelectionBounds, r as resolveSelectionBounds } from './selection-bounds-BKmSo9aG.js';
6
7
  import { WebGPURenderer } from 'three/webgpu';
7
8
  import '@zylem/behaviors/core';
8
9
  import './simulation-body-zQw-emOr.js';
package/dist/debug.js CHANGED
@@ -1 +1 @@
1
- import"./chunk-MSCVL5OK.js";import{a as x,b as y}from"./chunk-Q2YDBMVY.js";import{c as I,d as J,e as K,f as L}from"./chunk-BCFFS3FP.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-CBUQBP2U.js";import{A as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,y as u,z as v}from"./chunk-EVMLNMGU.js";export{I as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,a as TRANSFORM_TOOLS,L as TransformGizmo,J as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,K as intersectPlane,j as isPickMode,b as isTransformTool,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
1
+ import"./chunk-ELQN62PQ.js";import{a as x,b as y}from"./chunk-Q2YDBMVY.js";import{c as P,d as Q,e as R,f as S}from"./chunk-BCFFS3FP.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-BQRMYLYD.js";import{B as u,C as v,D as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,u as o,v as p,w as q,x as r,y as s,z as t}from"./chunk-GPCSX3M6.js";import{a as I,b as J,c as K,d as L,e as M,f as N,g as O}from"./chunk-UUOPT2N4.js";import"./chunk-WOT6VMZA.js";export{P as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,I as SELECTION_BOUNDS_MARGIN,J as SELECTION_THIN_AXIS_FRACTION,L as SELECTION_THIN_AXIS_MAX,K as SELECTION_THIN_AXIS_MIN,a as TRANSFORM_TOOLS,S as TransformGizmo,Q as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,R as intersectPlane,j as isPickMode,b as isTransformTool,N as measureObjectSelectionBounds,M as padSelectionBounds,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,O as resolveSelectionBounds,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
@@ -561,6 +561,30 @@ declare class GameEntity<O extends GameEntityOptions> extends BaseNode<O> implem
561
561
  * Used by the stage to auto-register required systems.
562
562
  */
563
563
  getBehaviorRefs(): BehaviorRef[];
564
+ /**
565
+ * Find the attached ref for a behavior, matched by descriptor key so a
566
+ * re-imported copy of the same descriptor still resolves.
567
+ */
568
+ getBehaviorRef<O extends Record<string, any>>(descriptor: BehaviorDescriptor<O, any>): BehaviorRef<O> | null;
569
+ hasBehavior(descriptor: BehaviorDescriptor<any, any>): boolean;
570
+ /**
571
+ * Detach a behavior from this entity.
572
+ *
573
+ * Removes the ref so future spawns skip it. If the entity is live in a
574
+ * stage, the stage must also drop the system link (see
575
+ * `StageEntityDelegate.detachBehaviorLink`); `StageDebugDelegate` does this
576
+ * for editor-driven removals.
577
+ *
578
+ * @param target The descriptor (matched by key) or the exact ref to remove.
579
+ * @returns The removed ref, or `null` when nothing matched.
580
+ */
581
+ removeBehavior(target: BehaviorDescriptor<any, any> | BehaviorRef<any>): BehaviorRef<any> | null;
582
+ /**
583
+ * Re-attach a previously removed ref as-is (options, FSM state and all).
584
+ * Used by undo so a restored behavior is the same object, not a re-created
585
+ * one.
586
+ */
587
+ restoreBehaviorRef(ref: BehaviorRef<any>): void;
564
588
  getCollisionCallbacks(): Array<(params: CollisionContext<this, O>) => void>;
565
589
  getCollisionRegistrations(): Array<CollisionRegistration<this, O>>;
566
590
  private copyBehaviorRefsTo;
@@ -591,6 +615,36 @@ declare class GameEntity<O extends GameEntityOptions> extends BaseNode<O> implem
591
615
  */
592
616
  protected _cleanup(_params: CleanupContext<this>): void;
593
617
  _collision(other: GameEntity<O>, globals?: any, dispatch?: CollisionDispatchMetadata): void;
618
+ /**
619
+ * Whether this entity renders a mesh that a material can be assigned to.
620
+ * Lights, zones, and other mesh-less entities return `false`.
621
+ */
622
+ hasMaterial(): boolean;
623
+ /** The materials currently driving this entity's meshes. */
624
+ getMaterials(): Material[];
625
+ /**
626
+ * Rebuild this entity's material from creation-style options and swap it in
627
+ * on the live mesh, so a runtime change (an editor applying a shader swatch)
628
+ * renders exactly like a restart with `material: options` would.
629
+ *
630
+ * @param options Same shape as `GameEntityOptions.material`.
631
+ * @param settings `disposePrevious` (default `true`) frees the replaced
632
+ * materials; pass `false` when keeping them for undo.
633
+ * @returns The replaced materials, or `null` when the entity has no mesh.
634
+ */
635
+ setMaterial(options: Partial<MaterialOptions>, settings?: {
636
+ disposePrevious?: boolean;
637
+ }): Material[] | null;
638
+ /**
639
+ * Assign already-built materials to every mesh this entity renders. Meshes
640
+ * that carried a material array keep the array shape, cycling through the
641
+ * supplied list so multi-material geometry stays fully covered.
642
+ *
643
+ * @returns The replaced materials, or `null` when the entity has no mesh.
644
+ */
645
+ replaceMaterials(materials: Material[], settings?: {
646
+ disposePrevious?: boolean;
647
+ }): Material[] | null;
594
648
  protected updateMaterials(params: any): void;
595
649
  buildInfo(): Record<string, string>;
596
650
  /**
@@ -1,9 +1,10 @@
1
- import { Vector3, Sprite, Texture, Color, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
1
+ import { Vector3, Sprite, Texture, Color, Box3, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
2
2
  import { B as BaseNode } from './base-node-idopiSw5.js';
3
- import { G as GameEntity, a as GameEntityOptions } from './entity-XZNGBeca.js';
3
+ import { G as GameEntity, a as GameEntityOptions } from './entity-XqvuWgPm.js';
4
4
  import { d as Vec3Components, e as Vec3Input, b as Vec2Input } from './vector-D3eDzvcA.js';
5
5
  import { U as UpdateContext, a as SetupContext, D as DestroyContext, l as CleanupContext } from './base-node-life-cycle-BK9xebT9.js';
6
6
  import { T as TexturePath, e as MaterialOptions } from './material-CxxAyJYp.js';
7
+ import { d as SelectionBoundsProvider } from './selection-bounds-BKmSo9aG.js';
7
8
  import { Simulation } from '@zylem/behaviors/core';
8
9
  import { E as Entity } from './entity-BIf_a4dl.js';
9
10
  import { ParticleEmitterBehaviorOptions, ParticleEffectDefinition, ParticleEmitterHandle } from '@zylem/behaviors/particle-emitter';
@@ -373,12 +374,18 @@ type ZylemZoneOptions = GameEntityOptions & {
373
374
  onExit?: (params: OnExitParams) => void;
374
375
  };
375
376
  declare const ZONE_TYPE: unique symbol;
376
- declare class ZylemZone extends GameEntity<ZylemZoneOptions> implements CollisionHandlerDelegate {
377
+ declare class ZylemZone extends GameEntity<ZylemZoneOptions> implements CollisionHandlerDelegate, SelectionBoundsProvider {
377
378
  static type: symbol;
378
379
  private _enteredZone;
379
380
  private _exitedZone;
380
381
  private _zoneEntities;
381
382
  constructor(options?: ZylemZoneOptions);
383
+ /**
384
+ * A zone has no render object, so the editor cannot measure it. Its
385
+ * selection view is the sensor volume itself: `options.size` centred on
386
+ * the live pose (or the configured position before spawn).
387
+ */
388
+ getSelectionBounds(target: Box3): Box3 | null;
382
389
  handlePostCollision({ delta }: {
383
390
  delta: number;
384
391
  }): boolean;
@@ -614,10 +621,12 @@ type ZylemParticleSystemOptions = GameEntityOptions & ParticleEmitterBehaviorOpt
614
621
  preset?: ParticleEffectDefinition;
615
622
  };
616
623
  declare const PARTICLE_SYSTEM_TYPE: unique symbol;
617
- declare class ZylemParticleSystem extends GameEntity<ZylemParticleSystemOptions> {
624
+ declare class ZylemParticleSystem extends GameEntity<ZylemParticleSystemOptions> implements SelectionBoundsProvider {
618
625
  static type: symbol;
619
626
  __zylemParticleSystemEntity: true;
620
627
  private particleHandle;
628
+ /** The emitter's `group` is empty, so measuring it yields nothing; see {@link PARTICLE_SYSTEM_SELECTION_EXTENT}. */
629
+ getSelectionBounds(target: Box3): Box3 | null;
621
630
  constructor(options?: Partial<ZylemParticleSystemOptions>, initializeBehavior?: boolean);
622
631
  private bindStandaloneTransforms;
623
632
  private resolveParticleHandle;