@holoscript/engine 6.0.3 → 6.0.4

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 (192) hide show
  1. package/dist/AutoMesher-CK47F6AV.js +17 -0
  2. package/dist/GPUBuffers-2LHBCD7X.js +9 -0
  3. package/dist/WebGPUContext-TNEUYU2Y.js +11 -0
  4. package/dist/animation/index.cjs +38 -38
  5. package/dist/animation/index.d.cts +1 -1
  6. package/dist/animation/index.d.ts +1 -1
  7. package/dist/animation/index.js +1 -1
  8. package/dist/audio/index.cjs +16 -6
  9. package/dist/audio/index.d.cts +1 -1
  10. package/dist/audio/index.d.ts +1 -1
  11. package/dist/audio/index.js +1 -1
  12. package/dist/camera/index.cjs +23 -23
  13. package/dist/camera/index.d.cts +1 -1
  14. package/dist/camera/index.d.ts +1 -1
  15. package/dist/camera/index.js +1 -1
  16. package/dist/character/index.cjs +6 -4
  17. package/dist/character/index.js +1 -1
  18. package/dist/choreography/index.cjs +1194 -0
  19. package/dist/choreography/index.d.cts +687 -0
  20. package/dist/choreography/index.d.ts +687 -0
  21. package/dist/choreography/index.js +1156 -0
  22. package/dist/chunk-2CSNRI2N.js +217 -0
  23. package/dist/chunk-33T2WINR.js +266 -0
  24. package/dist/chunk-35R73OFM.js +1257 -0
  25. package/dist/chunk-4MMDSUNP.js +1256 -0
  26. package/dist/chunk-5V6HOU72.js +319 -0
  27. package/dist/chunk-6QOP6PYF.js +1038 -0
  28. package/dist/chunk-7KMJVHIL.js +8944 -0
  29. package/dist/chunk-7VPUC62U.js +1106 -0
  30. package/dist/chunk-A2Y6RCAT.js +1878 -0
  31. package/dist/chunk-AHM42MK6.js +8944 -0
  32. package/dist/chunk-BL7IDTHE.js +218 -0
  33. package/dist/chunk-CITOMSWL.js +10462 -0
  34. package/dist/chunk-CXDPKW2K.js +8944 -0
  35. package/dist/chunk-CXZPLD4S.js +223 -0
  36. package/dist/chunk-CZYJE7IH.js +5169 -0
  37. package/dist/chunk-D2OP7YC7.js +6325 -0
  38. package/dist/chunk-EDRVQHUU.js +1544 -0
  39. package/dist/chunk-EJSLOOW2.js +3589 -0
  40. package/dist/chunk-F53SFGW5.js +1878 -0
  41. package/dist/chunk-HCFPELPY.js +919 -0
  42. package/dist/chunk-HNEE36PY.js +93 -0
  43. package/dist/chunk-HYXNV36F.js +1256 -0
  44. package/dist/chunk-IB7KHVFY.js +821 -0
  45. package/dist/chunk-IBBO7YYG.js +690 -0
  46. package/dist/chunk-ILIBGINU.js +5470 -0
  47. package/dist/chunk-IS4MHLKN.js +5479 -0
  48. package/dist/chunk-JT2PFKWD.js +5479 -0
  49. package/dist/chunk-K4CUB4NY.js +1038 -0
  50. package/dist/chunk-KATDQXRJ.js +10462 -0
  51. package/dist/chunk-KBQE6ZFJ.js +8944 -0
  52. package/dist/chunk-KBVD5K7E.js +560 -0
  53. package/dist/chunk-KCDPVQRY.js +4088 -0
  54. package/dist/chunk-KN4QJPKN.js +8944 -0
  55. package/dist/chunk-KWJ3ROSI.js +8944 -0
  56. package/dist/chunk-L45VF6DD.js +919 -0
  57. package/dist/chunk-LY4T37YK.js +307 -0
  58. package/dist/chunk-MDN5WZXA.js +1544 -0
  59. package/dist/chunk-MGCDP6VU.js +928 -0
  60. package/dist/chunk-NCX7X6G2.js +8681 -0
  61. package/dist/chunk-OF54BPVD.js +913 -0
  62. package/dist/chunk-OWSN2Q3Q.js +690 -0
  63. package/dist/chunk-PRRB5TTA.js +406 -0
  64. package/dist/chunk-PXWVQF76.js +4086 -0
  65. package/dist/chunk-PYCOIDT2.js +812 -0
  66. package/dist/chunk-PZCSADOV.js +928 -0
  67. package/dist/chunk-Q2XBVS2K.js +1038 -0
  68. package/dist/chunk-QDZRXWN5.js +1776 -0
  69. package/dist/chunk-RNWOZ6WQ.js +913 -0
  70. package/dist/chunk-ROLFT4CJ.js +1693 -0
  71. package/dist/chunk-SLTJRZ2N.js +266 -0
  72. package/dist/chunk-SRUS5XSU.js +4088 -0
  73. package/dist/chunk-TKCA3WZ5.js +5409 -0
  74. package/dist/chunk-TNRMXYI2.js +1650 -0
  75. package/dist/chunk-TQB3GJGM.js +9763 -0
  76. package/dist/chunk-TUFGXG6K.js +510 -0
  77. package/dist/chunk-U6KMTGQJ.js +632 -0
  78. package/dist/chunk-VMGJQST6.js +8681 -0
  79. package/dist/chunk-X4F4TCG4.js +5470 -0
  80. package/dist/chunk-ZIFROE75.js +1544 -0
  81. package/dist/chunk-ZIJQYHSQ.js +1204 -0
  82. package/dist/combat/index.cjs +4 -4
  83. package/dist/combat/index.d.cts +1 -1
  84. package/dist/combat/index.d.ts +1 -1
  85. package/dist/combat/index.js +1 -1
  86. package/dist/ecs/index.cjs +1 -1
  87. package/dist/ecs/index.js +1 -1
  88. package/dist/environment/index.cjs +14 -14
  89. package/dist/environment/index.d.cts +1 -1
  90. package/dist/environment/index.d.ts +1 -1
  91. package/dist/environment/index.js +1 -1
  92. package/dist/gpu/index.cjs +4810 -0
  93. package/dist/gpu/index.js +3714 -0
  94. package/dist/hologram/index.cjs +27 -1
  95. package/dist/hologram/index.js +1 -1
  96. package/dist/index-B2PIsAmR.d.cts +2180 -0
  97. package/dist/index-B2PIsAmR.d.ts +2180 -0
  98. package/dist/index-BHySEPX7.d.cts +2921 -0
  99. package/dist/index-BJV21zuy.d.cts +341 -0
  100. package/dist/index-BJV21zuy.d.ts +341 -0
  101. package/dist/index-BQutTphC.d.cts +790 -0
  102. package/dist/index-ByIq2XrS.d.cts +3910 -0
  103. package/dist/index-BysHjDSO.d.cts +224 -0
  104. package/dist/index-BysHjDSO.d.ts +224 -0
  105. package/dist/index-CKwAJGck.d.ts +455 -0
  106. package/dist/index-CUl3QstQ.d.cts +3006 -0
  107. package/dist/index-CUl3QstQ.d.ts +3006 -0
  108. package/dist/index-CmYtNiI-.d.cts +953 -0
  109. package/dist/index-CmYtNiI-.d.ts +953 -0
  110. package/dist/index-CnRzWxi_.d.cts +522 -0
  111. package/dist/index-CnRzWxi_.d.ts +522 -0
  112. package/dist/index-CwRWbSC7.d.ts +2921 -0
  113. package/dist/index-CxKIBstO.d.ts +790 -0
  114. package/dist/index-DJ6-R8vh.d.cts +455 -0
  115. package/dist/index-DQKisbcI.d.cts +4968 -0
  116. package/dist/index-DQKisbcI.d.ts +4968 -0
  117. package/dist/index-DRT2zJez.d.ts +3910 -0
  118. package/dist/index-DfNLiAka.d.cts +192 -0
  119. package/dist/index-DfNLiAka.d.ts +192 -0
  120. package/dist/index-nMvkoRm8.d.cts +405 -0
  121. package/dist/index-nMvkoRm8.d.ts +405 -0
  122. package/dist/index-s9yOFU37.d.cts +604 -0
  123. package/dist/index-s9yOFU37.d.ts +604 -0
  124. package/dist/index.cjs +22966 -6960
  125. package/dist/index.d.cts +864 -20
  126. package/dist/index.d.ts +864 -20
  127. package/dist/index.js +3062 -48
  128. package/dist/input/index.cjs +1 -1
  129. package/dist/input/index.js +1 -1
  130. package/dist/orbital/index.cjs +3 -3
  131. package/dist/orbital/index.d.cts +1 -1
  132. package/dist/orbital/index.d.ts +1 -1
  133. package/dist/orbital/index.js +1 -1
  134. package/dist/particles/index.cjs +16 -16
  135. package/dist/particles/index.d.cts +1 -1
  136. package/dist/particles/index.d.ts +1 -1
  137. package/dist/particles/index.js +1 -1
  138. package/dist/physics/index.cjs +2377 -21
  139. package/dist/physics/index.d.cts +1 -1
  140. package/dist/physics/index.d.ts +1 -1
  141. package/dist/physics/index.js +35 -1
  142. package/dist/postfx/index.cjs +3491 -0
  143. package/dist/postfx/index.js +93 -0
  144. package/dist/procedural/index.cjs +1 -1
  145. package/dist/procedural/index.js +1 -1
  146. package/dist/puppeteer-5VF6KDVO.js +52197 -0
  147. package/dist/puppeteer-IZVZ3SG4.js +52197 -0
  148. package/dist/rendering/index.cjs +33 -32
  149. package/dist/rendering/index.d.cts +1 -1
  150. package/dist/rendering/index.d.ts +1 -1
  151. package/dist/rendering/index.js +8 -6
  152. package/dist/runtime/index.cjs +23 -13
  153. package/dist/runtime/index.d.cts +1 -1
  154. package/dist/runtime/index.d.ts +1 -1
  155. package/dist/runtime/index.js +8 -6
  156. package/dist/runtime/protocols/index.cjs +349 -0
  157. package/dist/runtime/protocols/index.js +15 -0
  158. package/dist/scene/index.cjs +8 -8
  159. package/dist/scene/index.d.cts +1 -1
  160. package/dist/scene/index.d.ts +1 -1
  161. package/dist/scene/index.js +1 -1
  162. package/dist/shader/index.cjs +3087 -0
  163. package/dist/shader/index.js +3044 -0
  164. package/dist/simulation/index.cjs +10680 -0
  165. package/dist/simulation/index.d.cts +3 -0
  166. package/dist/simulation/index.d.ts +3 -0
  167. package/dist/simulation/index.js +307 -0
  168. package/dist/spatial/index.cjs +2443 -0
  169. package/dist/spatial/index.d.cts +1545 -0
  170. package/dist/spatial/index.d.ts +1545 -0
  171. package/dist/spatial/index.js +2400 -0
  172. package/dist/terrain/index.cjs +1 -1
  173. package/dist/terrain/index.d.cts +1 -1
  174. package/dist/terrain/index.d.ts +1 -1
  175. package/dist/terrain/index.js +1 -1
  176. package/dist/transformers.node-4NKAPD5U.js +45620 -0
  177. package/dist/vm/index.cjs +7 -8
  178. package/dist/vm/index.d.cts +1 -1
  179. package/dist/vm/index.d.ts +1 -1
  180. package/dist/vm/index.js +1 -1
  181. package/dist/vm-bridge/index.cjs +2 -2
  182. package/dist/vm-bridge/index.d.cts +2 -2
  183. package/dist/vm-bridge/index.d.ts +2 -2
  184. package/dist/vm-bridge/index.js +1 -1
  185. package/dist/vr/index.cjs +6 -6
  186. package/dist/vr/index.js +1 -1
  187. package/dist/world/index.cjs +3 -3
  188. package/dist/world/index.d.cts +1 -1
  189. package/dist/world/index.d.ts +1 -1
  190. package/dist/world/index.js +1 -1
  191. package/package.json +53 -21
  192. package/LICENSE +0 -21
