@vpmedia/phaser 1.95.0 → 1.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.json +9 -9
  3. package/src/phaser/core/animation.js +61 -56
  4. package/src/phaser/core/animation_manager.js +55 -55
  5. package/src/phaser/core/cache.js +154 -154
  6. package/src/phaser/core/device.js +2 -1
  7. package/src/phaser/core/device_util.js +27 -27
  8. package/src/phaser/core/dom.js +43 -43
  9. package/src/phaser/core/event_manager.js +63 -63
  10. package/src/phaser/core/factory.js +47 -47
  11. package/src/phaser/core/frame.js +30 -30
  12. package/src/phaser/core/frame_data.js +30 -28
  13. package/src/phaser/core/frame_util.js +8 -8
  14. package/src/phaser/core/game.js +34 -18
  15. package/src/phaser/core/loader.js +170 -170
  16. package/src/phaser/core/loader_parser.js +22 -22
  17. package/src/phaser/core/raf.js +1 -1
  18. package/src/phaser/core/scene.js +16 -10
  19. package/src/phaser/core/scene_manager.js +51 -43
  20. package/src/phaser/core/signal.js +56 -52
  21. package/src/phaser/core/sound.js +54 -54
  22. package/src/phaser/core/sound_manager.js +49 -49
  23. package/src/phaser/core/stage.js +16 -16
  24. package/src/phaser/core/time.js +30 -30
  25. package/src/phaser/core/timer.js +64 -64
  26. package/src/phaser/core/timer_event.js +9 -9
  27. package/src/phaser/core/tween.js +90 -90
  28. package/src/phaser/core/tween_data.js +30 -30
  29. package/src/phaser/core/tween_manager.js +29 -24
  30. package/src/phaser/core/world.js +4 -3
  31. package/src/phaser/display/bitmap_text.js +61 -54
  32. package/src/phaser/display/button.js +48 -47
  33. package/src/phaser/display/canvas/buffer.js +8 -8
  34. package/src/phaser/display/canvas/graphics.js +8 -8
  35. package/src/phaser/display/canvas/masker.js +5 -5
  36. package/src/phaser/display/canvas/pool.js +18 -18
  37. package/src/phaser/display/canvas/renderer.js +16 -16
  38. package/src/phaser/display/canvas/tinter.js +22 -22
  39. package/src/phaser/display/canvas/util.js +42 -42
  40. package/src/phaser/display/display_object.js +119 -108
  41. package/src/phaser/display/graphics.js +112 -112
  42. package/src/phaser/display/graphics_data.js +10 -10
  43. package/src/phaser/display/graphics_data_util.js +3 -3
  44. package/src/phaser/display/group.js +50 -50
  45. package/src/phaser/display/image.js +54 -50
  46. package/src/phaser/display/sprite_batch.js +2 -2
  47. package/src/phaser/display/sprite_util.js +19 -19
  48. package/src/phaser/display/text.js +212 -187
  49. package/src/phaser/display/webgl/abstract_filter.js +4 -4
  50. package/src/phaser/display/webgl/base_texture.js +9 -9
  51. package/src/phaser/display/webgl/blend_manager.js +7 -7
  52. package/src/phaser/display/webgl/earcut.js +95 -95
  53. package/src/phaser/display/webgl/earcut_node.js +4 -4
  54. package/src/phaser/display/webgl/fast_sprite_batch.js +15 -15
  55. package/src/phaser/display/webgl/filter_manager.js +9 -9
  56. package/src/phaser/display/webgl/filter_texture.js +10 -10
  57. package/src/phaser/display/webgl/graphics.js +37 -37
  58. package/src/phaser/display/webgl/graphics_data.js +4 -4
  59. package/src/phaser/display/webgl/mask_manager.js +6 -6
  60. package/src/phaser/display/webgl/render_texture.js +16 -16
  61. package/src/phaser/display/webgl/renderer.js +20 -20
  62. package/src/phaser/display/webgl/shader/complex.js +4 -4
  63. package/src/phaser/display/webgl/shader/fast.js +4 -4
  64. package/src/phaser/display/webgl/shader/normal.js +8 -8
  65. package/src/phaser/display/webgl/shader/primitive.js +4 -4
  66. package/src/phaser/display/webgl/shader/strip.js +4 -4
  67. package/src/phaser/display/webgl/shader_manager.js +9 -9
  68. package/src/phaser/display/webgl/sprite_batch.js +18 -18
  69. package/src/phaser/display/webgl/stencil_manager.js +16 -16
  70. package/src/phaser/display/webgl/texture.js +13 -13
  71. package/src/phaser/display/webgl/texture_util.js +8 -8
  72. package/src/phaser/display/webgl/util.js +25 -25
  73. package/src/phaser/geom/circle.js +69 -69
  74. package/src/phaser/geom/ellipse.js +28 -28
  75. package/src/phaser/geom/line.js +93 -93
  76. package/src/phaser/geom/matrix.js +54 -54
  77. package/src/phaser/geom/point.js +96 -96
  78. package/src/phaser/geom/polygon.js +22 -22
  79. package/src/phaser/geom/rectangle.js +132 -132
  80. package/src/phaser/geom/rounded_rectangle.js +12 -12
  81. package/src/phaser/geom/util/circle.js +33 -33
  82. package/src/phaser/geom/util/ellipse.js +5 -5
  83. package/src/phaser/geom/util/line.js +26 -26
  84. package/src/phaser/geom/util/matrix.js +8 -8
  85. package/src/phaser/geom/util/point.js +97 -97
  86. package/src/phaser/geom/util/polygon.js +4 -4
  87. package/src/phaser/geom/util/rectangle.js +74 -74
  88. package/src/phaser/geom/util/rounded_rectangle.js +4 -4
  89. package/src/phaser/util/math.js +81 -81
  90. package/types/phaser/core/animation.d.ts +61 -56
  91. package/types/phaser/core/animation.d.ts.map +1 -1
  92. package/types/phaser/core/animation_manager.d.ts +55 -55
  93. package/types/phaser/core/cache.d.ts +154 -154
  94. package/types/phaser/core/device.d.ts.map +1 -1
  95. package/types/phaser/core/dom.d.ts +43 -43
  96. package/types/phaser/core/event_manager.d.ts +63 -63
  97. package/types/phaser/core/factory.d.ts +47 -47
  98. package/types/phaser/core/frame.d.ts +30 -30
  99. package/types/phaser/core/frame_data.d.ts +28 -27
  100. package/types/phaser/core/frame_data.d.ts.map +1 -1
  101. package/types/phaser/core/game.d.ts +52 -19
  102. package/types/phaser/core/game.d.ts.map +1 -1
  103. package/types/phaser/core/loader.d.ts +170 -170
  104. package/types/phaser/core/loader_parser.d.ts.map +1 -1
  105. package/types/phaser/core/raf.d.ts +1 -1
  106. package/types/phaser/core/scene.d.ts +15 -9
  107. package/types/phaser/core/scene.d.ts.map +1 -1
  108. package/types/phaser/core/scene_manager.d.ts +51 -43
  109. package/types/phaser/core/scene_manager.d.ts.map +1 -1
  110. package/types/phaser/core/signal.d.ts +54 -51
  111. package/types/phaser/core/signal.d.ts.map +1 -1
  112. package/types/phaser/core/sound.d.ts +54 -54
  113. package/types/phaser/core/sound_manager.d.ts +49 -49
  114. package/types/phaser/core/stage.d.ts +10 -10
  115. package/types/phaser/core/time.d.ts +30 -30
  116. package/types/phaser/core/timer.d.ts +64 -64
  117. package/types/phaser/core/timer_event.d.ts +9 -9
  118. package/types/phaser/core/tween.d.ts +90 -90
  119. package/types/phaser/core/tween_data.d.ts +30 -30
  120. package/types/phaser/core/tween_manager.d.ts +29 -24
  121. package/types/phaser/core/tween_manager.d.ts.map +1 -1
  122. package/types/phaser/core/world.d.ts +4 -3
  123. package/types/phaser/core/world.d.ts.map +1 -1
  124. package/types/phaser/display/bitmap_text.d.ts +59 -52
  125. package/types/phaser/display/bitmap_text.d.ts.map +1 -1
  126. package/types/phaser/display/button.d.ts +47 -46
  127. package/types/phaser/display/button.d.ts.map +1 -1
  128. package/types/phaser/display/canvas/buffer.d.ts +8 -8
  129. package/types/phaser/display/canvas/renderer.d.ts +16 -16
  130. package/types/phaser/display/display_object.d.ts +119 -108
  131. package/types/phaser/display/display_object.d.ts.map +1 -1
  132. package/types/phaser/display/graphics.d.ts +101 -101
  133. package/types/phaser/display/graphics_data.d.ts +10 -10
  134. package/types/phaser/display/group.d.ts +47 -47
  135. package/types/phaser/display/image.d.ts +42 -40
  136. package/types/phaser/display/image.d.ts.map +1 -1
  137. package/types/phaser/display/text.d.ts +207 -184
  138. package/types/phaser/display/text.d.ts.map +1 -1
  139. package/types/phaser/display/webgl/abstract_filter.d.ts +4 -4
  140. package/types/phaser/display/webgl/base_texture.d.ts +9 -9
  141. package/types/phaser/display/webgl/blend_manager.d.ts +6 -6
  142. package/types/phaser/display/webgl/earcut.d.ts +95 -95
  143. package/types/phaser/display/webgl/earcut_node.d.ts +4 -4
  144. package/types/phaser/display/webgl/fast_sprite_batch.d.ts +15 -15
  145. package/types/phaser/display/webgl/filter_manager.d.ts +8 -8
  146. package/types/phaser/display/webgl/filter_texture.d.ts +10 -10
  147. package/types/phaser/display/webgl/graphics_data.d.ts +4 -4
  148. package/types/phaser/display/webgl/render_texture.d.ts +16 -16
  149. package/types/phaser/display/webgl/renderer.d.ts +20 -20
  150. package/types/phaser/display/webgl/shader/complex.d.ts +4 -4
  151. package/types/phaser/display/webgl/shader/fast.d.ts +4 -4
  152. package/types/phaser/display/webgl/shader/normal.d.ts +8 -8
  153. package/types/phaser/display/webgl/shader/primitive.d.ts +4 -4
  154. package/types/phaser/display/webgl/shader/strip.d.ts +4 -4
  155. package/types/phaser/display/webgl/shader_manager.d.ts +8 -8
  156. package/types/phaser/display/webgl/sprite_batch.d.ts +17 -17
  157. package/types/phaser/display/webgl/stencil_manager.d.ts +15 -15
  158. package/types/phaser/display/webgl/texture.d.ts +12 -12
  159. package/types/phaser/geom/circle.d.ts +69 -69
  160. package/types/phaser/geom/ellipse.d.ts +28 -28
  161. package/types/phaser/geom/line.d.ts +93 -93
  162. package/types/phaser/geom/matrix.d.ts +54 -54
  163. package/types/phaser/geom/point.d.ts +96 -96
  164. package/types/phaser/geom/polygon.d.ts +22 -22
  165. package/types/phaser/geom/rectangle.d.ts +132 -132
  166. package/types/phaser/geom/rounded_rectangle.d.ts +12 -12
  167. package/pnpm-workspace.yaml +0 -4
