@rpgjs/client 5.0.0-alpha.10 → 5.0.0-alpha.3

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 (115) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/Game/EffectManager.d.ts +5 -0
  3. package/dist/RpgClient.d.ts +68 -99
  4. package/dist/RpgClientEngine.d.ts +4 -86
  5. package/dist/components/effects/index.d.ts +4 -0
  6. package/dist/components/index.d.ts +1 -2
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +1 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/index10.js +1 -1
  11. package/dist/index11.js +4 -4
  12. package/dist/index11.js.map +1 -1
  13. package/dist/index12.js +2 -6
  14. package/dist/index12.js.map +1 -1
  15. package/dist/index13.js +2 -2
  16. package/dist/index13.js.map +1 -1
  17. package/dist/index14.js +35 -95
  18. package/dist/index14.js.map +1 -1
  19. package/dist/index15.js +186 -45
  20. package/dist/index15.js.map +1 -1
  21. package/dist/index16.js +5 -187
  22. package/dist/index16.js.map +1 -1
  23. package/dist/index17.js +383 -5
  24. package/dist/index17.js.map +1 -1
  25. package/dist/index18.js +28 -384
  26. package/dist/index18.js.map +1 -1
  27. package/dist/index19.js +17 -24
  28. package/dist/index19.js.map +1 -1
  29. package/dist/index2.js +25 -147
  30. package/dist/index2.js.map +1 -1
  31. package/dist/index20.js +2413 -16
  32. package/dist/index20.js.map +1 -1
  33. package/dist/index21.js +88 -2395
  34. package/dist/index21.js.map +1 -1
  35. package/dist/index22.js +103 -108
  36. package/dist/index22.js.map +1 -1
  37. package/dist/index23.js +57 -95
  38. package/dist/index23.js.map +1 -1
  39. package/dist/index24.js +12 -62
  40. package/dist/index24.js.map +1 -1
  41. package/dist/index25.js +37 -18
  42. package/dist/index25.js.map +1 -1
  43. package/dist/index26.js +3 -25
  44. package/dist/index26.js.map +1 -1
  45. package/dist/index27.js +314 -87
  46. package/dist/index27.js.map +1 -1
  47. package/dist/index28.js +21 -37
  48. package/dist/index28.js.map +1 -1
  49. package/dist/index29.js +9 -3
  50. package/dist/index29.js.map +1 -1
  51. package/dist/index3.js +2 -2
  52. package/dist/index30.js +6 -317
  53. package/dist/index30.js.map +1 -1
  54. package/dist/index31.js +171 -24
  55. package/dist/index31.js.map +1 -1
  56. package/dist/index32.js +497 -7
  57. package/dist/index32.js.map +1 -1
  58. package/dist/index33.js +9 -8
  59. package/dist/index33.js.map +1 -1
  60. package/dist/index34.js +4400 -9
  61. package/dist/index34.js.map +1 -1
  62. package/dist/index35.js +85 -4397
  63. package/dist/index35.js.map +1 -1
  64. package/dist/index36.js +55 -310
  65. package/dist/index36.js.map +1 -1
  66. package/dist/index37.js +15 -169
  67. package/dist/index37.js.map +1 -1
  68. package/dist/index38.js +15 -496
  69. package/dist/index38.js.map +1 -1
  70. package/dist/index4.js +5 -18
  71. package/dist/index4.js.map +1 -1
  72. package/dist/index5.js +1 -2
  73. package/dist/index5.js.map +1 -1
  74. package/dist/index6.js +1 -1
  75. package/dist/index7.js +2 -10
  76. package/dist/index7.js.map +1 -1
  77. package/dist/index8.js +6 -24
  78. package/dist/index8.js.map +1 -1
  79. package/dist/index9.js +2 -2
  80. package/dist/presets/index.d.ts +0 -102
  81. package/dist/services/loadMap.d.ts +2 -123
  82. package/dist/services/mmorpg.d.ts +3 -7
  83. package/package.json +12 -14
  84. package/src/Game/{AnimationManager.ts → EffectManager.ts} +2 -2
  85. package/src/Game/Object.ts +0 -69
  86. package/src/RpgClient.ts +67 -101
  87. package/src/RpgClientEngine.ts +24 -159
  88. package/src/components/character.ce +33 -74
  89. package/src/components/{animations → effects}/animation.ce +5 -3
  90. package/src/components/{animations → effects}/index.ts +1 -1
  91. package/src/components/index.ts +1 -2
  92. package/src/components/scenes/draw-map.ce +23 -6
  93. package/src/components/scenes/element-map.ce +23 -0
  94. package/src/components/scenes/event-layer.ce +3 -3
  95. package/src/core/setup.ts +0 -2
  96. package/src/index.ts +1 -1
  97. package/src/module.ts +5 -23
  98. package/src/presets/index.ts +1 -5
  99. package/src/services/loadMap.ts +2 -131
  100. package/src/services/mmorpg.ts +4 -20
  101. package/tsconfig.json +1 -1
  102. package/vite.config.ts +1 -1
  103. package/dist/Game/AnimationManager.d.ts +0 -8
  104. package/dist/components/animations/index.d.ts +0 -4
  105. package/dist/index39.js +0 -61
  106. package/dist/index39.js.map +0 -1
  107. package/dist/index40.js +0 -20
  108. package/dist/index40.js.map +0 -1
  109. package/dist/index41.js +0 -82
  110. package/dist/index41.js.map +0 -1
  111. package/dist/presets/animation.d.ts +0 -31
  112. package/dist/presets/lpc.d.ts +0 -89
  113. package/src/presets/animation.ts +0 -46
  114. package/src/presets/lpc.ts +0 -108
  115. /package/src/components/{animations → effects}/hit.ce +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # @rpgjs/client