@@ -0,0 +1,604 @@
1
+ /**
2
+ * CameraConstraints.ts
3
+ *
4
+ * Camera constraints: bounds clamping, dead zones,
5
+ * soft limits, follow smoothing, and look-ahead.
6
+ *
7
+ * @module camera
8
+ */
9
+ interface Bounds {
10
+ minX: number;
11
+ maxX: number;
12
+ minY: number;
13
+ maxY: number;
14
+ }
15
+ interface DeadZone {
16
+ width: number;
17
+ height: number;
18
+ }
19
+ interface SoftLimit {
20
+ distance: number;
21
+ stiffness: number;
22
+ }
23
+ declare class CameraConstraints {
24
+ private bounds;
25
+ private deadZone;
26
+ private softLimit;
27
+ private smoothing;
28
+ private lookAheadDistance;
29
+ private currentX;
30
+ private currentY;
31
+ setBounds(bounds: Bounds): void;
32
+ setDeadZone(dz: DeadZone): void;
33
+ setSoftLimit(sl: SoftLimit): void;
34
+ setSmoothing(factor: number): void;
35
+ setLookAhead(distance: number): void;
36
+ follow(targetX: number, targetY: number, velocityX?: number, velocityY?: number): {
37
+ x: number;
38
+ y: number;
39
+ };
40
+ private applySoftLimit;
41
+ getPosition(): {
42
+ x: number;
43
+ y: number;
44
+ };
45
+ setPosition(x: number, y: number): void;
46
+ }
47
+
48
+ /**
49
+ * CameraController.ts
50
+ *
51
+ * Camera modes: follow, orbit, free-look, top-down.
52
+ * Includes smoothing, dead zones, zoom, and bounds clamping.
53
+ *
54
+ * @module camera
55
+ */
56
+ type CameraMode = 'follow' | 'orbit' | 'free' | 'topDown' | 'fixed';
57
+ interface CameraState {
58
+ position: [number, number, number];
59
+ rotation: {
60
+ pitch: number;
61
+ yaw: number;
62
+ roll: number;
63
+ };
64
+ zoom: number;
65
+ fov: number;
66
+ }
67
+ interface CameraConfig {
68
+ mode: CameraMode;
69
+ smoothing: number;
70
+ followOffset: {
71
+ x: number;
72
+ y: number;
73
+ z: number;
74
+ };
75
+ orbitDistance: number;
76
+ orbitMinDistance: number;
77
+ orbitMaxDistance: number;
78
+ orbitSpeed: number;
79
+ zoomSpeed: number;
80
+ minZoom: number;
81
+ maxZoom: number;
82
+ deadZone: {
83
+ x: number;
84
+ y: number;
85
+ };
86
+ bounds: {
87
+ min: {
88
+ x: number;
89
+ y: number;
90
+ z: number;
91
+ };
92
+ max: {
93
+ x: number;
94
+ y: number;
95
+ z: number;
96
+ };
97
+ } | null;
98
+ fov: number;
99
+ freeSpeed: number;
100
+ }
101
+ /**
102
+ * Camera controller for managing various camera behaviors in 3D space.
103
+ *
104
+ * Supports multiple camera modes:
105
+ * - **follow**: Camera smoothly follows a target with configurable offset and dead zone
106
+ * - **orbit**: Camera orbits around a target point at configurable distance and speed
107
+ * - **free**: Camera movement controlled externally via moveCamera() calls
108
+ * - **topDown**: Camera maintains a top-down view of the target with smooth tracking
109
+ * - **fixed**: Camera remains stationary at its current position
110
+ *
111
+ * The controller handles smooth interpolation, zoom controls, boundary clamping,
112
+ * and provides a unified interface for camera state management across different modes.
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const camera = new CameraController({
117
+ * mode: 'orbit',
118
+ * orbitDistance: 15,
119
+ * smoothing: 0.1
120
+ * });
121
+ *
122
+ * camera.setTarget(5, 0, 5);
123
+ * camera.rotateOrbit(0.1, 0);
124
+ * camera.update(deltaTime);
125
+ *
126
+ * const state = camera.getState();
127
+ * console.log(state.position); // Current camera position
128
+ * ```
129
+ */
130
+ declare class CameraController {
131
+ private config;
132
+ private state;
133
+ private target;
134
+ private orbitAngle;
135
+ private orbitPitch;
136
+ /**
137
+ * Creates a new camera controller with optional configuration.
138
+ *
139
+ * @param config - Optional camera configuration overrides. Merged with defaults.
140
+ * @example
141
+ * ```typescript
142
+ * const camera = new CameraController({
143
+ * mode: 'follow',
144
+ * smoothing: 0.2,
145
+ * followOffset: { x: 0, y: 3, z: -8 }
146
+ * });
147
+ * ```
148
+ */
149
+ constructor(config?: Partial<CameraConfig>);
150
+ /**
151
+ * Updates camera position and rotation based on current mode and delta time.
152
+ *
153
+ * Call this every frame to animate camera movement. Different modes handle
154
+ * updates differently:
155
+ * - **follow**: Smoothly interpolates toward target + offset
156
+ * - **orbit**: Updates position based on orbit angle and pitch
157
+ * - **topDown**: Maintains overhead view with smooth target tracking
158
+ * - **free/fixed**: No automatic movement (controlled externally)
159
+ *
160
+ * @param dt - Delta time in seconds since last update
161
+ * @example
162
+ * ```typescript
163
+ * // In game loop
164
+ * const deltaTime = (now - lastTime) / 1000;
165
+ * camera.update(deltaTime);
166
+ * ```
167
+ */
168
+ update(dt: number): void;
169
+ private updateFollow;
170
+ private updateOrbit;
171
+ private updateTopDown;
172
+ private clampToBounds;
173
+ /**
174
+ * Sets the target point that the camera should focus on or track.
175
+ *
176
+ * Used by 'follow', 'orbit', and 'topDown' modes. In 'follow' mode, camera
177
+ * maintains offset from this target. In 'orbit' mode, camera rotates around
178
+ * this point. In 'topDown' mode, camera looks down at this location.
179
+ *
180
+ * @param x - Target X coordinate in world space
181
+ * @param y - Target Y coordinate in world space
182
+ * @param z - Target Z coordinate in world space
183
+ * @example
184
+ * ```typescript
185
+ * // Track a moving player
186
+ * camera.setTarget(player.x, player.y, player.z);
187
+ * ```
188
+ */
189
+ setTarget(x: number, y: number, z: number): void;
190
+ /**
191
+ * Gets the current target position.
192
+ *
193
+ * @returns Copy of the current target coordinates
194
+ */
195
+ getTarget(): {
196
+ x: number;
197
+ y: number;
198
+ z: number;
199
+ };
200
+ /**
201
+ * Rotates the camera in orbit mode by the specified angles.
202
+ *
203
+ * Only affects camera behavior when mode is set to 'orbit'. Angles are
204
+ * clamped to prevent the camera from flipping or going too extreme.
205
+ *
206
+ * @param deltaAngle - Horizontal rotation change (yaw) in radians
207
+ * @param deltaPitch - Vertical rotation change (pitch) in radians, clamped to [-1.4, 1.4]
208
+ * @example
209
+ * ```typescript
210
+ * // Rotate based on mouse movement
211
+ * camera.rotateOrbit(mouseX * 0.01, mouseY * 0.01);
212
+ * ```
213
+ */
214
+ rotateOrbit(deltaAngle: number, deltaPitch: number): void;
215
+ /**
216
+ * Adjusts camera zoom by the specified delta amount.
217
+ *
218
+ * Zoom affects distance in 'orbit' mode, height in 'topDown' mode, and FOV scaling.
219
+ * Value is clamped between configured minZoom and maxZoom limits.
220
+ *
221
+ * @param delta - Amount to change zoom by (positive = zoom in, negative = zoom out)
222
+ * @example
223
+ * ```typescript
224
+ * // Zoom in on mouse wheel
225
+ * camera.zoom(-wheelDelta * 0.1);
226
+ * ```
227
+ */
228
+ zoom(delta: number): void;
229
+ /**
230
+ * Directly moves camera position by specified amounts.
231
+ *
232
+ * Primarily used in 'free' camera mode for manual camera control.
233
+ * Movement is scaled by the configured freeSpeed multiplier.
234
+ *
235
+ * @param dx - Change in X position (world units)
236
+ * @param dy - Change in Y position (world units)
237
+ * @param dz - Change in Z position (world units)
238
+ * @example
239
+ * ```typescript
240
+ * // WASD movement in free camera mode
241
+ * if (wPressed) camera.moveCamera(0, 0, 1);
242
+ * if (sPressed) camera.moveCamera(0, 0, -1);
243
+ * ```
244
+ */
245
+ moveCamera(dx: number, dy: number, dz: number): void;
246
+ /**
247
+ * Changes the camera's behavior mode.
248
+ *
249
+ * @param mode - New camera mode ('follow' | 'orbit' | 'free' | 'topDown' | 'fixed')
250
+ * @example
251
+ * ```typescript
252
+ * camera.setMode('orbit'); // Switch to orbital camera
253
+ * ```
254
+ */
255
+ setMode(mode: CameraMode): void;
256
+ /**
257
+ * Gets the current camera mode.
258
+ *
259
+ * @returns Current camera mode
260
+ */
261
+ getMode(): CameraMode;
262
+ /**
263
+ * Gets a copy of the current camera state.
264
+ *
265
+ * Returns position, rotation, zoom, and FOV values. All objects are cloned
266
+ * to prevent external modification of internal state.
267
+ *
268
+ * @returns Current camera state with position, rotation, zoom, and FOV
269
+ * @example
270
+ * ```typescript
271
+ * const state = camera.getState();
272
+ * renderer.setCamera(state.position, state.rotation);
273
+ * renderer.setFOV(state.fov);
274
+ * ```
275
+ */
276
+ getState(): CameraState;
277
+ /**
278
+ * Directly sets the camera zoom level.
279
+ *
280
+ * Unlike zoom(), this sets an absolute value rather than a delta.
281
+ * Value is clamped to configured min/max zoom limits.
282
+ *
283
+ * @param z - New zoom level (clamped to minZoom/maxZoom)
284
+ * @example
285
+ * ```typescript
286
+ * camera.setZoom(1.0); // Reset to default zoom
287
+ * ```
288
+ */
289
+ setZoom(z: number): void;
290
+ /**
291
+ * Sets the camera's field of view.
292
+ *
293
+ * @param fov - New field of view in degrees
294
+ * @example
295
+ * ```typescript
296
+ * camera.setFOV(90); // Wide angle
297
+ * camera.setFOV(30); // Telephoto
298
+ * ```
299
+ */
300
+ setFOV(fov: number): void;
301
+ /**
302
+ * Adjusts camera smoothing factor for interpolated movement modes.
303
+ *
304
+ * Affects 'follow' and 'topDown' modes. Higher values = more responsive,
305
+ * lower values = smoother but more delayed movement.
306
+ *
307
+ * @param s - Smoothing factor between 0.0 (no movement) and 1.0 (instant)
308
+ * @example
309
+ * ```typescript
310
+ * camera.setSmoothing(0.1); // Very smooth
311
+ * camera.setSmoothing(0.8); // Very responsive
312
+ * ```
313
+ */
314
+ setSmoothing(s: number): void;
315
+ private lerp;
316
+ }
317
+
318
+ /**
319
+ * CameraEffects.ts
320
+ *
321
+ * Post-camera effects: screen shake, zoom pulses, flash,
322
+ * letterbox, split-screen, and vignette overlays.
323
+ *
324
+ * @module camera
325
+ */
326
+ type EffectType = 'shake' | 'zoom' | 'flash' | 'letterbox' | 'vignette' | 'fade';
327
+ interface ActiveEffect {
328
+ id: string;
329
+ type: EffectType;
330
+ duration: number;
331
+ elapsed: number;
332
+ intensity: number;
333
+ params: Record<string, unknown>;
334
+ active: boolean;
335
+ }
336
+ interface ShakeParams {
337
+ frequency: number;
338
+ decay: number;
339
+ }
340
+ interface ZoomParams {
341
+ targetZoom: number;
342
+ easeBack: boolean;
343
+ }
344
+ interface FlashParams {
345
+ color: {
346
+ r: number;
347
+ g: number;
348
+ b: number;
349
+ };
350
+ }
351
+ interface LetterboxParams {
352
+ ratio: number;
353
+ }
354
+ interface FadeParams {
355
+ fadeIn: boolean;
356
+ color: {
357
+ r: number;
358
+ g: number;
359
+ b: number;
360
+ };
361
+ }
362
+ declare class CameraEffects {
363
+ private effects;
364
+ private shakeOffset;
365
+ private zoomMultiplier;
366
+ private flashAlpha;
367
+ private flashColor;
368
+ private letterboxAmount;
369
+ private vignetteIntensity;
370
+ private fadeAlpha;
371
+ shake(duration: number, intensity?: number, frequency?: number, decay?: number): string;
372
+ zoomPulse(duration: number, targetZoom?: number, easeBack?: boolean): string;
373
+ flash(duration?: number, color?: {
374
+ r: number;
375
+ g: number;
376
+ b: number;
377
+ }, intensity?: number): string;
378
+ letterbox(duration: number, ratio?: number): string;
379
+ vignette(duration: number, intensity?: number): string;
380
+ fade(duration: number, fadeIn?: boolean, color?: {
381
+ r: number;
382
+ g: number;
383
+ b: number;
384
+ }): string;
385
+ private addEffect;
386
+ update(dt: number): void;
387
+ getShakeOffset(): {
388
+ x: number;
389
+ y: number;
390
+ };
391
+ getZoomMultiplier(): number;
392
+ getFlashAlpha(): number;
393
+ getFlashColor(): {
394
+ r: number;
395
+ g: number;
396
+ b: number;
397
+ };
398
+ getLetterboxAmount(): number;
399
+ getVignetteIntensity(): number;
400
+ getFadeAlpha(): number;
401
+ getActiveEffectCount(): number;
402
+ cancelEffect(id: string): boolean;
403
+ cancelAll(): void;
404
+ }
405
+
406
+ /**
407
+ * CameraPath.ts
408
+ *
409
+ * Spline-based camera paths: Catmull-Rom interpolation,
410
+ * speed control, look-at targets, and looping.
411
+ *
412
+ * @module camera
413
+ */
414
+ interface PathPoint {
415
+ x: number;
416
+ y: number;
417
+ z: number;
418
+ lookAtX?: number;
419
+ lookAtY?: number;
420
+ lookAtZ?: number;
421
+ speedMultiplier?: number;
422
+ }
423
+ declare class CameraPath {
424
+ private points;
425
+ private progress;
426
+ private speed;
427
+ private loop;
428
+ private playing;
429
+ setPoints(points: PathPoint[]): void;
430
+ addPoint(point: PathPoint): void;
431
+ clearPoints(): void;
432
+ setSpeed(speed: number): void;
433
+ setLoop(loop: boolean): void;
434
+ play(): void;
435
+ pause(): void;
436
+ resume(): void;
437
+ stop(): void;
438
+ update(dt: number): {
439
+ position: [number, number, number];
440
+ lookAt: {
441
+ x: number;
442
+ y: number;
443
+ z: number;
444
+ } | null;
445
+ } | null;
446
+ evaluate(t: number): {
447
+ position: [number, number, number];
448
+ lookAt: {
449
+ x: number;
450
+ y: number;
451
+ z: number;
452
+ } | null;
453
+ };
454
+ private catmullRom;
455
+ getProgress(): number;
456
+ isPlaying(): boolean;
457
+ getPointCount(): number;
458
+ }
459
+
460
+ /**
461
+ * CameraShake.ts
462
+ *
463
+ * Trauma-based camera shake: Perlin noise sampling,
464
+ * configurable decay, multi-layer shake, and intensity control.
465
+ *
466
+ * @module camera
467
+ */
468
+ interface ShakeLayer {
469
+ id: string;
470
+ trauma: number;
471
+ decay: number;
472
+ frequency: number;
473
+ amplitude: number;
474
+ rotationAmount: number;
475
+ }
476
+ interface ShakeOutput {
477
+ offsetX: number;
478
+ offsetY: number;
479
+ rotation: number;
480
+ }
481
+ declare class CameraShake {
482
+ private layers;
483
+ private time;
484
+ addLayer(id: string, config?: Partial<ShakeLayer>): void;
485
+ removeLayer(id: string): void;
486
+ addTrauma(layerId: string, amount: number): void;
487
+ setTrauma(layerId: string, amount: number): void;
488
+ update(dt: number): ShakeOutput;
489
+ private noise;
490
+ getTrauma(layerId: string): number;
491
+ isShaking(): boolean;
492
+ }
493
+
494
+ /**
495
+ * CinematicTrack.ts
496
+ *
497
+ * Keyframe-based cinematic sequencer: position/rotation/fov
498
+ * keyframes, easing curves, playback control, and event cues.
499
+ *
500
+ * @module camera
501
+ */
502
+ type EasingType = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'smoothStep';
503
+ interface CinematicKeyframe {
504
+ time: number;
505
+ position?: {
506
+ x: number;
507
+ y: number;
508
+ z: number;
509
+ };
510
+ rotation?: {
511
+ pitch: number;
512
+ yaw: number;
513
+ roll: number;
514
+ };
515
+ fov?: number;
516
+ zoom?: number;
517
+ easing: EasingType;
518
+ }
519
+ interface CinematicCue {
520
+ time: number;
521
+ event: string;
522
+ data: Record<string, unknown>;
523
+ fired: boolean;
524
+ }
525
+ interface CinematicState {
526
+ position: [number, number, number];
527
+ rotation: {
528
+ pitch: number;
529
+ yaw: number;
530
+ roll: number;
531
+ };
532
+ fov: number;
533
+ zoom: number;
534
+ }
535
+ declare class CinematicTrack {
536
+ private keyframes;
537
+ private cues;
538
+ private currentTime;
539
+ private duration;
540
+ private playing;
541
+ private looping;
542
+ private speed;
543
+ private cueListeners;
544
+ addKeyframe(keyframe: CinematicKeyframe): void;
545
+ addCue(time: number, event: string, data?: Record<string, unknown>): void;
546
+ removeKeyframesAt(time: number): number;
547
+ play(): void;
548
+ pause(): void;
549
+ stop(): void;
550
+ seek(time: number): void;
551
+ setSpeed(speed: number): void;
552
+ setLooping(loop: boolean): void;
553
+ isPlaying(): boolean;
554
+ getCurrentTime(): number;
555
+ getDuration(): number;
556
+ getProgress(): number;
557
+ update(dt: number): CinematicState | null;
558
+ evaluate(time: number): CinematicState;
559
+ private applyEasing;
560
+ onCue(listener: (event: string, data: Record<string, unknown>) => void): void;
561
+ private resetCues;
562
+ private recalcDuration;
563
+ getKeyframeCount(): number;
564
+ getCueCount(): number;
565
+ clear(): void;
566
+ }
567
+
568
+ type index_ActiveEffect = ActiveEffect;
569
+ type index_Bounds = Bounds;
570
+ type index_CameraConfig = CameraConfig;
571
+ type index_CameraConstraints = CameraConstraints;
572
+ declare const index_CameraConstraints: typeof CameraConstraints;
573
+ type index_CameraController = CameraController;
574
+ declare const index_CameraController: typeof CameraController;
575
+ type index_CameraEffects = CameraEffects;
576
+ declare const index_CameraEffects: typeof CameraEffects;
577
+ type index_CameraMode = CameraMode;
578
+ type index_CameraPath = CameraPath;
579
+ declare const index_CameraPath: typeof CameraPath;
580
+ type index_CameraShake = CameraShake;
581
+ declare const index_CameraShake: typeof CameraShake;
582
+ type index_CameraState = CameraState;
583
+ type index_CinematicCue = CinematicCue;
584
+ type index_CinematicKeyframe = CinematicKeyframe;
585
+ type index_CinematicState = CinematicState;
586
+ type index_CinematicTrack = CinematicTrack;
587
+ declare const index_CinematicTrack: typeof CinematicTrack;
588
+ type index_DeadZone = DeadZone;
589
+ type index_EasingType = EasingType;
590
+ type index_EffectType = EffectType;
591
+ type index_FadeParams = FadeParams;
592
+ type index_FlashParams = FlashParams;
593
+ type index_LetterboxParams = LetterboxParams;
594
+ type index_PathPoint = PathPoint;
595
+ type index_ShakeLayer = ShakeLayer;
596
+ type index_ShakeOutput = ShakeOutput;
597
+ type index_ShakeParams = ShakeParams;
598
+ type index_SoftLimit = SoftLimit;
599
+ type index_ZoomParams = ZoomParams;
600
+ declare namespace index {
601
+ export { type index_ActiveEffect as ActiveEffect, type index_Bounds as Bounds, type index_CameraConfig as CameraConfig, index_CameraConstraints as CameraConstraints, index_CameraController as CameraController, index_CameraEffects as CameraEffects, type index_CameraMode as CameraMode, index_CameraPath as CameraPath, index_CameraShake as CameraShake, type index_CameraState as CameraState, type index_CinematicCue as CinematicCue, type index_CinematicKeyframe as CinematicKeyframe, type index_CinematicState as CinematicState, index_CinematicTrack as CinematicTrack, type index_DeadZone as DeadZone, type index_EasingType as EasingType, type index_EffectType as EffectType, type index_FadeParams as FadeParams, type index_FlashParams as FlashParams, type index_LetterboxParams as LetterboxParams, type index_PathPoint as PathPoint, type index_ShakeLayer as ShakeLayer, type index_ShakeOutput as ShakeOutput, type index_ShakeParams as ShakeParams, type index_SoftLimit as SoftLimit, type index_ZoomParams as ZoomParams };
602
+ }
603
+
604
+ export { type ActiveEffect as A, type Bounds as B, type CameraConfig as C, type DeadZone as D, type EasingType as E, type FadeParams as F, type LetterboxParams as L, type PathPoint as P, type ShakeLayer as S, type ZoomParams as Z, CameraConstraints as a, CameraController as b, CameraEffects as c, type CameraMode as d, CameraPath as e, CameraShake as f, type CameraState as g, type CinematicCue as h, index as i, type CinematicKeyframe as j, type CinematicState as k, CinematicTrack as l, type EffectType as m, type FlashParams as n, type ShakeOutput as o, type ShakeParams as p, type SoftLimit as q };