@rpgjs/client 5.0.0-alpha.2 → 5.0.0-alpha.21

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 (172) hide show
  1. package/dist/Game/AnimationManager.d.ts +8 -0
  2. package/dist/Game/Map.d.ts +7 -1
  3. package/dist/Gui/Gui.d.ts +170 -5
  4. package/dist/Resource.d.ts +97 -0
  5. package/dist/RpgClient.d.ts +259 -59
  6. package/dist/RpgClientEngine.d.ts +379 -6
  7. package/dist/Sound.d.ts +199 -0
  8. package/dist/components/animations/index.d.ts +4 -0
  9. package/dist/components/dynamics/parse-value.d.ts +1 -0
  10. package/dist/components/gui/index.d.ts +3 -3
  11. package/dist/components/index.d.ts +3 -1
  12. package/dist/components/prebuilt/index.d.ts +18 -0
  13. package/dist/index.d.ts +6 -1
  14. package/dist/index.js +11 -4
  15. package/dist/index.js.map +1 -1
  16. package/dist/index10.js +149 -4
  17. package/dist/index10.js.map +1 -1
  18. package/dist/index11.js +22 -7
  19. package/dist/index11.js.map +1 -1
  20. package/dist/index12.js +6 -4
  21. package/dist/index12.js.map +1 -1
  22. package/dist/index13.js +11 -14
  23. package/dist/index13.js.map +1 -1
  24. package/dist/index14.js +8 -40
  25. package/dist/index14.js.map +1 -1
  26. package/dist/index15.js +217 -180
  27. package/dist/index15.js.map +1 -1
  28. package/dist/index16.js +104 -7
  29. package/dist/index16.js.map +1 -1
  30. package/dist/index17.js +82 -372
  31. package/dist/index17.js.map +1 -1
  32. package/dist/index18.js +110 -27
  33. package/dist/index18.js.map +1 -1
  34. package/dist/index19.js +360 -18
  35. package/dist/index19.js.map +1 -1
  36. package/dist/index2.js +726 -32
  37. package/dist/index2.js.map +1 -1
  38. package/dist/index20.js +5 -2416
  39. package/dist/index20.js.map +1 -1
  40. package/dist/index21.js +47 -109
  41. package/dist/index21.js.map +1 -1
  42. package/dist/index22.js +7 -107
  43. package/dist/index22.js.map +1 -1
  44. package/dist/index23.js +394 -65
  45. package/dist/index23.js.map +1 -1
  46. package/dist/index24.js +40 -15
  47. package/dist/index24.js.map +1 -1
  48. package/dist/index25.js +20 -36
  49. package/dist/index25.js.map +1 -1
  50. package/dist/index26.js +2629 -1
  51. package/dist/index26.js.map +1 -1
  52. package/dist/index27.js +102 -310
  53. package/dist/index27.js.map +1 -1
  54. package/dist/index28.js +63 -17
  55. package/dist/index28.js.map +1 -1
  56. package/dist/index29.js +18 -8
  57. package/dist/index29.js.map +1 -1
  58. package/dist/index3.js +70 -8
  59. package/dist/index3.js.map +1 -1
  60. package/dist/index30.js +24 -8
  61. package/dist/index30.js.map +1 -1
  62. package/dist/index31.js +88 -167
  63. package/dist/index31.js.map +1 -1
  64. package/dist/index32.js +34 -494
  65. package/dist/index32.js.map +1 -1
  66. package/dist/index33.js +22 -10
  67. package/dist/index33.js.map +1 -1
  68. package/dist/index34.js +3 -4401
  69. package/dist/index34.js.map +1 -1
  70. package/dist/index35.js +20 -1
  71. package/dist/index35.js.map +1 -1
  72. package/dist/index36.js +18 -82
  73. package/dist/index36.js.map +1 -1
  74. package/dist/index37.js +8 -58
  75. package/dist/index37.js.map +1 -1
  76. package/dist/index38.js +4 -13
  77. package/dist/index38.js.map +1 -1
  78. package/dist/index39.js +10 -18
  79. package/dist/index39.js.map +1 -1
  80. package/dist/index4.js +25 -5
  81. package/dist/index4.js.map +1 -1
  82. package/dist/index40.js +7 -0
  83. package/dist/index40.js.map +1 -0
  84. package/dist/index41.js +3690 -0
  85. package/dist/index41.js.map +1 -0
  86. package/dist/index42.js +187 -0
  87. package/dist/index42.js.map +1 -0
  88. package/dist/index43.js +504 -0
  89. package/dist/index43.js.map +1 -0
  90. package/dist/index44.js +77 -0
  91. package/dist/index44.js.map +1 -0
  92. package/dist/index45.js +6 -0
  93. package/dist/index45.js.map +1 -0
  94. package/dist/index46.js +20 -0
  95. package/dist/index46.js.map +1 -0
  96. package/dist/index47.js +146 -0
  97. package/dist/index47.js.map +1 -0
  98. package/dist/index48.js +12 -0
  99. package/dist/index48.js.map +1 -0
  100. package/dist/index49.js +113 -0
  101. package/dist/index49.js.map +1 -0
  102. package/dist/index5.js +2 -1
  103. package/dist/index5.js.map +1 -1
  104. package/dist/index50.js +136 -0
  105. package/dist/index50.js.map +1 -0
  106. package/dist/index51.js +137 -0
  107. package/dist/index51.js.map +1 -0
  108. package/dist/index52.js +112 -0
  109. package/dist/index52.js.map +1 -0
  110. package/dist/index53.js +141 -0
  111. package/dist/index53.js.map +1 -0
  112. package/dist/index54.js +9 -0
  113. package/dist/index54.js.map +1 -0
  114. package/dist/index55.js +54 -0
  115. package/dist/index55.js.map +1 -0
  116. package/dist/index6.js +1 -1
  117. package/dist/index6.js.map +1 -1
  118. package/dist/index7.js +11 -3
  119. package/dist/index7.js.map +1 -1
  120. package/dist/index8.js +68 -7
  121. package/dist/index8.js.map +1 -1
  122. package/dist/index9.js +278 -15
  123. package/dist/index9.js.map +1 -1
  124. package/dist/presets/animation.d.ts +31 -0
  125. package/dist/presets/faceset.d.ts +30 -0
  126. package/dist/presets/index.d.ts +103 -0
  127. package/dist/presets/lpc.d.ts +89 -0
  128. package/dist/services/keyboardControls.d.ts +5 -0
  129. package/dist/services/loadMap.d.ts +123 -2
  130. package/dist/services/mmorpg.d.ts +12 -4
  131. package/dist/services/standalone.d.ts +54 -2
  132. package/package.json +22 -18
  133. package/src/Game/{EffectManager.ts → AnimationManager.ts} +3 -2
  134. package/src/Game/Map.ts +20 -2
  135. package/src/Game/Object.ts +163 -9
  136. package/src/Gui/Gui.ts +362 -17
  137. package/src/Resource.ts +150 -0
  138. package/src/RpgClient.ts +264 -58
  139. package/src/RpgClientEngine.ts +848 -36
  140. package/src/Sound.ts +253 -0
  141. package/src/components/{effects → animations}/animation.ce +3 -6
  142. package/src/components/{effects → animations}/index.ts +1 -1
  143. package/src/components/character.ce +193 -36
  144. package/src/components/dynamics/parse-value.ts +80 -0
  145. package/src/components/dynamics/text.ce +183 -0
  146. package/src/components/gui/box.ce +17 -0
  147. package/src/components/gui/dialogbox/index.ce +73 -35
  148. package/src/components/gui/dialogbox/selection.ce +16 -1
  149. package/src/components/gui/index.ts +3 -4
  150. package/src/components/index.ts +5 -1
  151. package/src/components/prebuilt/hp-bar.ce +255 -0
  152. package/src/components/prebuilt/index.ts +22 -0
  153. package/src/components/scenes/canvas.ce +12 -10
  154. package/src/components/scenes/draw-map.ce +6 -23
  155. package/src/components/scenes/event-layer.ce +9 -3
  156. package/src/core/setup.ts +2 -0
  157. package/src/index.ts +7 -2
  158. package/src/module.ts +72 -6
  159. package/src/presets/animation.ts +46 -0
  160. package/src/presets/faceset.ts +60 -0
  161. package/src/presets/index.ts +7 -1
  162. package/src/presets/lpc.ts +108 -0
  163. package/src/services/keyboardControls.ts +8 -0
  164. package/src/services/loadMap.ts +132 -3
  165. package/src/services/mmorpg.ts +29 -5
  166. package/src/services/standalone.ts +70 -6
  167. package/tsconfig.json +1 -1
  168. package/vite.config.ts +1 -1
  169. package/dist/Game/EffectManager.d.ts +0 -5
  170. package/dist/components/effects/index.d.ts +0 -4
  171. package/src/components/scenes/element-map.ce +0 -23
  172. /package/src/components/{effects → animations}/hit.ce +0 -0