2
+
3
+ ## 5.0.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - alpha
8
+ - Updated dependencies
9
+ - @rpgjs/common@5.0.0-alpha.3
@@ -0,0 +1,5 @@
1
+ import { RpgCommonPlayer } from '@rpgjs/common';
2
+ export declare class EffectManager {
3
+ current: import('canvasengine').WritableArraySignal<any[]>;
4
+ displayEffect(params: any, player: RpgCommonPlayer): void;
5
+ }
@@ -1,8 +1,8 @@
1
- import { ComponentFunction } from 'canvasengine';
2
1
  import { RpgClientEngine } from './RpgClientEngine';
3
- import { Loader, Container } from 'pixi.js';
4
- type RpgComponent = Container;
5
- type SceneMap = Container;
2
+ import { Loader } from 'pixi.js';
3
+ type RpgClass<T = any> = new (...args: any[]) => T;
4
+ type RpgComponent = any;
5
+ type SceneMap = any;
6
6
  export interface RpgClientEngineHooks {
7
7
  /**
8
8
  * When the engine is started. If you send false, you prevent the client from connecting to the server
@@ -10,7 +10,7 @@ export interface RpgClientEngineHooks {
10
10
  * @prop { (engine: RpgClientEngine) => boolean | any } [onStart]
11
11
  * @memberof RpgEngineHooks
12
12
  */
13
- onStart?: (engine: RpgClientEngine) => boolean | void | Promise<boolean | void>;
13
+ onStart?: (engine: RpgClientEngine) => boolean | void;
14
14
  /**
15
15
  * Each frame
16
16
  *
@@ -59,34 +59,6 @@ export interface RpgClientEngineHooks {
59
59
  onWindowResize?: () => any;
60
60
  }
61
61
  export interface RpgSpriteHooks {
62
- /**
63
- * Array of components to render behind the sprite
64
- * These components will be displayed with a lower z-index than the sprite itself
65
- *
66
- * @prop { ComponentFunction[] } [componentsBehind]
67
- * @memberof RpgSpriteHooks
68
- * @example
69
- * ```ts
70
- * const sprite: RpgSpriteHooks = {
71
- * componentsBehind: [ShadowComponent, AuraComponent]
72
- * }
73
- * ```
74
- */
75
- componentsBehind?: ComponentFunction[];
76
- /**
77
- * Array of components to render in front of the sprite
78
- * These components will be displayed with a higher z-index than the sprite itself
79
- *
80
- * @prop { ComponentFunction[] } [componentsInFront]
81
- * @memberof RpgSpriteHooks
82
- * @example
83
- * ```ts
84
- * const sprite: RpgSpriteHooks = {
85
- * componentsInFront: [HealthBarComponent, StatusEffectComponent]
86
- * }
87
- * ```
88
- */
89
- componentsInFront?: ComponentFunction[];
90
62
  /**
91
63
  * As soon as the sprite is initialized
92
64
  *
@@ -191,13 +163,14 @@ export interface RpgClient {
191
163
  * @example
192
164
  *
193
165
  * ```ts
194
- * import { RpgClient, defineModule } from '@rpgjs/client'
166
+ * import { RpgClient, RpgModule } from '@rpgjs/client'
195
167
  *
196
- * defineModule<RpgClient>({
168
+ * @RpgModule<RpgClient>({
197
169
  * hooks: {
198
170
  * player: ['onAuth']
199
171
  * }
200
172
  * })
173
+ * class RpgClientEngine { }
201
174
  * ```
202
175
  *
203
176
  * Emit the hook:
@@ -234,7 +207,7 @@ export interface RpgClient {
234
207
  * Object containing the hooks concerning the engine
235
208
  *
236
209
  * ```ts
237
- * import { RpgClientEngine, RpgClientEngineHooks, defineModule, RpgClient } from '@rpgjs/client'
210
+ * import { RpgClientEngine, RpgClientEngineHooks, RpgModule, RpgClient } from '@rpgjs/client'
238
211
  *
239
212
  * const engine: RpgClientEngineHooks = {
240
213
  * onConnected(engine: RpgClientEngine) {
@@ -242,9 +215,10 @@ export interface RpgClient {
242
215
  * }
243
216
  * }
244
217
  *
245
- * defineModule<RpgClient>({
218
+ * @RpgModule<RpgClient>({
246
219
  * engine
247
220
  * })
221
+ * class RpgClientModule {}
248
222
  * ```
249
223
  *
250
224
  * @prop {RpgClientEngineHooks} [engine]
@@ -253,79 +227,99 @@ export interface RpgClient {
253
227
  engine?: RpgClientEngineHooks;
254
228
  /**
255
229
  * Array containing the list of spritesheets
256
- * Each element is a simple object containing spritesheet definitions
230
+ * An element contains a class with the `@Spritesheet` decorator
257
231
  *
258
232
  * ```ts
259
- * import { defineModule, RpgClient } from '@rpgjs/client'
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
241
  *
261
- * defineModule<RpgClient>({
242
+ * @RpgModule<RpgClient>({
262
243
  * spritesheets: [
263
- * {
264
- * id: 'chest',
265
- * image: require('./assets/chest.png'),
266
- * framesWidth: 32,
267
- * framesHeight: 32,
268
- * animations: {
269
- * default: {
270
- * frames: [0, 1, 2],
271
- * duration: 1000
272
- * }
273
- * }
274
- * }
244
+ * Chest
275
245
  * ]
276
246
  * })
247
+ * class RpgClientEngine {}
277
248
  * ```
278
249
  *
279
250
  * [Guide: Create Sprite](/guide/create-sprite.html)
280
251
  *
281
- * @prop {Array<Object>} [spritesheets]
252
+ * @prop {Array<Class>} [spritesheets]
282
253
  * @memberof RpgClient
283
254
  * */
284
255
  spritesheets?: any[];
285
256
  /**
286
257
  * Array containing the list of VueJS components
287
258
  *
259
+ * ```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
+ * }
270
+ *
271
+ * @RpgModule<RpgClient>({
272
+ * gui: [
273
+ * component
274
+ * ]
275
+ * })
276
+ * class RpgClientEngine {}
277
+ * ```
288
278
  *
289
279
  * [Guide: Create GUI](/guide/create-gui.html)
290
280
  *
291
- * @prop {Array<Component of CanvasEngine>} [gui]
281
+ * @prop {Array<Component of VueJS>} [gui]
292
282
  * @memberof RpgClient
293
283
  * */
294
- gui?: ComponentFunction[];
284
+ gui?: any[];
295
285
  /**
296
286
  * Array containing the list of sounds
297
- * Each element is a simple object containing sound definitions
287
+ * An element contains a class with the `@Sound` decorator
298
288
  *
299
289
  * ```ts
300
- * import { defineModule, RpgClient } from '@rpgjs/client'
301
- *
302
- * defineModule<RpgClient>({
303
- * sounds: [
304
- * {
305
- * town: require('./assets/Town_Theme.ogg'),
306
- * battle: require('./assets/Battle_Theme.ogg')
307
- * }
308
- * ]
290
+ * import { Sound, RpgModule, RpgClient } from '@rpgjs/client'
291
+ *
292
+ * @Sound({
293
+ * sounds: {
294
+ * town: require('./assets/Town_Theme.ogg')
295
+ * }
296
+ * })
297
+ * class Sounds {}
298
+ *
299
+ * @RpgModule<RpgClient>({
300
+ * sounds: [ Sounds ]
309
301
  * })
302
+ * class RpgClientEngine {}
310
303
  * ```
311
304
  *
312
- * @prop {Array<Object>} [sounds]
305
+ * @prop {Array<Class>} [sounds]
313
306
  * @memberof RpgClient
314
307
  * */
315
- sounds?: any[];
308
+ sounds?: RpgClass[];
316
309
  /**
317
310
  * Give the `RpgSprite` class. A Sprite represents a player or an event
318
311
  *
319
312
  * ```ts
320
- * import { RpgSprite, RpgSpriteHooks, RpgClient, defineModule } from '@rpgjs/client'
313
+ * import { RpgSprite, RpgSpriteHooks, RpgClient, RpgModule } from '@rpgjs/client'
321
314
  *
322
315
  * export const sprite: RpgSpriteHooks = {
323
316
  * onInit(sprite: RpgSprite) {}
324
317
  * }
325
318
  *
326
- * defineModule<RpgClient>({
319
+ * @RpgModule<RpgClient>({
327
320
  * sprite
328
321
  * })
322
+ * class RpgClientEngine {}
329
323
  * ```
330
324
  *
331
325
  * @prop {RpgSpriteHooks} [sprite]
@@ -336,18 +330,19 @@ export interface RpgClient {
336
330
  * Reference the scenes of the game. Here you can put your own class that inherits RpgSceneMap
337
331
  *
338
332
  * ```ts
339
- * import { RpgSceneMapHooks, RpgClient, defineModule } from '@rpgjs/client'
333
+ * import { RpgSceneMapHooks, RpgClient, RpgModule } from '@rpgjs/client'
340
334
  *
341
335
  * export const sceneMap: RpgSceneMapHooks = {
342
336
  *
343
337
  * }
344
338
  *
345
- * defineModule<RpgClient>({
339
+ * @RpgModule<RpgClient>({
346
340
  * scenes: {
347
341
  * // If you put the RpgSceneMap scene, Thhe key is called mandatory `map`
348
342
  * map: sceneMap
349
343
  * }
350
344
  * })
345
+ * class RpgClientEngine {}
351
346
  * ```
352
347
  *
353
348
  * @prop { [sceneName: string]: RpgSceneMapHooks } [scenes]
@@ -356,35 +351,9 @@ export interface RpgClient {
356
351
  scenes?: {
357
352
  map: RpgSceneMapHooks;
358
353
  };
359
- /**
360
- * Array containing the list of component animations
361
- * Each element defines a temporary component to display for animations like hits, effects, etc.
362
- *
363
- * ```ts
364
- * import { defineModule, RpgClient } from '@rpgjs/client'
365
- * import HitComponent from './hit.ce'
366
- * import ExplosionComponent from './explosion.ce'
367
- *
368
- * defineModule<RpgClient>({
369
- * componentAnimations: [
370
- * {
371
- * id: 'hit',
372
- * component: HitComponent
373
- * },
374
- * {
375
- * id: 'explosion',
376
- * component: ExplosionComponent
377
- * }
378
- * ]
379
- * })
380
- * ```
381
- *
382
- * @prop {Array<{id: string, component: ComponentFunction}>} [componentAnimations]
383
- * @memberof RpgClient
384
- * */
385
- componentAnimations?: {
354
+ effects?: {
386
355
  id: string;
387
- component: ComponentFunction;
356
+ component: any;
388
357
  }[];
389
358
  }
390
359
  export {};
@@ -1,8 +1,5 @@
1
1
  import { Context } from '@signe/di';
2
- import { AbstractWebsocket } from './services/AbstractSocket';
3
- import { AnimationManager } from './Game/AnimationManager';
4
- import { Observable } from 'rxjs';
5
- import * as PIXI from "pixi.js";
2
+ import { EffectManager } from './Game/EffectManager';
6
3
  export declare class RpgClientEngine<T = any> {
7
4
  context: Context;
8
5
  private guiService;
@@ -18,15 +15,10 @@ export declare class RpgClientEngine<T = any> {
18
15
  height: import('canvasengine').WritableSignal<string>;
19
16
  spritesheets: Map<string, any>;
20
17
  sounds: Map<string, any>;
21
- componentAnimations: any[];
18
+ effects: any[];
22
19
  particleSettings: {
23
20
  emitters: any[];
24
21
  };
25
- renderer: PIXI.Renderer;
26
- tick: Observable<number>;
27
- playerIdSignal: import('canvasengine').WritableSignal<string | null>;
28
- spriteComponentsBehind: import('canvasengine').WritableArraySignal<any[]>;
29
- spriteComponentsInFront: import('canvasengine').WritableArraySignal<any[]>;
30
22
  constructor(context: Context);
31
23
  start(): Promise<void>;
32
24
  private initListeners;
@@ -34,92 +26,18 @@ export declare class RpgClientEngine<T = any> {
34
26
  addSpriteSheet<T = any>(spritesheetClass: any, id?: string): any;
35
27
  addSound(sound: any, id?: string): any;
36
28
  addParticle(particle: any): any;
37
- /**
38
- * Add a component to render behind sprites
39
- * Components added with this method will be displayed with a lower z-index than the sprite
40
- *
41
- * @param component - The component to add behind sprites
42
- * @returns The added component
43
- *
44
- * @example
45
- * ```ts
46
- * // Add a shadow component behind all sprites
47
- * engine.addSpriteComponentBehind(ShadowComponent);
48
- * ```
49
- */
50
- addSpriteComponentBehind(component: any): any;
51
- /**
52
- * Add a component to render in front of sprites
53
- * Components added with this method will be displayed with a higher z-index than the sprite
54
- *
55
- * @param component - The component to add in front of sprites
56
- * @returns The added component
57
- *
58
- * @example
59
- * ```ts
60
- * // Add a health bar component in front of all sprites
61
- * engine.addSpriteComponentInFront(HealthBarComponent);
62
- * ```
63
- */
64
- addSpriteComponentInFront(component: any): any;
65
- /**
66
- * Add a component animation to the engine
67
- *
68
- * Component animations are temporary visual effects that can be displayed
69
- * on sprites or objects, such as hit indicators, spell effects, or status animations.
70
- *
71
- * @param componentAnimation - The component animation configuration
72
- * @param componentAnimation.id - Unique identifier for the animation
73
- * @param componentAnimation.component - The component function to render
74
- * @returns The added component animation configuration
75
- *
76
- * @example
77
- * ```ts
78
- * // Add a hit animation component
79
- * engine.addComponentAnimation({
80
- * id: 'hit',
81
- * component: HitComponent
82
- * });
83
- *
84
- * // Add an explosion effect component
85
- * engine.addComponentAnimation({
86
- * id: 'explosion',
87
- * component: ExplosionComponent
88
- * });
89
- * ```
90
- */
91
- addComponentAnimation(componentAnimation: {
29
+ addEffect(effect: {
92
30
  component: any;
93
31
  id: string;
94
32
  }): {
95
33
  component: any;
96
34
  id: string;
97
35
  };
98
- /**
99
- * Get a component animation by its ID
100
- *
101
- * Retrieves the EffectManager instance for a specific component animation,
102
- * which can be used to display the animation on sprites or objects.
103
- *
104
- * @param id - The unique identifier of the component animation
105
- * @returns The EffectManager instance for the animation
106
- * @throws Error if the component animation is not found
107
- *
108
- * @example
109
- * ```ts
110
- * // Get the hit animation and display it
111
- * const hitAnimation = engine.getComponentAnimation('hit');
112
- * hitAnimation.displayEffect({ text: "Critical!" }, player);
113
- * ```
114
- */
115
- getComponentAnimation(id: string): AnimationManager;
36
+ getEffect(id: string): EffectManager;
116
37
  processInput({ input }: {
117
38
  input: number;
118
39
  }): void;
119
40
  processAction({ action }: {
120
41
  action: number;
121
42
  }): void;
122
- get PIXI(): typeof PIXI;
123
- get socket(): AbstractWebsocket;
124
- get playerId(): string | null;
125
43
  }
@@ -0,0 +1,4 @@
1
+ export declare const PrebuiltEffects: {
2
+ Hit: any;
3
+ Animation: any;
4
+ };
@@ -1,3 +1,2 @@
1
1
  import { default as EventLayerComponent } from './scenes/event-layer.ce';
2
- import { default as CharacterComponent } from './character.ce';
3
- export { EventLayerComponent, CharacterComponent };
2
+ export { EventLayerComponent };
package/dist/index.d.ts CHANGED
@@ -8,6 +8,6 @@ export * from './services/loadMap';
8
8
  export * from './module';
9
9
  export * from './Gui/Gui';
10
10
  export * from './components/gui';
11
- export * from './components/animations';
11
+ export * from './components/effects';
12
12
  export * from './presets';
13
13
  export * from './components';
package/dist/index.js CHANGED
@@ -7,8 +7,7 @@ export { LoadMapService, LoadMapToken, provideLoadMap } from './index7.js';
7
7
  export { GlobalConfigToken, provideClientGlobalConfig, provideClientModules, provideGlobalConfig } from './index8.js';
8
8
  export { RpgGui } from './index9.js';
9
9
  export { PrebuiltGui } from './index10.js';
10
- export { PrebuiltComponentAnimations } from './index11.js';
10
+ export { PrebuiltEffects } from './index11.js';
11
11
  export { Presets } from './index12.js';
12
12
  export { default as EventLayerComponent } from './index13.js';
13
- export { default as CharacterComponent } from './index14.js';
14
13
  //# 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,4 +1,4 @@
1
- import component from './index23.js';
1
+ import component from './index22.js';
2
2
 
3
3
  const PrebuiltGui = {
4
4
  Dialogbox: component
package/dist/index11.js CHANGED
@@ -1,10 +1,10 @@
1
- import component$1 from './index24.js';
2
- import component from './index25.js';
1
+ import component$1 from './index23.js';
2
+ import component from './index24.js';
3
3
 
4
- const PrebuiltComponentAnimations = {
4
+ const PrebuiltEffects = {
5
5
  Hit: component$1,
6
6
  Animation: component
7
7
  };
8
8
 
9
- export { PrebuiltComponentAnimations };
9
+ export { PrebuiltEffects };
10
10
  //# sourceMappingURL=index11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index11.js","sources":["../src/components/animations/index.ts"],"sourcesContent":["import Hit from \"./hit.ce\";\nimport Animation from \"./animation.ce\";\n\nexport const PrebuiltComponentAnimations = {\n Hit,\n Animation\n}"],"names":["Hit","Animation"],"mappings":";;;AAGO,MAAM,2BAA8B,GAAA;AAAA,OACvCA,WAAA;AAAA,aACAC;AACJ;;;;"}
1
+ {"version":3,"file":"index11.js","sources":["../src/components/effects/index.ts"],"sourcesContent":["import Hit from \"./hit.ce\";\nimport Animation from \"./animation.ce\";\n\nexport const PrebuiltEffects = {\n Hit,\n Animation\n}"],"names":["Hit","Animation"],"mappings":";;;AAGO,MAAM,eAAkB,GAAA;AAAA,OAC3BA,WAAA;AAAA,aACAC;AACJ;;;;"}
package/dist/index12.js CHANGED
@@ -1,11 +1,7 @@
1
- import { AnimationSpritesheetPreset } from './index26.js';
2
- import { LPCSpritesheetPreset } from './index27.js';
3
- import { RMSpritesheet } from './index28.js';
1
+ import { RMSpritesheet } from './index25.js';
4
2
 
5
3
  const Presets = {
6
- RMSpritesheet,
7
- LPCSpritesheetPreset,
8
- AnimationSpritesheetPreset
4
+ RMSpritesheet
9
5
  };
10
6
 
11
7
  export { Presets };
@@ -1 +1 @@
1
- {"version":3,"file":"index12.js","sources":["../src/presets/index.ts"],"sourcesContent":["import { AnimationSpritesheetPreset } from \"./animation\";\nimport { LPCSpritesheetPreset } from \"./lpc\";\nimport { RMSpritesheet } from \"./rmspritesheet\";\n\nexport const Presets = {\n RMSpritesheet,\n LPCSpritesheetPreset,\n AnimationSpritesheetPreset\n}"],"names":[],"mappings":";;;;AAIO,MAAM,OAAU,GAAA;AAAA,EACnB,aAAA;AAAA,EACA,oBAAA;AAAA,EACA;AACJ;;;;"}
1
+ {"version":3,"file":"index12.js","sources":["../src/presets/index.ts"],"sourcesContent":["import { RMSpritesheet } from \"./rmspritesheet\";\n\nexport const Presets = {\n RMSpritesheet\n}"],"names":[],"mappings":";;AAEO,MAAM,OAAU,GAAA;AAAA,EACnB;AACJ;;;;"}
package/dist/index13.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { useProps, useDefineProps, h, Container, loop } from 'canvasengine';
2
2
  import { inject } from './index6.js';
3
3
  import { RpgClientEngine } from './index2.js';
4
- import component$1 from './index14.js';
4
+ import component$1 from './index35.js';
5
5
 
6
6
  function component($$props) {
7
7
  useProps($$props);
@@ -9,7 +9,7 @@ function component($$props) {
9
9
  var engine = inject(RpgClientEngine);
10
10
  var players = engine.sceneMap.players;
11
11
  var events = engine.sceneMap.events;
12
- let $this = h(Container, { sortableChildren: true }, [loop(events, (event, id) => h(component$1, { id: id, object: event })), loop(players, (player, id) => h(component$1, { id: id, object: player }))]);
12
+ let $this = h(Container, { sortableChildren: true }, [loop(events, (event, id) => h(component$1, { id: id, object: event, isMe: false })), loop(players, (player, id) => h(component$1, { id: id, object: player, isMe: true }))]);
13
13
  return $this
14
14
  }
15
15
 
@@ -1 +1 @@
1
- {"version":3,"file":"index13.js","sources":["../src/components/scenes/event-layer.ce"],"sourcesContent":["<Container sortableChildren={true}>\n @for ((event,id) of events) {\n <Character id={id} object={event} />\n }\n\n @for ((player,id) of players) {\n <Character id={id} object={player} />\n }\n</Container>\n\n<script>\n import { effect, signal } from 'canvasengine'\n import { inject } from \"../../core/inject\";\n import { RpgClientEngine } from \"../../RpgClientEngine\";\n import Character from \"../character.ce\";\n \n const engine = inject(RpgClientEngine);\n const players = engine.sceneMap.players\n const events = engine.sceneMap.events\n</script>"],"names":["Character"],"mappings":";;;;;AAQqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAA4B,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AAC5C,IAAI,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO;AACrC,IAAI,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC7B,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC,CAACA,WAAS,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,CAACA,WAAS,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC5M,QAAQ,OAAO;AACf;;;;"}
1
+ {"version":3,"file":"index13.js","sources":["../src/components/scenes/event-layer.ce"],"sourcesContent":["<Container sortableChildren={true}>\n @for ((event,id) of events) {\n <Character id={id} object={event} isMe={false} />\n }\n\n @for ((player,id) of players) {\n <Character id={id} object={player} isMe={true} />\n }\n</Container>\n\n<script>\n import { effect, signal, computed, mount } from 'canvasengine'\n import { inject } from \"../../core/inject\";\n import { RpgClientEngine } from \"../../RpgClientEngine\";\n import Character from \"../character.ce\";\n \n const engine = inject(RpgClientEngine);\n const players = engine.sceneMap.players\n const events = engine.sceneMap.events\n</script>"],"names":["Character"],"mappings":";;;;;AAQqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAA4B,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AAC5C,IAAI,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO;AACrC,IAAI,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC7B,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC,CAACA,WAAS,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,CAACA,WAAS,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACrO,QAAQ,OAAO;AACf;;;;"}