@rpgjs/client 5.0.0-alpha.22 → 5.0.0-alpha.23

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 (135) hide show
  1. package/dist/Game/Object.d.ts +2 -0
  2. package/dist/Game/TransitionManager.d.ts +56 -0
  3. package/dist/RpgClientEngine.d.ts +195 -9
  4. package/dist/components/gui/mobile/index.d.ts +8 -0
  5. package/dist/components/prebuilt/index.d.ts +1 -0
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.js +13 -8
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +1 -1
  10. package/dist/index11.js +6 -5
  11. package/dist/index11.js.map +1 -1
  12. package/dist/index12.js +2 -2
  13. package/dist/index13.js +102 -10
  14. package/dist/index13.js.map +1 -1
  15. package/dist/index14.js +68 -9
  16. package/dist/index14.js.map +1 -1
  17. package/dist/index15.js +10 -263
  18. package/dist/index15.js.map +1 -1
  19. package/dist/index16.js +9 -97
  20. package/dist/index16.js.map +1 -1
  21. package/dist/index17.js +300 -89
  22. package/dist/index17.js.map +1 -1
  23. package/dist/index18.js +63 -80
  24. package/dist/index18.js.map +1 -1
  25. package/dist/index19.js +96 -348
  26. package/dist/index19.js.map +1 -1
  27. package/dist/index2.js +246 -20
  28. package/dist/index2.js.map +1 -1
  29. package/dist/index20.js +360 -17
  30. package/dist/index20.js.map +1 -1
  31. package/dist/index21.js +19 -50
  32. package/dist/index21.js.map +1 -1
  33. package/dist/index22.js +212 -5
  34. package/dist/index22.js.map +1 -1
  35. package/dist/index23.js +6 -395
  36. package/dist/index23.js.map +1 -1
  37. package/dist/index24.js +4 -39
  38. package/dist/index24.js.map +1 -1
  39. package/dist/index25.js +19 -20
  40. package/dist/index25.js.map +1 -1
  41. package/dist/index26.js +44 -2624
  42. package/dist/index26.js.map +1 -1
  43. package/dist/index27.js +5 -110
  44. package/dist/index27.js.map +1 -1
  45. package/dist/index28.js +394 -65
  46. package/dist/index28.js.map +1 -1
  47. package/dist/index29.js +40 -15
  48. package/dist/index29.js.map +1 -1
  49. package/dist/index3.js +3 -3
  50. package/dist/index30.js +21 -23
  51. package/dist/index30.js.map +1 -1
  52. package/dist/index31.js +49 -91
  53. package/dist/index31.js.map +1 -1
  54. package/dist/index32.js +2624 -32
  55. package/dist/index32.js.map +1 -1
  56. package/dist/index33.js +108 -18
  57. package/dist/index33.js.map +1 -1
  58. package/dist/index34.js +69 -3
  59. package/dist/index34.js.map +1 -1
  60. package/dist/index35.js +17 -331
  61. package/dist/index35.js.map +1 -1
  62. package/dist/index36.js +24 -31
  63. package/dist/index36.js.map +1 -1
  64. package/dist/index37.js +92 -8
  65. package/dist/index37.js.map +1 -1
  66. package/dist/index38.js +37 -7
  67. package/dist/index38.js.map +1 -1
  68. package/dist/index39.js +22 -10
  69. package/dist/index39.js.map +1 -1
  70. package/dist/index4.js +3 -3
  71. package/dist/index40.js +140 -6
  72. package/dist/index40.js.map +1 -1
  73. package/dist/index41.js +35 -321
  74. package/dist/index41.js.map +1 -1
  75. package/dist/index42.js +3 -3688
  76. package/dist/index42.js.map +1 -1
  77. package/dist/index43.js +182 -72
  78. package/dist/index43.js.map +1 -1
  79. package/dist/index44.js +489 -172
  80. package/dist/index44.js.map +1 -1
  81. package/dist/index45.js +316 -485
  82. package/dist/index45.js.map +1 -1
  83. package/dist/index46.js +31 -3
  84. package/dist/index46.js.map +1 -1
  85. package/dist/index47.js +67 -10
  86. package/dist/index47.js.map +1 -1
  87. package/dist/index48.js +9 -207
  88. package/dist/index48.js.map +1 -1
  89. package/dist/index49.js +6 -11
  90. package/dist/index49.js.map +1 -1
  91. package/dist/index5.js +1 -1
  92. package/dist/index50.js +3666 -89
  93. package/dist/index50.js.map +1 -1
  94. package/dist/index51.js +48 -130
  95. package/dist/index51.js.map +1 -1
  96. package/dist/index52.js +17 -134
  97. package/dist/index52.js.map +1 -1
  98. package/dist/index53.js +3 -109
  99. package/dist/index53.js.map +1 -1
  100. package/dist/index54.js +9 -138
  101. package/dist/index54.js.map +1 -1
  102. package/dist/index55.js +111 -7
  103. package/dist/index55.js.map +1 -1
  104. package/dist/index56.js +130 -48
  105. package/dist/index56.js.map +1 -1
  106. package/dist/index57.js +137 -0
  107. package/dist/index57.js.map +1 -0
  108. package/dist/index58.js +112 -0
  109. package/dist/index58.js.map +1 -0
  110. package/dist/index59.js +9 -0
  111. package/dist/index59.js.map +1 -0
  112. package/dist/index6.js +1 -1
  113. package/dist/index7.js +1 -1
  114. package/dist/index8.js +12 -2
  115. package/dist/index8.js.map +1 -1
  116. package/dist/index9.js +11 -27
  117. package/dist/index9.js.map +1 -1
  118. package/dist/services/keyboardControls.d.ts +1 -2
  119. package/dist/services/mmorpg.d.ts +1 -1
  120. package/dist/services/standalone.d.ts +1 -1
  121. package/package.json +5 -5
  122. package/src/Game/Object.ts +8 -0
  123. package/src/Game/TransitionManager.ts +75 -0
  124. package/src/Gui/Gui.ts +5 -31
  125. package/src/RpgClientEngine.ts +257 -14
  126. package/src/components/character.ce +146 -8
  127. package/src/components/gui/mobile/index.ts +24 -0
  128. package/src/components/gui/mobile/mobile.ce +95 -0
  129. package/src/components/prebuilt/index.ts +1 -0
  130. package/src/components/prebuilt/light-halo.ce +217 -0
  131. package/src/components/scenes/canvas.ce +12 -2
  132. package/src/components/scenes/transition.ce +60 -0
  133. package/src/index.ts +6 -1
  134. package/src/module.ts +10 -0
  135. package/src/services/keyboardControls.ts +1 -1