@@ -1,13 +1,13 @@
1
1
  export class Animation {
2
2
  /**
3
- * TBD.
4
- * @param {import('./game.js').Game} game - TBD.
5
- * @param {import('../display/image.js').Image} parent - TBD.
6
- * @param {string} name - TBD.
7
- * @param {import('./frame_data.js').FrameData} frameData - TBD.
8
- * @param {string[]|number[]} frames - TBD.
9
- * @param {number} frameRate - TBD.
10
- * @param {boolean} loop - TBD.
3
+ * Creates a new Animation instance.
4
+ * @param {import('./game.js').Game} game - The game instance this animation belongs to.
5
+ * @param {import('../display/image.js').Image} parent - The Image object that owns this animation.
6
+ * @param {string} name - The unique name of this animation.
7
+ * @param {import('./frame_data.js').FrameData} frameData - The FrameData object that contains the frames for this animation.
8
+ * @param {string[]|number[]} frames - An array of frame identifiers (names or indices) to use in this animation.
9
+ * @param {number} frameRate - The frame rate at which this animation should play (frames per second).
10
+ * @param {boolean} loop - Whether the animation should loop when it completes.
11
11
  */
12
12
  constructor(game: import("./game.js").Game, parent: import("../display/image.js").Image, name: string, frameData: import("./frame_data.js").FrameData, frames: string[] | number[], frameRate: number, loop?: boolean);
13
13
  /** @type {import('./game.js').Game} */
@@ -50,131 +50,136 @@ export class Animation {
50
50
  /** @type {boolean} */
51
51
  isReversed: boolean;
52
52
  /**
53
- * TBD.
54
- * @param {number} frameRate - TBD.
55
- * @param {boolean} loop - TBD.
56
- * @returns {Animation} TBD.
53
+ * Plays this animation.
54
+ * @param {number} frameRate - The new frame rate to use for this animation (if null, uses the original frame rate).
55
+ * @param {boolean} loop - Whether to loop this animation (if null, uses the original loop setting).
56
+ * @returns {Animation} This Animation instance for chaining.
57
57
  */
58
58
  play(frameRate?: number, loop?: boolean): Animation;
59
59
  /**
60
- * TBD.
60
+ * Sets whether this animation is currently paused.
61
+ * @param {boolean} value - True to pause the animation, false to resume it.
61
62
  */
62
63
  set paused(value: boolean);
63
64
  /**
64
- * TBD.
65
- * @returns {boolean} TBD.
65
+ * Gets whether this animation is currently paused.
66
+ * @returns {boolean} True if the animation is paused, false otherwise.
66
67
  */
67
68
  get paused(): boolean;
68
69
  _timeLastFrame: number;
69
70
  _timeNextFrame: number;
70
71
  /**
71
- * TBD.
72
+ * Restarts this animation from the beginning.
72
73
  */
73
74
  restart(): void;
74
75
  /**
75
- * TBD.
76
- * @returns {Animation} TBD.
76
+ * Reverses the direction of this animation.
77
+ * @returns {Animation} This Animation instance for chaining.
77
78
  */
78
79
  reverse(): Animation;
79
80
  /**
80
- * TBD.
81
+ * Sets whether this animation is currently reversed.
82
+ * @param {boolean} value - True to reverse the animation, false to normal direction.
81
83
  */
82
84
  set reversed(value: boolean);
83
85
  /**
84
- * TBD.
85
- * @returns {boolean} TBD.
86
+ * Gets whether this animation is currently reversed.
87
+ * @returns {boolean} True if the animation is reversed, false otherwise.
86
88
  */
87
89
  get reversed(): boolean;
88
90
  /**
89
- * TBD.
90
- * @returns {Animation} TBD.
91
+ * Reverses the animation direction once, then returns to normal direction.
92
+ * @returns {Animation} This Animation instance for chaining.
91
93
  */
92
94
  reverseOnce(): Animation;
93
95
  /**
94
- * TBD.
95
- * @param {string|number} frameId - TBD.
96
- * @param {boolean} useLocalFrameIndex - TBD.
96
+ * Sets the current frame of this animation.
97
+ * @param {string|number} frameId - The identifier (name or index) of the frame to set.
98
+ * @param {boolean} useLocalFrameIndex - If true, treats frameId as an index into the local frames array.
97
99
  */
98
100
  setFrame(frameId: string | number, useLocalFrameIndex?: boolean): void;
99
101
  /**
100
- * TBD.
101
- * @param {boolean} resetFrame - TBD.
102
- * @param {boolean} dispatchComplete - TBD.
102
+ * Stops this animation.
103
+ * @param {boolean} resetFrame - If true, resets to the first frame.
104
+ * @param {boolean} dispatchComplete - If true, dispatches the onComplete signal.
103
105
  */
104
106
  stop(resetFrame?: boolean, dispatchComplete?: boolean): void;
105
107
  /**
106
- * TBD.
108
+ * Called when the game is paused.
107
109
  */
108
110
  onPause(): void;
109
111
  /**
110
- * TBD.
112
+ * Called when the game is resumed.
111
113
  */
112
114
  onResume(): void;
113
115
  /**
114
- * TBD.
115
- * @returns {boolean} TBD.
116
+ * Updates this animation.
117
+ * @returns {boolean} True if the animation was updated, false otherwise.
116
118
  */
117
119
  update(): boolean;
118
120
  /**
119
- * TBD.
120
- * @param {boolean} signalUpdate - TBD.
121
- * @param {boolean} fromPlay - TBD.
122
- * @returns {boolean} TBD.
121
+ * Updates the current frame of this animation.
122
+ * @param {boolean} signalUpdate - Whether to signal the update event.
123
+ * @param {boolean} fromPlay - Whether this call is from play().
124
+ * @returns {boolean} True if the frame was updated, false otherwise.
123
125
  */
124
126
  updateCurrentFrame(signalUpdate: boolean, fromPlay?: boolean): boolean;
125
127
  /**
126
- * TBD.
127
- * @param {number} quantity - TBD.
128
+ * Advances the animation to the next frame(s).
129
+ * @param {number} quantity - The number of frames to advance by.
128
130
  */
129
131
  next(quantity?: number): void;
130
132
  /**
131
- * TBD.
132
- * @param {number} quantity - TBD.
133
+ * Moves the animation to the previous frame(s).
134
+ * @param {number} quantity - The number of frames to move back by.
133
135
  */
134
136
  previous(quantity?: number): void;
135
137
  /**
136
- * TBD.
137
- * @param {import('./frame_data.js').FrameData} frameData - TBD.
138
+ * Updates the frame data used by this animation.
139
+ * @param {import('./frame_data.js').FrameData} frameData - The new FrameData object to use.
138
140
  */
139
141
  updateFrameData(frameData: import("./frame_data.js").FrameData): void;
140
142
  /**
141
- * TBD.
143
+ * Destroys this animation and cleans up resources.
142
144
  */
143
145
  destroy(): void;
144
146
  /**
145
- * TBD.
147
+ * Completes this animation, setting it to the final frame.
146
148
  */
147
149
  complete(): void;
148
150
  /**
149
- * TBD.
150
- * @returns {number} TBD.
151
+ * Gets the total number of frames in this animation.
152
+ * @returns {number} The total number of frames.
151
153
  */
152
154
  get frameTotal(): number;
153
155
  /**
154
- * TBD.
156
+ * Sets the current frame index.
157
+ * @param {number} value - The new frame index to set.
155
158
  */
156
159
  set frame(value: number);
157
160
  /**
158
- * TBD.
159
- * @returns {number} TBD.
161
+ * Gets the current frame index.
162
+ * @returns {number} The current frame index.
160
163
  */
161
164
  get frame(): number;
162
165
  /**
163
- * TBD.
166
+ * Sets the animation speed (frame rate).
167
+ * @param {number} value - The new frame rate in frames per second.
164
168
  */
165
169
  set speed(value: number);
166
170
  /**
167
- * TBD.
168
- * @returns {number} TBD.
171
+ * Gets the current animation speed (frame rate).
172
+ * @returns {number} The frame rate in frames per second.
169
173
  */
170
174
  get speed(): number;
171
175
  /**
172
- * TBD.
176
+ * Sets whether the update signal is enabled.
177
+ * @param {boolean} value - True to enable the update signal, false to disable it.
173
178
  */
174
179
  set enableUpdate(value: boolean);
175
180
  /**
176
- * TBD.
177
- * @returns {boolean} TBD.
181
+ * Gets whether the update signal is enabled.
182
+ * @returns {boolean} True if the update signal is enabled, false otherwise.
178
183
  */
179
184
  get enableUpdate(): boolean;
180
185
  }
@@ -1 +1 @@
1
- {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/animation.js"],"names":[],"mappings":"AAEA;IACE;;;;;;;;;OASG;IACH,kBARW,OAAO,WAAW,EAAE,IAAI,UACxB,OAAO,qBAAqB,EAAE,KAAK,QACnC,MAAM,aACN,OAAO,iBAAiB,EAAE,SAAS,UACnC,MAAM,EAAE,GAAC,MAAM,EAAE,aACjB,MAAM,SACN,OAAO,EA8CjB;IA3CC,uCAAuC;IACvC,MADW,OAAO,WAAW,EAAE,IAAI,CACnB;IAChB,6CAAqB;IACrB,kDAAkD;IAClD,YADW,OAAO,iBAAiB,EAAE,SAAS,CACnB;IAC3B,qBAAqB;IACrB,MADW,MAAM,CACD;IAChB,eAAiB;IAEjB,qBAAqB;IACrB,OADW,MAAM,CACY;IAC7B,sBAAsB;IACtB,MADW,OAAO,CACF;IAChB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,sBAAsB;IACtB,YADW,OAAO,CACK;IACvB,sBAAsB;IACtB,WADW,OAAO,CACI;IACtB,sBAAsB;IACtB,UADW,OAAO,CACG;IACrB,qBAAqB;IACrB,iBADW,MAAM,CACO;IACxB,qBAAqB;IACrB,aADW,MAAM,CACG;IACpB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,yCAA4E;IAC5E,qBAAqB;IACrB,SADW,MAAM,CACU;IAC3B,qBAAqB;IACrB,UADW,MAAM,CACG;IACpB,qBAAqB;IACrB,YADW,MAAM,CACa;IAC9B,qBAAqB;IACrB,QADW,MAAM,CACS;IAC1B,sBAAsB;IACtB,YADW,OAAO,CACK;IAMzB;;;;;OAKG;IACH,iBAJW,MAAM,SACN,OAAO,GACL,SAAS,CAwBrB;IAiSD;;OAEG;IACH,kBATa,OAAO,EAgBnB;IAlBD;;;OAGG;IACH,cAFa,OAAO,CAInB;IAxSC,uBAAyC;IACzC,uBAAsD;IAUxD;;OAEG;IACH,gBAaC;IAED;;;OAGG;IACH,WAFa,SAAS,CAKrB;IA0RD;;OAEG;IACH,oBATa,OAAO,EAWnB;IAbD;;;OAGG;IACH,gBAFa,OAAO,CAInB;IAtRD;;;OAGG;IACH,eAFa,SAAS,CAKrB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GAAC,MAAM,uBACb,OAAO,QA6BjB;IAED;;;;OAIG;IACH,kBAHW,OAAO,qBACP,OAAO,QAgBjB;IAED;;OAEG;IACH,gBAIC;IAED;;OAEG;IACH,iBAIC;IAED;;;OAGG;IACH,UAFa,OAAO,CAuDnB;IAED;;;;;OAKG;IACH,iCAJW,OAAO,aACP,OAAO,GACL,OAAO,CAmBnB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAehB;IAED;;;OAGG;IACH,oBAFW,MAAM,QAehB;IAED;;;OAGG;IACH,2BAFW,OAAO,iBAAiB,EAAE,SAAS,QAO7C;IAED;;OAEG;IACH,gBAmBC;IAED;;OAEG;IACH,iBAQC;IAqCD;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAaD;;OAEG;IACH,iBAZa,MAAM,EAqBlB;IAvBD;;;OAGG;IACH,aAFa,MAAM,CAOlB;IAwBD;;OAEG;IACH,iBATa,MAAM,EAalB;IAfD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAmBD;;OAEG;IACH,wBATa,OAAO,EAgBnB;IAlBD;;;OAGG;IACH,oBAFa,OAAO,CAInB;CAaF;uBAxdsB,aAAa"}
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/animation.js"],"names":[],"mappings":"AAEA;IACE;;;;;;;;;OASG;IACH,kBARW,OAAO,WAAW,EAAE,IAAI,UACxB,OAAO,qBAAqB,EAAE,KAAK,QACnC,MAAM,aACN,OAAO,iBAAiB,EAAE,SAAS,UACnC,MAAM,EAAE,GAAC,MAAM,EAAE,aACjB,MAAM,SACN,OAAO,EA8CjB;IA3CC,uCAAuC;IACvC,MADW,OAAO,WAAW,EAAE,IAAI,CACnB;IAChB,6CAAqB;IACrB,kDAAkD;IAClD,YADW,OAAO,iBAAiB,EAAE,SAAS,CACnB;IAC3B,qBAAqB;IACrB,MADW,MAAM,CACD;IAChB,eAAiB;IAEjB,qBAAqB;IACrB,OADW,MAAM,CACY;IAC7B,sBAAsB;IACtB,MADW,OAAO,CACF;IAChB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,sBAAsB;IACtB,YADW,OAAO,CACK;IACvB,sBAAsB;IACtB,WADW,OAAO,CACI;IACtB,sBAAsB;IACtB,UADW,OAAO,CACG;IACrB,qBAAqB;IACrB,iBADW,MAAM,CACO;IACxB,qBAAqB;IACrB,aADW,MAAM,CACG;IACpB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,yCAA4E;IAC5E,qBAAqB;IACrB,SADW,MAAM,CACU;IAC3B,qBAAqB;IACrB,UADW,MAAM,CACG;IACpB,qBAAqB;IACrB,YADW,MAAM,CACa;IAC9B,qBAAqB;IACrB,QADW,MAAM,CACS;IAC1B,sBAAsB;IACtB,YADW,OAAO,CACK;IAMzB;;;;;OAKG;IACH,iBAJW,MAAM,SACN,OAAO,GACL,SAAS,CAwBrB;IAiSD;;;OAGG;IACH,kBAFW,OAAO,EASjB;IAnBD;;;OAGG;IACH,cAFa,OAAO,CAInB;IAxSC,uBAAyC;IACzC,uBAAsD;IAUxD;;OAEG;IACH,gBAaC;IAED;;;OAGG;IACH,WAFa,SAAS,CAKrB;IA2RD;;;OAGG;IACH,oBAFW,OAAO,EAIjB;IAdD;;;OAGG;IACH,gBAFa,OAAO,CAInB;IAvRD;;;OAGG;IACH,eAFa,SAAS,CAKrB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GAAC,MAAM,uBACb,OAAO,QA6BjB;IAED;;;;OAIG;IACH,kBAHW,OAAO,qBACP,OAAO,QAgBjB;IAED;;OAEG;IACH,gBAIC;IAED;;OAEG;IACH,iBAIC;IAED;;;OAGG;IACH,UAFa,OAAO,CAuDnB;IAED;;;;;OAKG;IACH,iCAJW,OAAO,aACP,OAAO,GACL,OAAO,CAmBnB;IAED;;;OAGG;IACH,gBAFW,MAAM,QAehB;IAED;;;OAGG;IACH,oBAFW,MAAM,QAehB;IAED;;;OAGG;IACH,2BAFW,OAAO,iBAAiB,EAAE,SAAS,QAO7C;IAED;;OAEG;IACH,gBAmBC;IAED;;OAEG;IACH,iBAQC;IAuCD;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAaD;;;OAGG;IACH,iBAFW,MAAM,EAWhB;IAxBD;;;OAGG;IACH,aAFa,MAAM,CAOlB;IAyBD;;;OAGG;IACH,iBAFW,MAAM,EAMhB;IAhBD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAoBD;;;OAGG;IACH,wBAFW,OAAO,EASjB;IAnBD;;;OAGG;IACH,oBAFa,OAAO,CAInB;CAcF;uBA7dsB,aAAa"}
@@ -1,7 +1,7 @@
1
1
  export class AnimationManager {
2
2
  /**
3
- * TBD.
4
- * @param {import('../display/image.js').Image} sprite - TBD.
3
+ * Creates a new AnimationManager instance.
4
+ * @param {import('../display/image.js').Image} sprite - Reference to the parent Sprite.
5
5
  */
6
6
  constructor(sprite: import("../display/image.js").Image);
7
7
  sprite: import("../display/image.js").Image;
@@ -21,119 +21,119 @@ export class AnimationManager {
21
21
  /** @type {number[]} */
22
22
  _outputFrames: number[];
23
23
  /**
24
- * TBD.
24
+ * Destroys the AnimationManager and cleans up resources.
25
25
  */
26
26
  destroy(): void;
27
27
  /**
28
- * TBD.
29
- * @param {import('./frame_data.js').FrameData} frameData - TBD.
30
- * @param {string|number} frame - TBD.
31
- * @returns {boolean} TBD.
28
+ * Loads frame data into the AnimationManager.
29
+ * @param {import('./frame_data.js').FrameData} frameData - The FrameData to load.
30
+ * @param {string|number} frame - The frame index or name to set as current.
31
+ * @returns {boolean} True if the frame data was loaded successfully, false otherwise.
32
32
  */
33
33
  loadFrameData(frameData: import("./frame_data.js").FrameData, frame: string | number): boolean;
34
34
  /**
35
- * TBD.
35
+ * Sets the current frame index.
36
36
  */
37
37
  set frame(value: number);
38
38
  /**
39
- * TBD.
40
- * @returns {number} TBD.
39
+ * Gets the current frame index.
40
+ * @returns {number} The current frame index.
41
41
  */
42
42
  get frame(): number;
43
43
  /**
44
- * TBD.
44
+ * Sets the current frame by name.
45
45
  */
46
46
  set frameName(value: string);
47
47
  /**
48
- * TBD.
49
- * @returns {string} TBD.
48
+ * Gets the current frame name.
49
+ * @returns {string} The current frame name, or null if no frame is set.
50
50
  */
51
51
  get frameName(): string;
52
52
  /**
53
- * TBD.
54
- * @param {import('./frame_data.js').FrameData} frameData - TBD.
55
- * @param {string|number} frame - TBD.
56
- * @returns {boolean} TBD.
53
+ * Copies frame data into the AnimationManager.
54
+ * @param {import('./frame_data.js').FrameData} frameData - The FrameData to copy.
55
+ * @param {string|number} frame - The frame index or name to set as current.
56
+ * @returns {boolean} True if the frame data was copied successfully, false otherwise.
57
57
  */
58
58
  copyFrameData(frameData: import("./frame_data.js").FrameData, frame: string | number): boolean;
59
59
  /**
60
- * TBD.
61
- * @param {string} name - TBD.
62
- * @param {number[] | string[] | null | undefined} frameList - TBD.
63
- * @param {number} frameRate - TBD.
64
- * @param {boolean} loop - TBD.
65
- * @param {boolean | undefined} useNumericIndex - TBD.
66
- * @returns {Animation} TBD.
60
+ * Adds a new animation to the AnimationManager.
61
+ * @param {string} name - The name of the animation.
62
+ * @param {number[] | string[] | null | undefined} frameList - The list of frames to include in the animation.
63
+ * @param {number} frameRate - The frame rate of the animation (frames per second).
64
+ * @param {boolean} loop - Whether the animation should loop.
65
+ * @param {boolean | undefined} useNumericIndex - Whether to treat frameList as numeric indices.
66
+ * @returns {Animation} The created Animation object.
67
67
  */
68
68
  add(name: string, frameList: number[] | string[] | null | undefined, frameRate?: number, loop?: boolean, useNumericIndex?: boolean | undefined): Animation;
69
69
  /**
70
- * TBD.
71
- * @param {string[] | number[]} frames - TBD.
72
- * @param {boolean} useNumericIndex - TBD.
73
- * @returns {boolean} TBD.
70
+ * Validates a list of frames against the current frame data.
71
+ * @param {string[] | number[]} frames - The list of frames to validate.
72
+ * @param {boolean} useNumericIndex - Whether to treat frameList as numeric indices.
73
+ * @returns {boolean} True if all frames are valid, false otherwise.
74
74
  */
75
75
  validateFrames(frames: string[] | number[], useNumericIndex?: boolean): boolean;
76
76
  /**
77
- * TBD.
78
- * @param {string} name - TBD.
79
- * @param {number} frameRate - TBD.
80
- * @param {boolean} loop - TBD.
81
- * @returns {Animation} TBD.
77
+ * Plays an animation by name.
78
+ * @param {string} name - The name of the animation to play.
79
+ * @param {number} frameRate - The frame rate (frames per second) to play at, or null to use the animation's default.
80
+ * @param {boolean} loop - Whether the animation should loop, or null to use the animation's default.
81
+ * @returns {Animation} The Animation object that was played, or null if not found.
82
82
  */
83
83
  play(name: string, frameRate?: number, loop?: boolean): Animation;
84
84
  /**
85
- * TBD.
86
- * @param {string} name - TBD.
87
- * @param {boolean} resetFrame - TBD.
85
+ * Stops an animation by name.
86
+ * @param {string} name - The name of the animation to stop, or null to stop the current animation.
87
+ * @param {boolean} resetFrame - Whether to reset the frame to the first frame of the animation.
88
88
  */
89
89
  stop(name?: string, resetFrame?: boolean): void;
90
90
  /**
91
- * TBD.
92
- * @returns {boolean} TBD.
91
+ * Updates the animation manager state.
92
+ * @returns {boolean} True if an animation was updated, false otherwise.
93
93
  */
94
94
  update(): boolean;
95
95
  /**
96
- * TBD.
97
- * @param {number} quantity - TBD.
96
+ * Advances the current animation by a specified number of frames.
97
+ * @param {number} quantity - The number of frames to advance by.
98
98
  */
99
99
  next(quantity: number): void;
100
100
  /**
101
- * TBD.
102
- * @param {number} quantity - TBD.
101
+ * Moves the current animation back by a specified number of frames.
102
+ * @param {number} quantity - The number of frames to move back by.
103
103
  */
104
104
  previous(quantity: number): void;
105
105
  /**
106
- * TBD.
107
- * @param {string} name - TBD.
108
- * @returns {Animation} TBD.
106
+ * Gets an animation by name.
107
+ * @param {string} name - The name of the animation to retrieve.
108
+ * @returns {Animation} The Animation object, or null if not found.
109
109
  */
110
110
  getAnimation(name: string): Animation;
111
111
  /**
112
- * TBD.
112
+ * Refreshes the current frame texture (not implemented).
113
113
  */
114
114
  refreshFrame(): void;
115
115
  /**
116
- * TBD.
117
- * @returns {import('./frame_data.js').FrameData} TBD.
116
+ * Gets the frame data used by this AnimationManager.
117
+ * @returns {import('./frame_data.js').FrameData} The FrameData object.
118
118
  */
119
119
  get frameData(): import("./frame_data.js").FrameData;
120
120
  /**
121
- * TBD.
122
- * @returns {number} TBD.
121
+ * Gets the total number of frames in the frame data.
122
+ * @returns {number} The total number of frames.
123
123
  */
124
124
  get frameTotal(): number;
125
125
  /**
126
- * TBD.
126
+ * Sets the paused state of the current animation.
127
127
  */
128
128
  set paused(value: boolean);
129
129
  /**
130
- * TBD.
131
- * @returns {boolean} TBD.
130
+ * Gets the paused state of the current animation.
131
+ * @returns {boolean} True if the current animation is paused, false otherwise.
132
132
  */
133
133
  get paused(): boolean;
134
134
  /**
135
- * TBD.
136
- * @returns {string} TBD.
135
+ * Gets the name of the current animation.
136
+ * @returns {string} The name of the current animation, or null if no animation is active.
137
137
  */
138
138
  get name(): string;
139
139
  _frameIndex: number;