@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,9 +1,9 @@
1
1
  export class Tween {
2
2
  /**
3
- * TBD.
4
- * @param {import('../display/display_object.js').DisplayObject} target - TBD.
5
- * @param {import('./game.js').Game} game - TBD.
6
- * @param {import('./tween_manager.js').TweenManager} manager - TBD.
3
+ * Creates a new Tween instance.
4
+ * @param {import('../display/display_object.js').DisplayObject} target - The object to tween.
5
+ * @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
6
+ * @param {import('./tween_manager.js').TweenManager} manager - Reference to the Tween Manager.
7
7
  */
8
8
  constructor(target: import("../display/display_object.js").DisplayObject, game: import("./game.js").Game, manager: import("./tween_manager.js").TweenManager);
9
9
  game: import("./game.js").Game;
@@ -47,158 +47,158 @@ export class Tween {
47
47
  /** @type {boolean} */
48
48
  _hasStarted: boolean;
49
49
  /**
50
- * TBD.
51
- * @param {object} properties - TBD.
52
- * @param {number} duration - TBD.
53
- * @param {string | Function} ease - TBD.
54
- * @param {boolean} autoStart - TBD.
55
- * @param {number} delay - TBD.
56
- * @param {number} repeat - TBD.
57
- * @param {boolean} yoyo - TBD.
58
- * @returns {Tween} TBD.
50
+ * Adds a tween to the timeline that animates properties to their target values.
51
+ * @param {object} properties - The properties to tween and their target values.
52
+ * @param {number} duration - The duration of the tween in milliseconds.
53
+ * @param {string | Function} ease - The easing function to use.
54
+ * @param {boolean} autoStart - Whether to start the tween immediately.
55
+ * @param {number} delay - The delay before starting the tween in milliseconds.
56
+ * @param {number} repeat - Number of times to repeat the tween.
57
+ * @param {boolean} yoyo - Whether to reverse the tween on repeat.
58
+ * @returns {Tween} This Tween object for chaining.
59
59
  */
60
60
  to(properties: object, duration?: number, ease?: string | Function, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Tween;
61
61
  /**
62
- * TBD.
63
- * @param {object} properties - TBD.
64
- * @param {number} duration - TBD.
65
- * @param {string | Function} ease - TBD.
66
- * @param {boolean} autoStart - TBD.
67
- * @param {number} delay - TBD.
68
- * @param {number} repeat - TBD.
69
- * @param {boolean} yoyo - TBD.
70
- * @returns {Tween} TBD.
62
+ * Adds a tween to the timeline that animates properties from their current values.
63
+ * @param {object} properties - The properties to tween and their target values.
64
+ * @param {number} duration - The duration of the tween in milliseconds.
65
+ * @param {string | Function} ease - The easing function to use.
66
+ * @param {boolean} autoStart - Whether to start the tween immediately.
67
+ * @param {number} delay - The delay before starting the tween in milliseconds.
68
+ * @param {number} repeat - Number of times to repeat the tween.
69
+ * @param {boolean} yoyo - Whether to reverse the tween on repeat.
70
+ * @returns {Tween} This Tween object for chaining.
71
71
  */
72
72
  from(properties: object, duration?: number, ease?: string | Function, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Tween;
73
73
  /**
74
- * TBD.
75
- * @param {number} index - TBD.
76
- * @returns {Tween} TBD.
74
+ * Starts the tween timeline from a specific index.
75
+ * @param {number} index - The index to start from in the timeline.
76
+ * @returns {Tween} This Tween object for chaining.
77
77
  */
78
78
  start(index?: number): Tween;
79
79
  /**
80
- * TBD.
81
- * @param {boolean} complete - TBD.
82
- * @returns {Tween} TBD.
80
+ * Stops the tween and optionally completes it.
81
+ * @param {boolean} complete - Whether to dispatch the complete event.
82
+ * @returns {Tween} This Tween object for chaining.
83
83
  */
84
84
  stop(complete?: boolean): Tween;
85
85
  /**
86
- * TBD.
87
- * @param {string} property - TBD.
88
- * @param {object} value - TBD.
89
- * @param {number} index - TBD.
90
- * @returns {Tween} TBD.
86
+ * Updates a property in the tween data.
87
+ * @param {string} property - The property name to update.
88
+ * @param {object} value - The new value for the property.
89
+ * @param {number} index - The index in the timeline to update.
90
+ * @returns {Tween} This Tween object for chaining.
91
91
  */
92
92
  updateTweenData(property: string, value: object, index?: number): Tween;
93
93
  /**
94
- * TBD.
95
- * @param {number} duration - TBD.
96
- * @param {number} index - TBD.
97
- * @returns {Tween} TBD.
94
+ * Sets a delay for a specific timeline entry.
95
+ * @param {number} duration - The delay in milliseconds.
96
+ * @param {number} index - The index in the timeline to apply the delay to.
97
+ * @returns {Tween} This Tween object for chaining.
98
98
  */
99
99
  delay(duration: number, index: number): Tween;
100
100
  /**
101
- * TBD.
102
- * @param {number} total - TBD.
103
- * @param {number} repeatDelay - TBD.
104
- * @param {number} index - TBD.
105
- * @returns {Tween} TBD.
101
+ * Sets how many times to repeat the tween.
102
+ * @param {number} total - The number of times to repeat (-1 for infinite).
103
+ * @param {number} repeatDelay - Delay between repeats in milliseconds.
104
+ * @param {number} index - The index in the timeline to apply the repeat to.
105
+ * @returns {Tween} This Tween object for chaining.
106
106
  */
107
107
  repeat(total: number, repeatDelay?: number, index?: number): Tween;
108
108
  /**
109
- * TBD.
110
- * @param {number} duration - TBD.
111
- * @param {number} index - TBD.
112
- * @returns {Tween} TBD.
109
+ * Sets the repeat delay for a specific timeline entry.
110
+ * @param {number} duration - The delay between repeats in milliseconds.
111
+ * @param {number} index - The index in the timeline to apply the delay to.
112
+ * @returns {Tween} This Tween object for chaining.
113
113
  */
114
114
  repeatDelay(duration: number, index: number): Tween;
115
115
  /**
116
- * TBD.
117
- * @param {boolean} enable - TBD.
118
- * @param {number} yoyoDelay - TBD.
119
- * @param {number} index - TBD.
120
- * @returns {Tween} TBD.
116
+ * Enables or disables yoyo behavior for a timeline entry.
117
+ * @param {boolean} enable - Whether to enable yoyo behavior.
118
+ * @param {number} yoyoDelay - Delay between yoyo cycles in milliseconds.
119
+ * @param {number} index - The index in the timeline to apply yoyo to.
120
+ * @returns {Tween} This Tween object for chaining.
121
121
  */
122
122
  yoyo(enable: boolean, yoyoDelay?: number, index?: number): Tween;
123
123
  /**
124
- * TBD.
125
- * @param {number} duration - TBD.
126
- * @param {number} index - TBD.
127
- * @returns {Tween} TBD.
124
+ * Sets the yoyo delay for a specific timeline entry.
125
+ * @param {number} duration - The delay between yoyo cycles in milliseconds.
126
+ * @param {number} index - The index in the timeline to apply the delay to.
127
+ * @returns {Tween} This Tween object for chaining.
128
128
  */
129
129
  yoyoDelay(duration: number, index: number): Tween;
130
130
  /**
131
- * TBD.
132
- * @param {string|Function} ease - TBD.
133
- * @param {number} index - TBD.
134
- * @returns {Tween} TBD.
131
+ * Sets the easing function for a timeline entry.
132
+ * @param {string|Function} ease - The easing function to use.
133
+ * @param {number} index - The index in the timeline to apply easing to.
134
+ * @returns {Tween} This Tween object for chaining.
135
135
  */
136
136
  easing(ease: string | Function, index: number): Tween;
137
137
  /**
138
- * TBD.
139
- * @param {Function} interpolation - TBD.
140
- * @param {object} context - TBD.
141
- * @param {number} index - TBD.
142
- * @returns {Tween} TBD.
138
+ * Sets the interpolation function for a timeline entry.
139
+ * @param {Function} interpolation - The interpolation function to use.
140
+ * @param {object} context - The context in which to call the interpolation function.
141
+ * @param {number} index - The index in the timeline to apply interpolation to.
142
+ * @returns {Tween} This Tween object for chaining.
143
143
  */
144
144
  interpolation(interpolation: Function, context?: object, index?: number): Tween;
145
145
  /**
146
- * TBD.
147
- * @param {number} total - TBD.
148
- * @returns {Tween} TBD.
146
+ * Sets how many times to repeat all timeline entries.
147
+ * @param {number} total - The number of times to repeat (-1 for infinite).
148
+ * @returns {Tween} This Tween object for chaining.
149
149
  */
150
150
  repeatAll(total?: number): Tween;
151
151
  /**
152
- * TBD.
153
- * @param {...any} args - TBD.
154
- * @returns {Tween} TBD.
152
+ * Chains one or more tweens to this tween.
153
+ * @param {...any} args - The tweens to chain.
154
+ * @returns {Tween} This Tween object for chaining.
155
155
  */
156
156
  chain(...args: any[]): Tween;
157
157
  /**
158
- * TBD.
159
- * @param {boolean} value - TBD.
160
- * @returns {Tween} TBD.
158
+ * Sets whether the tween should loop infinitely.
159
+ * @param {boolean} value - Whether to loop infinitely.
160
+ * @returns {Tween} This Tween object for chaining.
161
161
  */
162
162
  loop(value?: boolean): Tween;
163
163
  /**
164
- * TBD.
165
- * @param {Function} callback - TBD.
166
- * @param {object} callbackContext - TBD.
167
- * @returns {Tween} TBD.
164
+ * Sets a callback to be called when the tween updates.
165
+ * @param {Function} callback - The callback function to call.
166
+ * @param {object} callbackContext - The context in which to call the callback.
167
+ * @returns {Tween} This Tween object for chaining.
168
168
  */
169
169
  onUpdateCallback(callback: Function, callbackContext: object): Tween;
170
170
  /**
171
- * TBD.
171
+ * Pauses the tween.
172
172
  */
173
173
  pause(): void;
174
174
  /**
175
- * TBD.
175
+ * Internal method to pause the tween.
176
176
  */
177
177
  _pause(): void;
178
178
  /**
179
- * TBD.
179
+ * Resumes the tween.
180
180
  */
181
181
  resume(): void;
182
182
  /**
183
- * TBD.
183
+ * Internal method to resume the tween.
184
184
  */
185
185
  _resume(): void;
186
186
  /**
187
- * TBD.
188
- * @param {number} time - TBD.
189
- * @returns {boolean} TBD.
187
+ * Updates the tween state at a given time.
188
+ * @param {number} time - The current game time.
189
+ * @returns {boolean} True if the tween should continue running, false if it's complete.
190
190
  */
191
191
  update(time: number): boolean;
192
192
  /**
193
- * TBD.
194
- * @param {number} frameRate - TBD.
195
- * @param {object[]} data - TBD.
196
- * @returns {object[]} TBD.
193
+ * Generates animation data for a given frame rate.
194
+ * @param {number} frameRate - The target frame rate.
195
+ * @param {object[]} data - The array to store the generated data in.
196
+ * @returns {object[]} The populated data array.
197
197
  */
198
198
  generateData(frameRate?: number, data?: object[]): object[];
199
199
  /**
200
- * TBD.
201
- * @returns {number} TBD.
200
+ * Gets the total duration of all timeline entries.
201
+ * @returns {number} The total duration in milliseconds.
202
202
  */
203
203
  get totalDuration(): number;
204
204
  }
@@ -1,7 +1,7 @@
1
1
  export class TweenData {
2
2
  /**
3
- * TBD.
4
- * @param {import('./tween.js').Tween} parent - TBD.
3
+ * Creates a new TweenData instance.
4
+ * @param {import('./tween.js').Tween} parent - The parent Tween instance.
5
5
  */
6
6
  constructor(parent: import("./tween.js").Tween);
7
7
  parent: import("./tween.js").Tween;
@@ -29,53 +29,53 @@ export class TweenData {
29
29
  isRunning: boolean;
30
30
  isFrom: boolean;
31
31
  /**
32
- * TBD.
33
- * @param {object} properties - TBD.
34
- * @param {number} duration - TBD.
35
- * @param {(number) => number} ease - TBD.
36
- * @param {number} delay - TBD.
37
- * @param {number} repeat - TBD.
38
- * @param {boolean} yoyo - TBD.
39
- * @returns {TweenData} TBD.
32
+ * Sets the target properties to tween to.
33
+ * @param {object} properties - The properties to tween to.
34
+ * @param {number} duration - The duration of the tween in milliseconds.
35
+ * @param {(number) => number} ease - The easing function to use.
36
+ * @param {number} delay - The delay before starting the tween in milliseconds.
37
+ * @param {number} repeat - The number of times to repeat the tween (0 = no repeat, -1 = infinite).
38
+ * @param {boolean} yoyo - Whether to reverse the tween on each repeat.
39
+ * @returns {TweenData} This TweenData object for chaining.
40
40
  */
41
41
  to(properties: object, duration: number, ease: (number: any) => number, delay: number, repeat: number, yoyo: boolean): TweenData;
42
42
  /**
43
- * TBD.
44
- * @param {object} properties - TBD.
45
- * @param {number} duration - TBD.
46
- * @param {(number) => number} ease - TBD.
47
- * @param {number} delay - TBD.
48
- * @param {number} repeat - TBD.
49
- * @param {boolean} yoyo - TBD.
50
- * @returns {TweenData} TBD.
43
+ * Sets the target properties to tween from (in reverse).
44
+ * @param {object} properties - The properties to tween from.
45
+ * @param {number} duration - The duration of the tween in milliseconds.
46
+ * @param {(number) => number} ease - The easing function to use.
47
+ * @param {number} delay - The delay before starting the tween in milliseconds.
48
+ * @param {number} repeat - The number of times to repeat the tween (0 = no repeat, -1 = infinite).
49
+ * @param {boolean} yoyo - Whether to reverse the tween on each repeat.
50
+ * @returns {TweenData} This TweenData object for chaining.
51
51
  */
52
52
  from(properties: object, duration: number, ease: (number: any) => number, delay: number, repeat: number, yoyo: boolean): TweenData;
53
53
  /**
54
- * TBD.
55
- * @returns {TweenData} TBD.
54
+ * Starts the tween.
55
+ * @returns {TweenData} This TweenData object for chaining.
56
56
  */
57
57
  start(): TweenData;
58
58
  yoyoCounter: number;
59
59
  /**
60
- * TBD.
61
- * @returns {TweenData} TBD.
60
+ * Loads the tween values from the parent object.
61
+ * @returns {TweenData} This TweenData object for chaining.
62
62
  */
63
63
  loadValues(): TweenData;
64
64
  /**
65
- * TBD.
66
- * @param {number} time - TBD.
67
- * @returns {number} TBD.
65
+ * Updates the tween at a given time.
66
+ * @param {number} time - The current time in milliseconds.
67
+ * @returns {number} The tween status (TWEEN_PENDING, TWEEN_RUNNING, or TWEEN_COMPLETE).
68
68
  */
69
69
  update(time: number): number;
70
70
  /**
71
- * TBD.
72
- * @param {number} frameRate - TBD.
73
- * @returns {object[]} TBD.
71
+ * Generates an array of tween data points for a given frame rate.
72
+ * @param {number} frameRate - The frame rate to generate data for.
73
+ * @returns {object[]} An array of tween data points.
74
74
  */
75
75
  generateData(frameRate: number): object[];
76
76
  /**
77
- * TBD.
78
- * @returns {number} TBD.
77
+ * Handles tween repetition logic.
78
+ * @returns {number} The tween status (TWEEN_LOOPED or TWEEN_COMPLETE).
79
79
  */
80
80
  repeat(): number;
81
81
  }
@@ -1,7 +1,7 @@
1
1
  export class TweenManager {
2
2
  /**
3
- * TBD.
4
- * @param {import('./game.js').Game} game - TBD.
3
+ * Creates a new TweenManager instance.
4
+ * @param {import('./game.js').Game} game - The game instance this manager belongs to.
5
5
  */
6
6
  constructor(game: import("./game.js").Game);
7
7
  game: import("./game.js").Game;
@@ -14,61 +14,66 @@ export class TweenManager {
14
14
  [key: string]: (k: number) => number;
15
15
  };
16
16
  /**
17
- * TBD.
18
- * @returns {Tween[]} TBD.
17
+ * Get all tweens managed by this manager.
18
+ * @returns {Tween[]} An array of all active tweens.
19
19
  */
20
20
  getAll(): Tween[];
21
21
  /**
22
- * TBD.
22
+ * Remove all tweens from the manager.
23
+ * This method removes all active and pending tweens.
23
24
  */
24
25
  removeAll(): void;
25
26
  /**
26
- * TBD.
27
- * @param {object} obj - TBD.
28
- * @param {object[]} children - TBD.
27
+ * Remove tweens associated with an object or its children.
28
+ * @param {object} obj - The object to remove tweens from.
29
+ * @param {object[]} children - Optional array of child objects to remove tweens from.
29
30
  */
30
31
  removeFrom(obj: object, children?: object[]): void;
31
32
  /**
32
- * TBD.
33
- * @param {Tween} tween - TBD.
33
+ * Add a tween to the manager.
34
+ * @param {Tween} tween - The tween to add.
34
35
  */
35
36
  add(tween: Tween): void;
36
37
  /**
37
- * TBD.
38
- * @param {object} object - TBD.
39
- * @returns {Tween} TBD.
38
+ * Create a new tween for an object.
39
+ * @param {object} object - The object to create a tween for.
40
+ * @returns {Tween} The created Tween object.
40
41
  */
41
42
  create(object: object): Tween;
42
43
  /**
43
- * TBD.
44
- * @param {Tween | null | undefined} tween - TBD.
44
+ * Remove a tween from the manager.
45
+ * @param {Tween | null | undefined} tween - The tween to remove.
45
46
  */
46
47
  remove(tween: Tween | null | undefined): void;
47
48
  /**
48
- * TBD.
49
- * @returns {boolean} TBD.
49
+ * Update all tweens managed by this manager.
50
+ * @returns {boolean} True if any tweens were updated, false otherwise.
50
51
  */
51
52
  update(): boolean;
52
53
  /**
53
- * TBD.
54
- * @param {object} object - TBD.
55
- * @returns {boolean} TBD.
54
+ * Check if an object is currently being tweened.
55
+ * @param {object} object - The object to check.
56
+ * @returns {boolean} True if the object is being tweened, false otherwise.
56
57
  */
57
58
  isTweening(object: object): boolean;
58
59
  /**
59
- * TBD.
60
+ * Pause all tweens managed by this manager.
61
+ * This method pauses all active tweens.
60
62
  */
61
63
  _pauseAll(): void;
62
64
  /**
63
- * TBD.
65
+ * Resume all tweens managed by this manager.
66
+ * This method resumes all paused tweens.
64
67
  */
65
68
  _resumeAll(): void;
66
69
  /**
67
- * TBD.
70
+ * Pause all tweens managed by this manager.
71
+ * This method pauses all active tweens.
68
72
  */
69
73
  pauseAll(): void;
70
74
  /**
71
- * TBD.
75
+ * Resume all tweens managed by this manager.
76
+ * This method resumes all paused tweens.
72
77
  */
73
78
  resumeAll(): void;
74
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tween_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/tween_manager.js"],"names":[],"mappings":"AAoCA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAuDlC;IApDC,+BAAgB;IAChB,sBAAsB;IACtB,SADW,KAAK,EAAE,CACD;IACjB,sBAAsB;IACtB,MADW,KAAK,EAAE,CACJ;IACd,qDAAqD;IACrD,SADW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;KAAC,CA2ChD;IAMH;;;OAGG;IACH,UAFa,KAAK,EAAE,CAInB;IAED;;OAEG;IACH,kBAKC;IAED;;;;OAIG;IACH,gBAHW,MAAM,aACN,MAAM,EAAE,QAyBlB;IAED;;;OAGG;IACH,WAFW,KAAK,QAKf;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,KAAK,CAIjB;IAED;;;OAGG;IACH,cAFW,KAAK,GAAG,IAAI,GAAG,SAAS,QAYlC;IAED;;;OAGG;IACH,UAFa,OAAO,CAuBnB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;OAEG;IACH,kBAIC;IAED;;OAEG;IACH,mBAIC;IAED;;OAEG;IACH,iBAIC;IAED;;OAEG;IACH,kBAIC;CACF;sBAxPqB,YAAY"}
1
+ {"version":3,"file":"tween_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/tween_manager.js"],"names":[],"mappings":"AAoCA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAuDlC;IApDC,+BAAgB;IAChB,sBAAsB;IACtB,SADW,KAAK,EAAE,CACD;IACjB,sBAAsB;IACtB,MADW,KAAK,EAAE,CACJ;IACd,qDAAqD;IACrD,SADW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;KAAC,CA2ChD;IAMH;;;OAGG;IACH,UAFa,KAAK,EAAE,CAInB;IAED;;;OAGG;IACH,kBAKC;IAED;;;;OAIG;IACH,gBAHW,MAAM,aACN,MAAM,EAAE,QAyBlB;IAED;;;OAGG;IACH,WAFW,KAAK,QAKf;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,KAAK,CAIjB;IAED;;;OAGG;IACH,cAFW,KAAK,GAAG,IAAI,GAAG,SAAS,QAYlC;IAED;;;OAGG;IACH,UAFa,OAAO,CAuBnB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,kBAIC;IAED;;;OAGG;IACH,mBAIC;IAED;;;OAGG;IACH,iBAIC;IAED;;;OAGG;IACH,kBAIC;CACF;sBA7PqB,YAAY"}
@@ -1,11 +1,12 @@
1
1
  export class World extends Group {
2
2
  /**
3
- * TBD.
4
- * @param {import('./game.js').Game} game - TBD.
3
+ * Creates a new World instance.
4
+ * @param {import('./game.js').Game} game - The game instance this world belongs to.
5
5
  */
6
6
  constructor(game: import("./game.js").Game);
7
7
  /**
8
- * TBD.
8
+ * Initialize the world.
9
+ * This method is called when the game boots and sets up the world.
9
10
  */
10
11
  boot(): void;
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/world.js"],"names":[],"mappings":"AAEA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAIlC;IAED;;OAEG;IACH,aAEC;CACF;sBAjBqB,qBAAqB"}
1
+ {"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/world.js"],"names":[],"mappings":"AAEA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAIlC;IAED;;;OAGG;IACH,aAEC;CACF;sBAlBqB,qBAAqB"}