@@ -106,4 +106,6 @@ export declare abstract class RpgClientObject extends RpgCommonPlayer {
106
106
  */
107
107
  setAnimation(animationName: string, nbTimes?: number): void;
108
108
  showComponentAnimation(id: string, params: any): void;
109
+ isEvent(): boolean;
110
+ isPlayer(): boolean;
109
111
  }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Manages active transitions in the game
3
+ *
4
+ * This class handles the lifecycle of screen transitions, such as fade effects,
5
+ * slide transitions, or any custom transition components. It maintains a list
6
+ * of currently active transitions and provides methods to start and finish them.
7
+ *
8
+ * ## Design
9
+ *
10
+ * - Uses signals to track active transitions reactively
11
+ * - Each transition has a unique ID for identification
12
+ * - Transitions automatically remove themselves when finished via onFinish callback
13
+ * - Supports multiple simultaneous transitions if needed
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const manager = new TransitionManager();
18
+ *
19
+ * // Start a fade transition
20
+ * manager.start('fade', { duration: 1000 });
21
+ *
22
+ * // Check active transitions
23
+ * console.log(manager.current()); // Array of active transitions
24
+ * ```
25
+ */
26
+ export declare class TransitionManager {
27
+ /**
28
+ * Signal containing all currently active transitions
29
+ *
30
+ * Each transition object contains:
31
+ * - id: Unique identifier
32
+ * - props: Properties passed to the transition component
33
+ * - onFinish: Callback to remove the transition when complete
34
+ */
35
+ current: import('canvasengine').WritableArraySignal<any[]>;
36
+ /**
37
+ * Start a new transition
38
+ *
39
+ * Creates a new transition instance with the given props and adds it to
40
+ * the active transitions list. The transition will be automatically removed
41
+ * when it calls its onFinish callback.
42
+ *
43
+ * @param props - Properties to pass to the transition component (must include onFinish)
44
+ * @returns The created transition object with id and onFinish callback
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const transition = manager.start({
49
+ * duration: 1000,
50
+ * color: 'black',
51
+ * onFinish: () => console.log('Transition complete')
52
+ * });
53
+ * ```
54
+ */
55
+ start(props: any): any;
56
+ }
@@ -1,12 +1,12 @@
1
- import { Context } from '@signe/di';
2
1
  import { AbstractWebsocket } from './services/AbstractSocket';
3
2
  import { Direction } from '@rpgjs/common';
4
3
  import { RpgClientMap } from './Game/Map';
5
4
  import { AnimationManager } from './Game/AnimationManager';
5
+ import { TransitionManager } from './Game/TransitionManager';
6
6
  import { Observable } from 'rxjs';
7
7
  import * as PIXI from "pixi.js";