@@ -1,8 +1,9 @@
1
+ import { ComponentFunction, Signal } from 'canvasengine';
1
2
  import { RpgClientEngine } from './RpgClientEngine';
2
- import { Loader } from 'pixi.js';
3
- type RpgClass<T = any> = new (...args: any[]) => T;
4
- type RpgComponent = any;
5
- type SceneMap = any;
3
+ import { Loader, Container } from 'pixi.js';
4
+ import { RpgClientObject } from './Game/Object';
5
+ type RpgComponent = RpgClientObject;
6
+ type SceneMap = Container;
6
7
  export interface RpgClientEngineHooks {
7
8
  /**
8
9
  * When the engine is started. If you send false, you prevent the client from connecting to the server
@@ -10,7 +11,7 @@ export interface RpgClientEngineHooks {
10
11
  * @prop { (engine: RpgClientEngine) => boolean | any } [onStart]
11
12
  * @memberof RpgEngineHooks
12
13
  */
13
- onStart?: (engine: RpgClientEngine) => boolean | void;
14
+ onStart?: (engine: RpgClientEngine) => boolean | void | Promise<boolean | void>;
14
15
  /**
15
16
  * Each frame
16
17
  *
@@ -59,6 +60,34 @@ export interface RpgClientEngineHooks {
59
60
  onWindowResize?: () => any;
60
61
  }
61
62
  export interface RpgSpriteHooks {
63
+ /**
64
+ * Array of components to render behind the sprite
65
+ * These components will be displayed with a lower z-index than the sprite itself
66
+ *
67
+ * @prop { ComponentFunction[] } [componentsBehind]
68
+ * @memberof RpgSpriteHooks
69
+ * @example
70
+ * ```ts
71
+ * const sprite: RpgSpriteHooks = {
72
+ * componentsBehind: [ShadowComponent, AuraComponent]
73
+ * }
74
+ * ```
75
+ */
76
+ componentsBehind?: ComponentFunction[];
77
+ /**
78
+ * Array of components to render in front of the sprite
79
+ * These components will be displayed with a higher z-index than the sprite itself
80
+ *
81
+ * @prop { ComponentFunction[] } [componentsInFront]
82
+ * @memberof RpgSpriteHooks
83
+ * @example
84
+ * ```ts
85
+ * const sprite: RpgSpriteHooks = {
86
+ * componentsInFront: [HealthBarComponent, StatusEffectComponent]
87
+ * }
88
+ * ```
89
+ */
90
+ componentsInFront?: ComponentFunction[];
62
91
  /**
63
92
  * As soon as the sprite is initialized
64
93
  *
@@ -163,14 +192,13 @@ export interface RpgClient {
163
192
  * @example
164
193
  *
165
194
  * ```ts
166
- * import { RpgClient, RpgModule } from '@rpgjs/client'
195
+ * import { RpgClient, defineModule } from '@rpgjs/client'
167
196
  *
168
- * @RpgModule<RpgClient>({
197
+ * defineModule<RpgClient>({
169
198
  * hooks: {
170
199
  * player: ['onAuth']
171
200
  * }
172
201
  * })
173
- * class RpgClientEngine { }
174
202
  * ```
175
203
  *
176
204
  * Emit the hook:
@@ -207,7 +235,7 @@ export interface RpgClient {
207
235
  * Object containing the hooks concerning the engine
208
236
  *
209
237
  * ```ts
210
- * import { RpgClientEngine, RpgClientEngineHooks, RpgModule, RpgClient } from '@rpgjs/client'
238
+ * import { RpgClientEngine, RpgClientEngineHooks, defineModule, RpgClient } from '@rpgjs/client'
211
239
  *
212
240
  * const engine: RpgClientEngineHooks = {
213
241
  * onConnected(engine: RpgClientEngine) {
@@ -215,10 +243,9 @@ export interface RpgClient {
215
243
  * }
216
244
  * }
217
245
  *
218
- * @RpgModule<RpgClient>({
246
+ * defineModule<RpgClient>({
219
247
  * engine
220
248
  * })
221
- * class RpgClientModule {}
222
249
  * ```
223
250
  *
224
251
  * @prop {RpgClientEngineHooks} [engine]
@@ -227,99 +254,246 @@ export interface RpgClient {
227
254
  engine?: RpgClientEngineHooks;
228
255
  /**
229
256
  * Array containing the list of spritesheets
230
- * An element contains a class with the `@Spritesheet` decorator
257
+ * Each element is a simple object containing spritesheet definitions
231
258
  *
232
259
  * ```ts
233
- * import { Spritesheet, Animation, Direction, RpgClient, RpgModule } from '@rpgjs/client'
234
- *
235
- * @Spritesheet({
236
- * id: 'chest',
237
- * image: require('./assets/chest.png'),
238
- * // other options
239
- * })
240
- * class Chest { }
260
+ * import { defineModule, RpgClient } from '@rpgjs/client'
241
261
  *
242
- * @RpgModule<RpgClient>({
262
+ * defineModule<RpgClient>({
243
263
  * spritesheets: [
244
- * Chest
264
+ * {
265
+ * id: 'chest',
266
+ * image: require('./assets/chest.png'),
267
+ * framesWidth: 32,
268
+ * framesHeight: 32,
269
+ * animations: {
270
+ * default: {
271
+ * frames: [0, 1, 2],
272
+ * duration: 1000
273
+ * }
274
+ * }
275
+ * }
245
276
  * ]
246
277
  * })
247
- * class RpgClientEngine {}
248
278
  * ```
249
279
  *
250
280
  * [Guide: Create Sprite](/guide/create-sprite.html)
251
281
  *
252
- * @prop {Array<Class>} [spritesheets]
282
+ * @prop {Array<Object>} [spritesheets]
253
283
  * @memberof RpgClient
254
284
  * */
255
285
  spritesheets?: any[];
256
286
  /**
257
- * Array containing the list of VueJS components
287
+ * Resolver function for dynamically creating spritesheets
288
+ *
289
+ * This function is called when a spritesheet is requested but not found in the cache.
290
+ * It can be synchronous (returns directly) or asynchronous (returns a Promise).
291
+ * The resolved spritesheet is automatically cached for future use.
258
292
  *
259
293
  * ```ts
260
- * import { RpgClient, RpgModule } from '@rpgjs/client'
261
- *
262
- * const component = {
263
- * name: 'my-gui',
264
- * template: `
265
- * <div>
266
- * Component
267
- * </div>
268
- * `
269
- * }
294
+ * import { defineModule, RpgClient } from '@rpgjs/client'
295
+ *
296
+ * defineModule<RpgClient>({
297
+ * spritesheetResolver: (id: string) => {
298
+ * // Synchronous resolver
299
+ * if (id === 'dynamic-sprite') {
300
+ * return {
301
+ * id: 'dynamic-sprite',
302
+ * image: 'path/to/image.png',
303
+ * framesWidth: 32,
304
+ * framesHeight: 32
305
+ * };
306
+ * }
307
+ * return undefined;
308
+ * }
309
+ * })
270
310
  *
271
- * @RpgModule<RpgClient>({
311
+ * // Or asynchronous resolver
312
+ * defineModule<RpgClient>({
313
+ * spritesheetResolver: async (id: string) => {
314
+ * const response = await fetch(`/api/spritesheets/${id}`);
315
+ * const data = await response.json();
316
+ * return data;
317
+ * }
318
+ * })
319
+ * ```
320
+ *
321
+ * @prop {(id: string) => any | Promise<any>} [spritesheetResolver]
322
+ * @memberof RpgClient
323
+ * */
324
+ spritesheetResolver?: (id: string) => any | Promise<any>;
325
+ /**
326
+ * Resolver function for dynamically loading sounds
327
+ *
328
+ * The resolver is called when a sound is requested but not found in the cache.
329
+ * It can be synchronous (returns directly) or asynchronous (returns a Promise).
330
+ * The resolved sound is automatically cached for future use.
331
+ *
332
+ * ```ts
333
+ * import { defineModule, RpgClient } from '@rpgjs/client'
334
+ *
335
+ * defineModule<RpgClient>({
336
+ * soundResolver: (id: string) => {
337
+ * if (id === 'dynamic-sound') {
338
+ * return { id: 'dynamic-sound', src: 'path/to/sound.mp3' };
339
+ * }
340
+ * return undefined;
341
+ * }
342
+ * })
343
+ * ```
344
+ *
345
+ * @prop {(id: string) => any | Promise<any>} [soundResolver]
346
+ * @memberof RpgClient
347
+ * */
348
+ soundResolver?: (id: string) => any | Promise<any>;
349
+ /**
350
+ * Array containing the list of GUI components
351
+ *
352
+ * ```ts
353
+ * import { defineModule, RpgClient } from '@rpgjs/client'
354
+ * import InventoryComponent from './inventory.ce'
355
+ *
356
+ * defineModule<RpgClient>({
272
357
  * gui: [
273
- * component
358
+ * {
359
+ * id: 'inventory',
360
+ * component: InventoryComponent,
361
+ * autoDisplay: true,
362
+ * dependencies: () => [playerSignal, inventorySignal]
363
+ * }
274
364
  * ]
275
365
  * })
276
- * class RpgClientEngine {}
277
366
  * ```
278
367
  *
279
368
  * [Guide: Create GUI](/guide/create-gui.html)
280
369
  *
281
- * @prop {Array<Component of VueJS>} [gui]
370
+ * @prop {Array<GuiOptions>} [gui]
282
371
  * @memberof RpgClient
283
372
  * */
284
- gui?: any[];
373
+ gui?: ({
374
+ id: string;
375
+ component: ComponentFunction;
376
+ /**
377
+ * Auto display the GUI when added to the system
378
+ * @default false
379
+ */
380
+ autoDisplay?: boolean;
381
+ /**
382
+ * Function that returns an array of Signal dependencies
383
+ * The GUI will only display when all dependencies are resolved (!= undefined)
384
+ */
385
+ dependencies?: () => Signal[];
386
+ /**
387
+ * Attach the GUI to sprites instead of displaying globally
388
+ *
389
+ * When set to `true`, the GUI component will be rendered directly on each sprite
390
+ * in the game world, rather than being displayed as a fixed overlay on the screen.
391
+ * This is useful for tooltips, health bars, name tags, or any UI element that
392
+ * should follow a specific sprite.
393
+ *
394
+ * The GUI will be rendered in the `character.ce` component for each sprite.
395
+ * You can control the display state of attached GUIs from the server side using
396
+ * `player.showAttachedGui()` and `player.hideAttachedGui()` methods.
397
+ *
398
+ * @default false
399
+ * @example
400
+ * ```ts
401
+ * import { defineModule, RpgClient } from '@rpgjs/client'
402
+ * import TooltipComponent from './tooltip.ce'
403
+ *
404
+ * defineModule<RpgClient>({
405
+ * gui: [
406
+ * {
407
+ * id: "my-tooltip",
408
+ * component: TooltipComponent,
409
+ * attachToSprite: true
410
+ * }
411
+ * ]
412
+ * })
413
+ * ```
414
+ *
415
+ * On the server side, control the display:
416
+ * ```ts
417
+ * // Show the tooltip for this player
418
+ * player.showAttachedGui()
419
+ *
420
+ * // Hide the tooltip for this player
421
+ * player.hideAttachedGui()
422
+ *
423
+ * // Show tooltip for other players
424
+ * player.showAttachedGui([otherPlayer1, otherPlayer2])
425
+ * ```
426
+ */
427
+ attachToSprite?: boolean;
428
+ } | any)[];
285
429
  /**
286
430
  * Array containing the list of sounds
287
- * An element contains a class with the `@Sound` decorator
431
+ * Each element can be:
432
+ * - A simple object containing sound definitions
433
+ * - A class decorated with @Sound
288
434
  *
289
435
  * ```ts
290
- * import { Sound, RpgModule, RpgClient } from '@rpgjs/client'
436
+ * import { defineModule, RpgClient, Sound } from '@rpgjs/client'
437
+ *
438
+ * // Using simple objects
439
+ * defineModule<RpgClient>({
440
+ * sounds: [
441
+ * {
442
+ * id: 'typewriter',
443
+ * src: 'typewriter.wav'
444
+ * },
445
+ * {
446
+ * id: 'cursor',
447
+ * src: 'cursor.wav'
448
+ * }
449
+ * ]
450
+ * })
291
451
  *
452
+ * // Using @Sound decorator
292
453
  * @Sound({
293
- * sounds: {
294
- * town: require('./assets/Town_Theme.ogg')
295
- * }
454
+ * id: 'town-music',
455
+ * sound: require('./sound/town.ogg'),
456
+ * loop: true,
457
+ * volume: 0.5
458
+ * })
459
+ * export class TownMusic {}
460
+ *
461
+ * defineModule<RpgClient>({
462
+ * sounds: [TownMusic]
463
+ * })
464
+ *
465
+ * // Multiple sounds in one class
466
+ * @Sound({
467
+ * sounds: {
468
+ * hero: require('./assets/hero.ogg'),
469
+ * monster: require('./assets/monster.ogg')
470
+ * },
471
+ * loop: true
296
472
  * })
297
- * class Sounds {}
473
+ * export class CharacterSounds {}
298
474
  *
299
- * @RpgModule<RpgClient>({
300
- * sounds: [ Sounds ]
475
+ * defineModule<RpgClient>({
476
+ * sounds: [CharacterSounds]
301
477
  * })
302
- * class RpgClientEngine {}
303
478
  * ```
304
479
  *
305
- * @prop {Array<Class>} [sounds]
480
+ * @prop {Array<Object | Class>} [sounds]
306
481
  * @memberof RpgClient
307
482
  * */
308
- sounds?: RpgClass[];
483
+ sounds?: any[];
309
484
  /**
310
485
  * Give the `RpgSprite` class. A Sprite represents a player or an event
311
486
  *
312
487
  * ```ts
313
- * import { RpgSprite, RpgSpriteHooks, RpgClient, RpgModule } from '@rpgjs/client'
488
+ * import { RpgSprite, RpgSpriteHooks, RpgClient, defineModule } from '@rpgjs/client'
314
489
  *
315
490
  * export const sprite: RpgSpriteHooks = {
316
491
  * onInit(sprite: RpgSprite) {}
317
492
  * }
318
493
  *
319
- * @RpgModule<RpgClient>({
494
+ * defineModule<RpgClient>({
320
495
  * sprite
321
496
  * })
322
- * class RpgClientEngine {}
323
497
  * ```
324
498
  *
325
499
  * @prop {RpgSpriteHooks} [sprite]
@@ -330,19 +504,18 @@ export interface RpgClient {
330
504
  * Reference the scenes of the game. Here you can put your own class that inherits RpgSceneMap
331
505
  *
332
506
  * ```ts
333
- * import { RpgSceneMapHooks, RpgClient, RpgModule } from '@rpgjs/client'
507
+ * import { RpgSceneMapHooks, RpgClient, defineModule } from '@rpgjs/client'
334
508
  *
335
509
  * export const sceneMap: RpgSceneMapHooks = {
336
510
  *
337
511
  * }
338
512
  *
339
- * @RpgModule<RpgClient>({
513
+ * defineModule<RpgClient>({
340
514
  * scenes: {
341
515
  * // If you put the RpgSceneMap scene, Thhe key is called mandatory `map`
342
516
  * map: sceneMap
343
517
  * }
344
518
  * })
345
- * class RpgClientEngine {}
346
519
  * ```
347
520
  *
348
521
  * @prop { [sceneName: string]: RpgSceneMapHooks } [scenes]
@@ -351,9 +524,36 @@ export interface RpgClient {
351
524
  scenes?: {
352
525
  map: RpgSceneMapHooks;
353
526
  };
354
- effects?: {
527
+ sceneMap?: RpgSceneMapHooks;
528
+ /**
529
+ * Array containing the list of component animations
530
+ * Each element defines a temporary component to display for animations like hits, effects, etc.
531
+ *
532
+ * ```ts
533
+ * import { defineModule, RpgClient } from '@rpgjs/client'
534
+ * import HitComponent from './hit.ce'
535
+ * import ExplosionComponent from './explosion.ce'
536
+ *
537
+ * defineModule<RpgClient>({
538
+ * componentAnimations: [
539
+ * {
540
+ * id: 'hit',
541
+ * component: HitComponent
542
+ * },
543
+ * {
544
+ * id: 'explosion',
545
+ * component: ExplosionComponent
546
+ * }
547
+ * ]
548
+ * })
549
+ * ```
550
+ *
551
+ * @prop {Array<{id: string, component: ComponentFunction}>} [componentAnimations]
552
+ * @memberof RpgClient
553
+ * */
554
+ componentAnimations?: {
355
555
  id: string;
356
- component: any;
556
+ component: ComponentFunction;
357
557
  }[];
358
558
  }
359
559
  export {};