8
8
  export declare class RpgClientEngine<T = any> {
9
- context: Context;
9
+ context: any;
10
10
  private guiService;
11
11
  private webSocket;
12
12
  private loadMapService;
@@ -21,6 +21,7 @@ export declare class RpgClientEngine<T = any> {
21
21
  spritesheets: Map<string, any>;
22
22
  sounds: Map<string, any>;
23
23
  componentAnimations: any[];
24
+ transitions: any[];
24
25
  private spritesheetResolver?;
25
26
  private soundResolver?;
26
27
  particleSettings: {
@@ -44,7 +45,7 @@ export declare class RpgClientEngine<T = any> {
44
45
  private pingInterval;
45
46
  private readonly PING_INTERVAL_MS;
46
47
  private lastInputTime;
47
- constructor(context: Context);
48
+ constructor(context: any);
48
49
  /**
49
50
  * Assigns a CanvasEngine KeyboardControls instance to the dependency injection context
50
51
  *
@@ -353,13 +354,38 @@ export declare class RpgClientEngine<T = any> {
353
354
  * Add a component to render behind sprites
354
355
  * Components added with this method will be displayed with a lower z-index than the sprite
355
356
  *
356
- * @param component - The component to add behind sprites
357
- * @returns The added component
357
+ * Supports multiple formats:
358
+ * 1. Direct component: `ShadowComponent`
359
+ * 2. Configuration object: `{ component: LightHalo, props: {...} }`
360
+ * 3. With dynamic props: `{ component: LightHalo, props: (object) => {...} }`
361
+ * 4. With dependencies: `{ component: HealthBar, dependencies: (object) => [object.hp, object.param.maxHp] }`
362
+ *
363
+ * Components with dependencies will only be displayed when all dependencies are resolved (!= undefined).
364
+ * The object (sprite) is passed to the dependencies function to allow sprite-specific dependency resolution.
365
+ *
366
+ * @param component - The component to add behind sprites, or a configuration object
367
+ * @param component.component - The component function to render
368
+ * @param component.props - Static props object or function that receives the sprite object and returns props
369
+ * @param component.dependencies - Function that receives the sprite object and returns an array of Signals
370
+ * @returns The added component or configuration
358
371
  *
359
372
  * @example
360
373
  * ```ts
361
374
  * // Add a shadow component behind all sprites
362
375
  * engine.addSpriteComponentBehind(ShadowComponent);
376
+ *
377
+ * // Add a component with static props
378
+ * engine.addSpriteComponentBehind({
379
+ * component: LightHalo,
380
+ * props: { radius: 30 }
381
+ * });
382
+ *
383
+ * // Add a component with dynamic props and dependencies
384
+ * engine.addSpriteComponentBehind({
385
+ * component: HealthBar,
386
+ * props: (object) => ({ hp: object.hp(), maxHp: object.param.maxHp() }),
387
+ * dependencies: (object) => [object.hp, object.param.maxHp]
388
+ * });
363
389
  * ```
364
390
  */
365
391
  addSpriteComponentBehind(component: any): any;
@@ -367,16 +393,45 @@ export declare class RpgClientEngine<T = any> {
367
393
  * Add a component to render in front of sprites
368
394
  * Components added with this method will be displayed with a higher z-index than the sprite
369
395
  *
370
- * @param component - The component to add in front of sprites
371
- * @returns The added component
396
+ * Supports multiple formats:
397
+ * 1. Direct component: `HealthBarComponent`
398
+ * 2. Configuration object: `{ component: StatusIndicator, props: {...} }`
399
+ * 3. With dynamic props: `{ component: HealthBar, props: (object) => {...} }`
400
+ * 4. With dependencies: `{ component: HealthBar, dependencies: (object) => [object.hp, object.param.maxHp] }`
401
+ *
402
+ * Components with dependencies will only be displayed when all dependencies are resolved (!= undefined).
403
+ * The object (sprite) is passed to the dependencies function to allow sprite-specific dependency resolution.
404
+ *
405
+ * @param component - The component to add in front of sprites, or a configuration object
406
+ * @param component.component - The component function to render
407
+ * @param component.props - Static props object or function that receives the sprite object and returns props
408
+ * @param component.dependencies - Function that receives the sprite object and returns an array of Signals
409
+ * @returns The added component or configuration
372
410
  *
373
411
  * @example
374
412
  * ```ts
375
413
  * // Add a health bar component in front of all sprites
376
414
  * engine.addSpriteComponentInFront(HealthBarComponent);
415
+ *
416
+ * // Add a component with static props
417
+ * engine.addSpriteComponentInFront({
418
+ * component: StatusIndicator,
419
+ * props: { type: 'poison' }
420
+ * });
421
+ *
422
+ * // Add a component with dynamic props and dependencies
423
+ * engine.addSpriteComponentInFront({
424
+ * component: HealthBar,
425
+ * props: (object) => ({ hp: object.hp(), maxHp: object.param.maxHp() }),
426
+ * dependencies: (object) => [object.hp, object.param.maxHp]
427
+ * });
377
428
  * ```
378
429
  */
379
- addSpriteComponentInFront(component: any): any;
430
+ addSpriteComponentInFront(component: any | {
431
+ component: any;
432
+ props: (object: any) => any;
433
+ dependencies?: (object: any) => any[];
434
+ }): any;
380
435
  /**
381
436
  * Add a component animation to the engine
382
437
  *
@@ -428,6 +483,137 @@ export declare class RpgClientEngine<T = any> {
428
483
  * ```
429
484
  */
430
485
  getComponentAnimation(id: string): AnimationManager;
486
+ /**
487
+ * Add a transition to the engine
488
+ *
489
+ * Transitions are screen effects that can be displayed during scene changes,
490
+ * map loading, or any other moment where a visual transition is needed.
491
+ * They are displayed on top of the entire canvas and can have custom props
492
+ * that can be functions (similar to ComponentAnimation).
493
+ *
494
+ * @param transition - The transition configuration
495
+ * @param transition.id - Unique identifier for the transition
496
+ * @param transition.component - The component function to render
497
+ * @param transition.props - Optional props to pass to the component (can be a function)
498
+ * @returns The added transition configuration
499
+ *
500
+ * @example
501
+ * ```ts
502
+ * // Add a fade transition
503
+ * engine.addTransition({
504
+ * id: 'fade',
505
+ * component: FadeComponent
506
+ * });
507
+ *
508
+ * // Add a transition with props
509
+ * engine.addTransition({
510
+ * id: 'slide',
511
+ * component: SlideComponent,
512
+ * props: { direction: 'left', duration: 500 }
513
+ * });
514
+ *
515
+ * // Add a transition with function props
516
+ * engine.addTransition({
517
+ * id: 'custom',
518
+ * component: CustomTransition,
519
+ * props: (engine) => ({ width: engine.width(), height: engine.height() })
520
+ * });
521
+ * ```
522
+ */
523
+ addTransition(transition: {
524
+ component: any;
525
+ id: string;
526
+ props?: any | ((engine: RpgClientEngine) => any);
527
+ }): {
528
+ component: any;
529
+ id: string;
530
+ props?: any | ((engine: RpgClientEngine) => any);
531
+ };
532
+ /**
533
+ * Remove a transition from the engine
534
+ *
535
+ * Removes a transition by its ID. This will not affect any currently
536
+ * running transitions, only prevent new ones from being started.
537
+ *
538
+ * @param id - The unique identifier of the transition to remove
539
+ * @returns true if the transition was found and removed, false otherwise
540
+ *
541
+ * @example
542
+ * ```ts
543
+ * // Remove a transition
544
+ * engine.removeTransition('fade');
545
+ * ```
546
+ */
547
+ removeTransition(id: string): boolean;
548
+ /**
549
+ * Modify an existing transition
550
+ *
551
+ * Updates the component or props of an existing transition. This will
552
+ * not affect any currently running transitions, only future ones.
553
+ *
554
+ * @param id - The unique identifier of the transition to modify
555
+ * @param updates - The updates to apply (component and/or props)
556
+ * @returns true if the transition was found and modified, false otherwise
557
+ *
558
+ * @example
559
+ * ```ts
560
+ * // Update transition props
561
+ * engine.modifyTransition('fade', {
562
+ * props: { duration: 2000, color: 'white' }
563
+ * });
564
+ *
565
+ * // Update transition component
566
+ * engine.modifyTransition('fade', {
567
+ * component: NewFadeComponent
568
+ * });
569
+ * ```
570
+ */
571
+ modifyTransition(id: string, updates: {
572
+ component?: any;
573
+ props?: any | ((engine: RpgClientEngine) => any);
574
+ }): boolean;
575
+ /**
576
+ * Get a transition by its ID
577
+ *
578
+ * Retrieves the TransitionManager instance for a specific transition,
579
+ * which can be used to start the transition.
580
+ *
581
+ * @param id - The unique identifier of the transition
582
+ * @returns The TransitionManager instance for the transition
583
+ * @throws Error if the transition is not found
584
+ *
585
+ * @example
586
+ * ```ts
587
+ * // Get a transition and start it
588
+ * const fadeTransition = engine.getTransition('fade');
589
+ * fadeTransition.start({ duration: 1000 });
590
+ * ```
591
+ */
592
+ getTransition(id: string): TransitionManager;
593
+ /**
594
+ * Start a transition
595
+ *
596
+ * Convenience method to start a transition by its ID. This combines
597
+ * getTransition and start into a single call. The transition will
598
+ * automatically receive an onFinish callback to remove itself when done.
599
+ *
600
+ * @param id - The unique identifier of the transition to start
601
+ * @param props - Additional props to pass to the transition component
602
+ * @returns The created transition object
603
+ *
604
+ * @example
605
+ * ```ts
606
+ * // Start a fade transition
607
+ * engine.startTransition('fade', { duration: 1000, color: 'black' });
608
+ *
609
+ * // Start with onFinish callback
610
+ * engine.startTransition('fade', {
611
+ * duration: 1000,
612
+ * onFinish: () => console.log('Fade complete')
613
+ * });
614
+ * ```
615
+ */
616
+ startTransition(id: string, props?: any): any;
431
617
  processInput({ input }: {
432
618
  input: Direction;
433
619
  }): Promise<void>;
@@ -442,7 +628,7 @@ export declare class RpgClientEngine<T = any> {
442
628
  private getLocalPlayerState;
443
629
  private applyAuthoritativeState;
444
630
  private initializePredictionController;
445
- getCurrentPlayer(): import('./Game/Player').RpgClientPlayer;
631
+ getCurrentPlayer(): import('.').RpgClientPlayer;
446
632
  /**
447
633
  * Clear client prediction states for cleanup
448
634
  *
@@ -0,0 +1,8 @@
1
+ export declare const withMobile: () => {
2
+ gui: {
3
+ id: string;
4
+ component: any;
5
+ autoDisplay: boolean;
6
+ dependencies: () => (import('canvasengine').ComputedSignal<import('../../..').RpgClientPlayer> | import('canvasengine').WritableSignal<true | undefined>)[];
7
+ }[];
8
+ };
@@ -16,3 +16,4 @@
16
16
  * ```
17
17
  */
18
18
  export { default as HpBar } from './hp-bar.ce';
19
+ export { default as LightHalo } from './light-halo.ce';
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export * from './module';
9
9
  export * from './Gui/Gui';
10
10
  export * from './components/gui';
11
11
  export * from './components/animations';
12
+ export * from './components/prebuilt';
12
13
  export * from './presets';
13
14
  export * from './components';
14
15
  export * from './components/gui';
@@ -17,3 +18,7 @@ export * from './Resource';
17
18
  export { Context } from '@signe/di';
18
19
  export { KeyboardControls, Input } from 'canvasengine';
19
20
  export { Control } from './services/keyboardControls';
21
+ export { RpgClientObject } from './Game/Object';
22
+ export { RpgClientPlayer } from './Game/Player';
23
+ export { RpgClientEvent } from './Game/Event';
24
+ export { withMobile } from './components/gui/mobile';
package/dist/index.js CHANGED
@@ -9,13 +9,18 @@ export { RpgGui } from './index9.js';
9
9
  export { default as DialogboxComponent } from './index10.js';
10
10
  export { default as BoxComponent } from './index11.js';
11
11
  export { PrebuiltComponentAnimations } from './index12.js';
12
- export { Presets } from './index13.js';
13
- export { default as EventLayerComponent } from './index14.js';
14
- export { default as CharacterComponent } from './index15.js';
15
- export { default as HpBar } from './index16.js';
16
- export { RpgSound, Sound, getSoundMetadata } from './index17.js';
17
- export { RpgResource } from './index18.js';
18
- export { Context } from './index19.js';
12
+ export { default as HpBar } from './index13.js';
13
+ export { default as LightHalo } from './index14.js';
14
+ export { Presets } from './index15.js';
15
+ export { default as EventLayerComponent } from './index16.js';
16
+ export { default as CharacterComponent } from './index17.js';
17
+ export { RpgSound, Sound, getSoundMetadata } from './index18.js';
18
+ export { RpgResource } from './index19.js';
19
+ export { Context } from './index20.js';
19
20
  export { Input, KeyboardControls } from 'canvasengine';
20
- export { Control } from './index20.js';
21
+ export { Control } from './index21.js';
22
+ export { RpgClientObject } from './index22.js';
23
+ export { RpgClientPlayer } from './index23.js';
24
+ export { RpgClientEvent } from './index24.js';
25
+ export { withMobile } from './index25.js';
21
26
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index10.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useProps, useDefineProps, signal, animatedSignal, computed, trigger, mount, effect, h, Container, Rect, cond, Text, Sprite } from 'canvasengine';
2
- import component$1 from './index43.js';
2
+ import component$1 from './index47.js';
3
3
  import { inject } from './index6.js';
4
4
  import { RpgClientEngine } from './index2.js';
5
5
 
package/dist/index11.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import { useProps, useDefineProps, computed, h, Container, Rect } from 'canvasengine';
2
2
  import { RpgClientEngine } from './index2.js';
3
- import './index26.js';
3
+ import './index32.js';
4
4
  import '@rpgjs/common';
5
- import './index19.js';
5
+ import './index20.js';
6
6
  import { inject } from './index6.js';
7
7
  import 'rxjs';
8
- import './index27.js';
9
- import './index17.js';
10
- import '@canvasengine/presets';
8
+ import './index33.js';
11
9
  import './index18.js';
10
+ import 'pixi.js';
11
+ import '@canvasengine/presets';
12
+ import './index19.js';
12
13
 
13
14
  function component($$props) {
14
15
  useProps($$props);
@@ -1 +1 @@
1
- {"version":3,"file":"index11.js","sources":["../src/components/gui/box.ce"],"sourcesContent":["<Container positionType=\"absolute\" top={top} left={left}>\n <Container\n anchor={[0.5, 0.5]}\n >\n <Rect width height color={_color} />\n <Container attach={child}></Container>\n </Container> \n</Container>\n\n<script>\n import { RpgClientEngine, inject } from \"../../index\";\n\n const { width, height, children, color, top, left } = defineProps();\n const engine = inject(RpgClientEngine)\n const child = children[0]\n const _color = computed(() => engine.globalConfig.gui?.windowColor || color?.() || \"#1a1a2e\")\n</script>"],"names":[],"mappings":";;;;;;;;;;;;AAOqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,EAAE,GAAG,WAAW,EAAE,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI;AAC5I,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AACpC,IAAI,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC;AACvB,IAAI,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,WAAW,MAAM,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;AAClN,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACvM,QAAQ,OAAO;AACf,MAAM;;;;"}
1
+ {"version":3,"file":"index11.js","sources":["../src/components/gui/box.ce"],"sourcesContent":["<Container positionType=\"absolute\" top={top} left={left}>\n <Container\n anchor={[0.5, 0.5]}\n >\n <Rect width height color={_color} />\n <Container attach={child}></Container>\n </Container> \n</Container>\n\n<script>\n import { RpgClientEngine, inject } from \"../../index\";\n\n const { width, height, children, color, top, left } = defineProps();\n const engine = inject(RpgClientEngine)\n const child = children[0]\n const _color = computed(() => engine.globalConfig.gui?.windowColor || color?.() || \"#1a1a2e\")\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;AAOqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,EAAE,GAAG,WAAW,EAAE,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI;AAC5I,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AACpC,IAAI,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC;AACvB,IAAI,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,WAAW,MAAM,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;AAClN,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACvM,QAAQ,OAAO;AACf,MAAM;;;;"}
package/dist/index12.js CHANGED
@@ -1,5 +1,5 @@
1
- import component$1 from './index28.js';
2
- import component from './index29.js';
1
+ import component$1 from './index34.js';
2
+ import component from './index35.js';
3
3
 
4
4
  const PrebuiltComponentAnimations = {
5
5
  Hit: component$1,
package/dist/index13.js CHANGED
@@ -1,14 +1,106 @@
1
- import { AnimationSpritesheetPreset } from './index30.js';
2
- import { LPCSpritesheetPreset } from './index31.js';
3
- import { RMSpritesheet } from './index32.js';
4
- import { FacesetPreset } from './index33.js';
1
+ import { useProps, useDefineProps, computed, animatedSignal, effect, h, Container, Graphics } from 'canvasengine';
5
2
 
6
- const Presets = {
7
- RMSpritesheet,
8
- LPCSpritesheetPreset,
9
- AnimationSpritesheetPreset,
10
- FacesetPreset
3
+ function component($$props) {
4
+ useProps($$props);
5
+ const defineProps = useDefineProps($$props);
6
+ var object = defineProps().object;
7
+ var barWidth = 50;
8
+ var barHeight = 8;
9
+ var borderRadius = 4;
10
+ var innerRadius = 3;
11
+ var padding = 1;
12
+ var bgColor = 0x16213e;
13
+ var shadowColor = 0x000000;
14
+ var borderColor = 0x4a5568;
15
+ var maxFillWidth = barWidth - (padding * 2);
16
+ var fillHeight = barHeight - (padding * 2);
17
+ var highlightHeight = Math.floor(fillHeight / 2);
18
+ var hitbox = object.hitbox;
19
+ var currentHp = computed(function () {
20
+ var _a, _b;
21
+ return (_b = (_a = object.hpSignal) === null || _a === void 0 ? void 0 : _a.call(object)) !== null && _b !== void 0 ? _b : 0;
22
+ });
23
+ var maxHp = computed(function () {
24
+ var _a, _b, _c;
25
+ var params = (_b = (_a = object._param) === null || _a === void 0 ? void 0 : _a.call(object)) !== null && _b !== void 0 ? _b : {};
26
+ return (_c = params.maxHp) !== null && _c !== void 0 ? _c : 100;
27
+ });
28
+ var hpPercent = computed(function () {
29
+ var max = maxHp();
30
+ if (max <= 0)
31
+ return 0;
32
+ var percent = currentHp() / max;
33
+ return Math.max(0, Math.min(1, percent));
34
+ });
35
+ var animatedPercent = animatedSignal(hpPercent(), {
36
+ duration: 300,
37
+ easing: 'easeOutCubic'
38
+ });
39
+ effect(function () {
40
+ var newPercent = hpPercent();
41
+ animatedPercent.set(newPercent);
42
+ });
43
+ var position = computed(function () { return ({
44
+ x: (hitbox().w / 2) - (barWidth / 2),
45
+ y: -barHeight - 8
46
+ }); });
47
+ var fillWidth = computed(function () {
48
+ var percent = animatedPercent();
49
+ var width = maxFillWidth * percent;
50
+ // Ensure minimum visible width when HP > 0
51
+ if (percent > 0 && width < innerRadius * 2) {
52
+ return innerRadius * 2;
53
+ }
54
+ return Math.max(0, width);
55
+ });
56
+ var hpColorHex = computed(function () {
57
+ var percent = hpPercent();
58
+ if (percent > 0.6) {
59
+ return 0x4ade80; // Green - healthy
60
+ }
61
+ else if (percent > 0.3) {
62
+ return 0xfacc15; // Yellow - caution
63
+ }
64
+ else if (percent > 0.15) {
65
+ return 0xfb923c; // Orange - danger
66
+ }
67
+ else {
68
+ return 0xef4444; // Red - critical
69
+ }
70
+ });
71
+ var drawShadow = function (g) {
72
+ g.roundRect(0, 0, barWidth, barHeight, borderRadius);
73
+ g.fill({ color: shadowColor, alpha: 0.3 });
11
74
  };
75
+ var drawBackground = function (g) {
76
+ g.roundRect(0, 0, barWidth, barHeight, borderRadius);
77
+ g.fill({ color: bgColor, alpha: 0.9 });
78
+ };
79
+ var drawFill = function (g) {
80
+ var width = fillWidth();
81
+ if (width > 0) {
82
+ g.roundRect(padding, padding, width, fillHeight, innerRadius);
83
+ g.fill({ color: hpColorHex() });
84
+ }
85
+ };
86
+ var drawHighlight = function (g) {
87
+ var width = fillWidth();
88
+ if (width > 0) {
89
+ g.roundRect(padding, padding, width, highlightHeight, innerRadius);
90
+ g.fill({ color: 0xffffff, alpha: 0.25 });
91
+ }
92
+ };
93
+ var drawBorder = function (g) {
94
+ g.roundRect(0, 0, barWidth, barHeight, borderRadius);
95
+ g.stroke({
96
+ color: borderColor,
97
+ width: 1,
98
+ alpha: 0.7
99
+ });
100
+ };
101
+ let $this = [,h(Container, { x: computed(() => position().x), y: computed(() => position().y) }, [h(Graphics, { draw: drawShadow, x: 1, y: 1 }), h(Graphics, { draw: drawBackground }), h(Graphics, { draw: drawFill }), h(Graphics, { draw: drawHighlight }), h(Graphics, { draw: drawBorder })])];
102
+ return $this
103
+ }
12
104
 
13
- export { Presets };
105
+ export { component as default };
14
106
  //# sourceMappingURL=index13.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index13.js","sources":["../src/presets/index.ts"],"sourcesContent":["import { AnimationSpritesheetPreset } from \"./animation\";\nimport { LPCSpritesheetPreset } from \"./lpc\";\nimport { RMSpritesheet } from \"./rmspritesheet\";\nimport { FacesetPreset } from \"./faceset\";\n\nexport const Presets = {\n RMSpritesheet,\n LPCSpritesheetPreset,\n AnimationSpritesheetPreset,\n FacesetPreset\n}"],"names":[],"mappings":";;;;;AAKO,MAAM,OAAA,GAAU;AAAA,EACnB,aAAA;AAAA,EACA,oBAAA;AAAA,EACA,0BAAA;AAAA,EACA;AACJ;;;;"}
1
+ {"version":3,"file":"index13.js","sources":["../src/components/prebuilt/hp-bar.ce"],"sourcesContent":["<!-- \n HP Bar Component\n \n A beautiful, animated health bar component for displaying player HP above sprites.\n Features a gradient color based on HP level, smooth animations, and modern styling.\n \n ## Design\n \n The bar changes color dynamically based on HP percentage:\n - Green (#4ade80) when HP > 60% - Healthy state\n - Yellow (#facc15) when HP 30-60% - Caution state \n - Orange (#fb923c) when HP 15-30% - Danger state\n - Red (#ef4444) when HP < 15% - Critical state\n \n @example\n ```ts\n import HpBar from './hp-bar.ce';\n \n // In module configuration\n export default defineModule<RpgClient>({\n sprite: {\n componentsInFront: [HpBar]\n }\n })\n ```\n-->\n\n<Container x={position.@x} y={position.@y}>\n <!-- Background shadow for depth effect -->\n <Graphics draw={drawShadow} x={1} y={1} />\n \n <!-- Main background -->\n <Graphics draw={drawBackground} />\n \n <!-- HP fill bar -->\n <Graphics draw={drawFill} />\n \n <!-- Highlight overlay for 3D effect -->\n <Graphics draw={drawHighlight} />\n \n <!-- Border frame -->\n <Graphics draw={drawBorder} />\n</Container>\n\n<script>\nimport { computed, animatedSignal, effect } from \"canvasengine\";\n\nconst { object } = defineProps();\n\n// ====================\n// Configuration\n// ====================\n\n/** Total width of the HP bar in pixels */\nconst barWidth = 50;\n\n/** Total height of the HP bar in pixels */\nconst barHeight = 8;\n\n/** Border radius for rounded corners */\nconst borderRadius = 4;\n\n/** Inner border radius for the fill bar */\nconst innerRadius = 3;\n\n/** Padding between background and fill */\nconst padding = 1;\n\n/** Background color (dark theme) */\nconst bgColor = 0x16213e;\n\n/** Shadow color */\nconst shadowColor = 0x000000;\n\n/** Border color */\nconst borderColor = 0x4a5568;\n\n// ====================\n// Calculated dimensions\n// ====================\n\n/** Maximum fill width */\nconst maxFillWidth = barWidth - (padding * 2);\n\n/** Fill height */\nconst fillHeight = barHeight - (padding * 2);\n\n/** Highlight height (half of fill) */\nconst highlightHeight = Math.floor(fillHeight / 2);\n\n// ====================\n// Reactive HP values\n// ====================\n\n/** Gets hitbox dimensions for positioning */\nconst hitbox = object.hitbox;\n\n/**\n * Gets the current HP value from the player object\n * Uses hpSignal which is synchronized from the server\n */\nconst currentHp = computed(() => {\n return object.hpSignal?.() ?? 0;\n});\n\n/**\n * Gets the maximum HP value from player parameters\n * Reads from _param.maxHp which contains calculated stats\n */\nconst maxHp = computed(() => {\n const params = object._param?.() ?? {};\n return params.maxHp ?? 100;\n});\n\n/**\n * Calculates HP percentage (0 to 1)\n */\nconst hpPercent = computed(() => {\n const max = maxHp();\n if (max <= 0) return 0;\n const percent = currentHp() / max;\n return Math.max(0, Math.min(1, percent));\n});\n\n// ====================\n// Animated values\n// ====================\n\n/**\n * Animated percentage for smooth bar transitions\n */\nconst animatedPercent = animatedSignal(hpPercent(), {\n duration: 300,\n easing: 'easeOutCubic'\n});\n\n// Update animated value when HP changes\neffect(() => {\n const newPercent = hpPercent();\n animatedPercent.set(newPercent);\n});\n\n// ====================\n// Visual calculations\n// ====================\n\n/**\n * Position of the bar relative to the sprite\n */\nconst position = computed(() => ({\n x: (hitbox().w / 2) - (barWidth / 2),\n y: -barHeight - 8\n}));\n\n/**\n * Current width of the HP fill based on animated percentage\n */\nconst fillWidth = computed(() => {\n const percent = animatedPercent();\n const width = maxFillWidth * percent;\n // Ensure minimum visible width when HP > 0\n if (percent > 0 && width < innerRadius * 2) {\n return innerRadius * 2;\n }\n return Math.max(0, width);\n});\n\n/**\n * Determines HP bar color based on current HP percentage\n * Returns hex color number for PixiJS\n * \n * ## Color Thresholds\n * - Green (0x4ade80): HP > 60% - Healthy\n * - Yellow (0xfacc15): HP 30-60% - Caution\n * - Orange (0xfb923c): HP 15-30% - Danger\n * - Red (0xef4444): HP < 15% - Critical\n */\nconst hpColorHex = computed(() => {\n const percent = hpPercent();\n \n if (percent > 0.6) {\n return 0x4ade80; // Green - healthy\n } else if (percent > 0.3) {\n return 0xfacc15; // Yellow - caution\n } else if (percent > 0.15) {\n return 0xfb923c; // Orange - danger\n } else {\n return 0xef4444; // Red - critical\n }\n});\n\n// ====================\n// Drawing functions\n// ====================\n\n/**\n * Draws the shadow behind the HP bar for depth effect\n */\nconst drawShadow = (g) => {\n g.roundRect(0, 0, barWidth, barHeight, borderRadius);\n g.fill({ color: shadowColor, alpha: 0.3 });\n};\n\n/**\n * Draws the main background of the HP bar\n */\nconst drawBackground = (g) => {\n g.roundRect(0, 0, barWidth, barHeight, borderRadius);\n g.fill({ color: bgColor, alpha: 0.9 });\n};\n\n/**\n * Draws the HP fill bar with dynamic color\n */\nconst drawFill = (g) => {\n const width = fillWidth();\n if (width > 0) {\n g.roundRect(padding, padding, width, fillHeight, innerRadius);\n g.fill({ color: hpColorHex() });\n }\n};\n\n/**\n * Draws the highlight overlay for 3D effect\n */\nconst drawHighlight = (g) => {\n const width = fillWidth();\n if (width > 0) {\n g.roundRect(padding, padding, width, highlightHeight, innerRadius);\n g.fill({ color: 0xffffff, alpha: 0.25 });\n }\n};\n\n/**\n * Draws the border frame around the HP bar\n * \n * Uses PixiJS Graphics API to create a rounded rectangle stroke\n * that serves as a visual border for the bar.\n * \n * @param g - PixiJS Graphics object\n * \n * @example\n * ```html\n * <Graphics draw={drawBorder} />\n * ```\n */\nconst drawBorder = (g) => {\n g.roundRect(0, 0, barWidth, barHeight, borderRadius);\n g.stroke({ \n color: borderColor, \n width: 1,\n alpha: 0.7\n });\n};\n</script>\n"],"names":[],"mappings":";;AAOqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,MAAM,GAAG,WAAW,EAAE,CAAC,MAAM;AACzC,IAAI,QAAQ,GAAG,EAAE;AACjB,IAAI,SAAS,GAAG,CAAC;AACjB,IAAI,YAAY,GAAG,CAAC;AACpB,IAAI,WAAW,GAAG,CAAC;AACnB,IAAI,OAAO,GAAG,CAAC;AACf,IAAI,OAAO,GAAG,QAAQ;AACtB,IAAI,WAAW,GAA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