@vpmedia/phaser 1.95.0 → 1.97.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 (184) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/package.json +10 -10
  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 +68 -52
  21. package/src/phaser/core/signal.test.js +37 -0
  22. package/src/phaser/core/sound.js +54 -54
  23. package/src/phaser/core/sound_manager.js +49 -49
  24. package/src/phaser/core/stage.js +16 -16
  25. package/src/phaser/core/time.js +30 -30
  26. package/src/phaser/core/timer.js +79 -64
  27. package/src/phaser/core/timer_event.js +9 -9
  28. package/src/phaser/core/tween.js +90 -90
  29. package/src/phaser/core/tween_data.js +30 -30
  30. package/src/phaser/core/tween_manager.js +29 -24
  31. package/src/phaser/core/world.js +4 -3
  32. package/src/phaser/display/bitmap_text.js +61 -54
  33. package/src/phaser/display/button.js +48 -47
  34. package/src/phaser/display/canvas/buffer.js +8 -8
  35. package/src/phaser/display/canvas/graphics.js +8 -8
  36. package/src/phaser/display/canvas/masker.js +5 -5
  37. package/src/phaser/display/canvas/pool.js +18 -18
  38. package/src/phaser/display/canvas/renderer.js +16 -16
  39. package/src/phaser/display/canvas/tinter.js +22 -22
  40. package/src/phaser/display/canvas/util.js +42 -42
  41. package/src/phaser/display/display_object.js +119 -108
  42. package/src/phaser/display/graphics.js +112 -112
  43. package/src/phaser/display/graphics_data.js +10 -10
  44. package/src/phaser/display/graphics_data_util.js +3 -3
  45. package/src/phaser/display/group.js +50 -50
  46. package/src/phaser/display/image.js +54 -50
  47. package/src/phaser/display/sprite_batch.js +2 -2
  48. package/src/phaser/display/sprite_util.js +19 -19
  49. package/src/phaser/display/text.js +212 -187
  50. package/src/phaser/display/webgl/abstract_filter.js +4 -4
  51. package/src/phaser/display/webgl/base_texture.js +9 -9
  52. package/src/phaser/display/webgl/blend_manager.js +7 -7
  53. package/src/phaser/display/webgl/earcut.js +95 -95
  54. package/src/phaser/display/webgl/earcut_node.js +4 -4
  55. package/src/phaser/display/webgl/fast_sprite_batch.js +15 -15
  56. package/src/phaser/display/webgl/filter_manager.js +9 -9
  57. package/src/phaser/display/webgl/filter_texture.js +10 -10
  58. package/src/phaser/display/webgl/graphics.js +37 -37
  59. package/src/phaser/display/webgl/graphics_data.js +4 -4
  60. package/src/phaser/display/webgl/mask_manager.js +6 -6
  61. package/src/phaser/display/webgl/render_texture.js +16 -16
  62. package/src/phaser/display/webgl/renderer.js +20 -20
  63. package/src/phaser/display/webgl/shader/complex.js +4 -4
  64. package/src/phaser/display/webgl/shader/fast.js +4 -4
  65. package/src/phaser/display/webgl/shader/normal.js +8 -8
  66. package/src/phaser/display/webgl/shader/primitive.js +4 -4
  67. package/src/phaser/display/webgl/shader/strip.js +4 -4
  68. package/src/phaser/display/webgl/shader_manager.js +9 -9
  69. package/src/phaser/display/webgl/sprite_batch.js +18 -18
  70. package/src/phaser/display/webgl/stencil_manager.js +16 -16
  71. package/src/phaser/display/webgl/texture.js +13 -13
  72. package/src/phaser/display/webgl/texture_util.js +8 -8
  73. package/src/phaser/display/webgl/util.js +25 -25
  74. package/src/phaser/geom/circle.js +69 -69
  75. package/src/phaser/geom/circle.test.js +1 -0
  76. package/src/phaser/geom/ellipse.js +28 -28
  77. package/src/phaser/geom/ellipse.test.js +1 -0
  78. package/src/phaser/geom/line.js +93 -93
  79. package/src/phaser/geom/line.test.js +1 -0
  80. package/src/phaser/geom/matrix.js +54 -54
  81. package/src/phaser/geom/matrix.test.js +1 -0
  82. package/src/phaser/geom/point.js +96 -96
  83. package/src/phaser/geom/point.test.js +1 -0
  84. package/src/phaser/geom/polygon.js +22 -22
  85. package/src/phaser/geom/rectangle.js +132 -132
  86. package/src/phaser/geom/rectangle.test.js +1 -0
  87. package/src/phaser/geom/rounded_rectangle.js +12 -12
  88. package/src/phaser/geom/rounded_rectangle.test.js +1 -0
  89. package/src/phaser/geom/util/circle.js +33 -33
  90. package/src/phaser/geom/util/circle.test.js +1 -0
  91. package/src/phaser/geom/util/ellipse.js +5 -5
  92. package/src/phaser/geom/util/ellipse.test.js +1 -0
  93. package/src/phaser/geom/util/line.js +26 -26
  94. package/src/phaser/geom/util/line.test.js +1 -0
  95. package/src/phaser/geom/util/matrix.js +8 -8
  96. package/src/phaser/geom/util/matrix.test.js +1 -0
  97. package/src/phaser/geom/util/point.js +97 -97
  98. package/src/phaser/geom/util/point.test.js +1 -0
  99. package/src/phaser/geom/util/polygon.js +4 -4
  100. package/src/phaser/geom/util/polygon.test.js +1 -0
  101. package/src/phaser/geom/util/rectangle.js +74 -74
  102. package/src/phaser/geom/util/rectangle.test.js +1 -0
  103. package/src/phaser/geom/util/rounded_rectangle.js +4 -4
  104. package/src/phaser/geom/util/rounded_rectangle.test.js +1 -0
  105. package/src/phaser/util/math.js +81 -81
  106. package/src/phaser/util/math.test.js +1 -0
  107. package/types/phaser/core/animation.d.ts +61 -56
  108. package/types/phaser/core/animation.d.ts.map +1 -1
  109. package/types/phaser/core/animation_manager.d.ts +55 -55
  110. package/types/phaser/core/cache.d.ts +154 -154
  111. package/types/phaser/core/device.d.ts.map +1 -1
  112. package/types/phaser/core/dom.d.ts +43 -43
  113. package/types/phaser/core/event_manager.d.ts +63 -63
  114. package/types/phaser/core/factory.d.ts +47 -47
  115. package/types/phaser/core/frame.d.ts +30 -30
  116. package/types/phaser/core/frame_data.d.ts +28 -27
  117. package/types/phaser/core/frame_data.d.ts.map +1 -1
  118. package/types/phaser/core/game.d.ts +52 -19
  119. package/types/phaser/core/game.d.ts.map +1 -1
  120. package/types/phaser/core/loader.d.ts +170 -170
  121. package/types/phaser/core/loader_parser.d.ts.map +1 -1
  122. package/types/phaser/core/raf.d.ts +1 -1
  123. package/types/phaser/core/scene.d.ts +15 -9
  124. package/types/phaser/core/scene.d.ts.map +1 -1
  125. package/types/phaser/core/scene_manager.d.ts +51 -43
  126. package/types/phaser/core/scene_manager.d.ts.map +1 -1
  127. package/types/phaser/core/signal.d.ts +54 -51
  128. package/types/phaser/core/signal.d.ts.map +1 -1
  129. package/types/phaser/core/sound.d.ts +54 -54
  130. package/types/phaser/core/sound_manager.d.ts +49 -49
  131. package/types/phaser/core/stage.d.ts +10 -10
  132. package/types/phaser/core/time.d.ts +30 -30
  133. package/types/phaser/core/timer.d.ts +64 -64
  134. package/types/phaser/core/timer_event.d.ts +9 -9
  135. package/types/phaser/core/tween.d.ts +90 -90
  136. package/types/phaser/core/tween_data.d.ts +30 -30
  137. package/types/phaser/core/tween_manager.d.ts +29 -24
  138. package/types/phaser/core/tween_manager.d.ts.map +1 -1
  139. package/types/phaser/core/world.d.ts +4 -3
  140. package/types/phaser/core/world.d.ts.map +1 -1
  141. package/types/phaser/display/bitmap_text.d.ts +59 -52
  142. package/types/phaser/display/bitmap_text.d.ts.map +1 -1
  143. package/types/phaser/display/button.d.ts +47 -46
  144. package/types/phaser/display/button.d.ts.map +1 -1
  145. package/types/phaser/display/canvas/buffer.d.ts +8 -8
  146. package/types/phaser/display/canvas/renderer.d.ts +16 -16
  147. package/types/phaser/display/display_object.d.ts +119 -108
  148. package/types/phaser/display/display_object.d.ts.map +1 -1
  149. package/types/phaser/display/graphics.d.ts +101 -101
  150. package/types/phaser/display/graphics_data.d.ts +10 -10
  151. package/types/phaser/display/group.d.ts +47 -47
  152. package/types/phaser/display/image.d.ts +42 -40
  153. package/types/phaser/display/image.d.ts.map +1 -1
  154. package/types/phaser/display/text.d.ts +207 -184
  155. package/types/phaser/display/text.d.ts.map +1 -1
  156. package/types/phaser/display/webgl/abstract_filter.d.ts +4 -4
  157. package/types/phaser/display/webgl/base_texture.d.ts +9 -9
  158. package/types/phaser/display/webgl/blend_manager.d.ts +6 -6
  159. package/types/phaser/display/webgl/earcut.d.ts +95 -95
  160. package/types/phaser/display/webgl/earcut_node.d.ts +4 -4
  161. package/types/phaser/display/webgl/fast_sprite_batch.d.ts +15 -15
  162. package/types/phaser/display/webgl/filter_manager.d.ts +8 -8
  163. package/types/phaser/display/webgl/filter_texture.d.ts +10 -10
  164. package/types/phaser/display/webgl/graphics_data.d.ts +4 -4
  165. package/types/phaser/display/webgl/render_texture.d.ts +16 -16
  166. package/types/phaser/display/webgl/renderer.d.ts +20 -20
  167. package/types/phaser/display/webgl/shader/complex.d.ts +4 -4
  168. package/types/phaser/display/webgl/shader/fast.d.ts +4 -4
  169. package/types/phaser/display/webgl/shader/normal.d.ts +8 -8
  170. package/types/phaser/display/webgl/shader/primitive.d.ts +4 -4
  171. package/types/phaser/display/webgl/shader/strip.d.ts +4 -4
  172. package/types/phaser/display/webgl/shader_manager.d.ts +8 -8
  173. package/types/phaser/display/webgl/sprite_batch.d.ts +17 -17
  174. package/types/phaser/display/webgl/stencil_manager.d.ts +15 -15
  175. package/types/phaser/display/webgl/texture.d.ts +12 -12
  176. package/types/phaser/geom/circle.d.ts +69 -69
  177. package/types/phaser/geom/ellipse.d.ts +28 -28
  178. package/types/phaser/geom/line.d.ts +93 -93
  179. package/types/phaser/geom/matrix.d.ts +54 -54
  180. package/types/phaser/geom/point.d.ts +96 -96
  181. package/types/phaser/geom/polygon.d.ts +22 -22
  182. package/types/phaser/geom/rectangle.d.ts +132 -132
  183. package/types/phaser/geom/rounded_rectangle.d.ts +12 -12
  184. package/pnpm-workspace.yaml +0 -4
@@ -1,9 +1,9 @@
1
1
  export class Graphics extends DisplayObject {
2
2
  /**
3
- * TBD.
4
- * @param {import('../core/game.js').Game} game - TBD.
5
- * @param {number} x - TBD.
6
- * @param {number} y - TBD.
3
+ * Creates a new Graphics object.
4
+ * @param {import('../core/game.js').Game} game - The game instance.
5
+ * @param {number} x - The x coordinate of the graphics object.
6
+ * @param {number} y - The y coordinate of the graphics object.
7
7
  */
8
8
  constructor(game: import("../core/game.js").Game, x?: number, y?: number);
9
9
  /** @type {number} */
@@ -40,171 +40,171 @@ export class Graphics extends DisplayObject {
40
40
  /** @type {boolean} */
41
41
  cachedSpriteDirty: boolean;
42
42
  /**
43
- * TBD.
44
- * @param {number} lineWidth - TBD.
45
- * @param {number} color - TBD.
46
- * @param {number} alpha - TBD.
47
- * @returns {Graphics} TBD.
43
+ * Sets the line style for subsequent drawing operations.
44
+ * @param {number} lineWidth - The width of the line to draw.
45
+ * @param {number} color - The color of the line to draw.
46
+ * @param {number} alpha - The alpha (transparency) of the line to draw.
47
+ * @returns {Graphics} This Graphics object for chaining.
48
48
  */
49
49
  lineStyle(lineWidth?: number, color?: number, alpha?: number): Graphics;
50
50
  lineAlpha: number;
51
51
  /**
52
- * TBD.
53
- * @param {number} x - TBD.
54
- * @param {number} y - TBD.
55
- * @returns {Graphics} TBD.
52
+ * Moves the drawing cursor to the specified point.
53
+ * @param {number} x - The x coordinate to move to.
54
+ * @param {number} y - The y coordinate to move to.
55
+ * @returns {Graphics} This Graphics object for chaining.
56
56
  */
57
57
  moveTo(x: number, y: number): Graphics;
58
58
  /**
59
- * TBD.
60
- * @param {number} x - TBD.
61
- * @param {number} y - TBD.
62
- * @returns {Graphics} TBD.
59
+ * Draws a line from the current drawing position to the specified point.
60
+ * @param {number} x - The x coordinate to draw to.
61
+ * @param {number} y - The y coordinate to draw to.
62
+ * @returns {Graphics} This Graphics object for chaining.
63
63
  */
64
64
  lineTo(x: number, y: number): Graphics;
65
65
  /**
66
- * TBD.
67
- * @param {number} cpX - TBD.
68
- * @param {number} cpY - TBD.
69
- * @param {number} toX - TBD.
70
- * @param {number} toY - TBD.
71
- * @returns {Graphics} TBD.
66
+ * Draws a quadratic curve from the current position to the specified point.
67
+ * @param {number} cpX - The x coordinate of the control point.
68
+ * @param {number} cpY - The y coordinate of the control point.
69
+ * @param {number} toX - The x coordinate to draw to.
70
+ * @param {number} toY - The y coordinate to draw to.
71
+ * @returns {Graphics} This Graphics object for chaining.
72
72
  */
73
73
  quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): Graphics;
74
74
  /**
75
- * TBD.
76
- * @param {number} cpX - TBD.
77
- * @param {number} cpY - TBD.
78
- * @param {number} cpX2 - TBD.
79
- * @param {number} cpY2 - TBD.
80
- * @param {number} toX - TBD.
81
- * @param {number} toY - TBD.
82
- * @returns {Graphics} TBD.
75
+ * Draws a cubic Bezier curve from the current position to the specified point.
76
+ * @param {number} cpX - The x coordinate of the first control point.
77
+ * @param {number} cpY - The y coordinate of the first control point.
78
+ * @param {number} cpX2 - The x coordinate of the second control point.
79
+ * @param {number} cpY2 - The y coordinate of the second control point.
80
+ * @param {number} toX - The x coordinate to draw to.
81
+ * @param {number} toY - The y coordinate to draw to.
82
+ * @returns {Graphics} This Graphics object for chaining.
83
83
  */
84
84
  bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): Graphics;
85
85
  /**
86
- * TBD.
87
- * @param {number} x1 - TBD.
88
- * @param {number} y1 - TBD.
89
- * @param {number} x2 - TBD.
90
- * @param {number} y2 - TBD.
91
- * @param {number} radius - TBD.
92
- * @returns {Graphics} TBD.
86
+ * Draws an arc from the current position to the specified point.
87
+ * @param {number} x1 - The x coordinate of the starting point.
88
+ * @param {number} y1 - The y coordinate of the starting point.
89
+ * @param {number} x2 - The x coordinate of the end point.
90
+ * @param {number} y2 - The y coordinate of the end point.
91
+ * @param {number} radius - The radius of the arc.
92
+ * @returns {Graphics} This Graphics object for chaining.
93
93
  */
94
94
  arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics;
95
95
  /**
96
- * TBD.
97
- * @param {number} cx - TBD.
98
- * @param {number} cy - TBD.
99
- * @param {number} radius - TBD.
100
- * @param {number} startAngle - TBD.
101
- * @param {number} endAngle - TBD.
102
- * @param {boolean} anticlockwise - TBD.
103
- * @param {number} segments - TBD.
104
- * @returns {Graphics} TBD.
96
+ * Draws an arc with the specified center, radius, and angles.
97
+ * @param {number} cx - The x coordinate of the center point.
98
+ * @param {number} cy - The y coordinate of the center point.
99
+ * @param {number} radius - The radius of the arc.
100
+ * @param {number} startAngle - The starting angle in radians.
101
+ * @param {number} endAngle - The ending angle in radians.
102
+ * @param {boolean} anticlockwise - Whether to draw the arc anticlockwise.
103
+ * @param {number} segments - The number of segments to use for drawing the arc.
104
+ * @returns {Graphics} This Graphics object for chaining.
105
105
  */
106
106
  arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, segments?: number): Graphics;
107
107
  /**
108
- * TBD.
109
- * @param {number} color - TBD.
110
- * @param {number} alpha - TBD.
111
- * @returns {Graphics} TBD.
108
+ * Begins filling with the specified color and alpha.
109
+ * @param {number} color - The fill color to use.
110
+ * @param {number} alpha - The fill alpha (transparency) to use.
111
+ * @returns {Graphics} This Graphics object for chaining.
112
112
  */
113
113
  beginFill(color?: number, alpha?: number): Graphics;
114
114
  filling: boolean;
115
115
  fillColor: number;
116
116
  /**
117
- * TBD.
118
- * @returns {Graphics} TBD.
117
+ * Ends the current fill operation.
118
+ * @returns {Graphics} This Graphics object for chaining.
119
119
  */
120
120
  endFill(): Graphics;
121
121
  /**
122
- * TBD.
123
- * @param {number} x - TBD.
124
- * @param {number} y - TBD.
125
- * @param {number} width - TBD.
126
- * @param {number} height - TBD.
127
- * @returns {Graphics} TBD.
122
+ * Draws a rectangle with the specified properties.
123
+ * @param {number} x - The x coordinate of the rectangle.
124
+ * @param {number} y - The y coordinate of the rectangle.
125
+ * @param {number} width - The width of the rectangle.
126
+ * @param {number} height - The height of the rectangle.
127
+ * @returns {Graphics} This Graphics object for chaining.
128
128
  */
129
129
  drawRect(x: number, y: number, width: number, height: number): Graphics;
130
130
  /**
131
- * TBD.
132
- * @param {number} x - TBD.
133
- * @param {number} y - TBD.
134
- * @param {number} width - TBD.
135
- * @param {number} height - TBD.
136
- * @param {number} radius - TBD.
137
- * @returns {Graphics} TBD.
131
+ * Draws a rounded rectangle with the specified properties.
132
+ * @param {number} x - The x coordinate of the rectangle.
133
+ * @param {number} y - The y coordinate of the rectangle.
134
+ * @param {number} width - The width of the rectangle.
135
+ * @param {number} height - The height of the rectangle.
136
+ * @param {number} radius - The radius of the rounded corners.
137
+ * @returns {Graphics} This Graphics object for chaining.
138
138
  */
139
139
  drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): Graphics;
140
140
  /**
141
- * TBD.
142
- * @param {number} x - TBD.
143
- * @param {number} y - TBD.
144
- * @param {number} diameter - TBD.
145
- * @returns {Graphics} TBD.
141
+ * Draws a circle with the specified properties.
142
+ * @param {number} x - The x coordinate of the center point.
143
+ * @param {number} y - The y coordinate of the center point.
144
+ * @param {number} diameter - The diameter of the circle.
145
+ * @returns {Graphics} This Graphics object for chaining.
146
146
  */
147
147
  drawCircle(x: number, y: number, diameter: number): Graphics;
148
148
  /**
149
- * TBD.
150
- * @param {number} x - TBD.
151
- * @param {number} y - TBD.
152
- * @param {number} width - TBD.
153
- * @param {number} height - TBD.
154
- * @returns {Graphics} TBD.
149
+ * Draws an ellipse with the specified properties.
150
+ * @param {number} x - The x coordinate of the center point.
151
+ * @param {number} y - The y coordinate of the center point.
152
+ * @param {number} width - The width of the ellipse.
153
+ * @param {number} height - The height of the ellipse.
154
+ * @returns {Graphics} This Graphics object for chaining.
155
155
  */
156
156
  drawEllipse(x: number, y: number, width: number, height: number): Graphics;
157
157
  /**
158
- * TBD.
159
- * @param {Polygon} path - TBD.
160
- * @returns {Graphics} TBD.
158
+ * Draws a polygon with the specified path.
159
+ * @param {Polygon} path - The polygon to draw.
160
+ * @returns {Graphics} This Graphics object for chaining.
161
161
  */
162
162
  drawPolygon(path: Polygon): Graphics;
163
163
  /**
164
- * TBD.
165
- * @returns {Graphics} TBD.
164
+ * Clears all graphics data.
165
+ * @returns {Graphics} This Graphics object for chaining.
166
166
  */
167
167
  clear(): Graphics;
168
168
  clearDirty: boolean;
169
169
  _prevTint: any;
170
170
  /**
171
- * TBD.
172
- * @param {import('../geom/matrix.js').Matrix} matrix - TBD.
173
- * @returns {Rectangle} TBD.
171
+ * Gets the bounds of the graphics object.
172
+ * @param {import('../geom/matrix.js').Matrix} matrix - The transformation matrix to use.
173
+ * @returns {Rectangle} The bounds rectangle of the graphics object.
174
174
  */
175
175
  getBounds(matrix?: import("../geom/matrix.js").Matrix): Rectangle;
176
176
  /**
177
- * TBD.
178
- * @param {Point} point - TBD.
179
- * @param {Point} tempPoint - TBD.
180
- * @returns {boolean} TBD.
177
+ * Checks if the graphics object contains a point.
178
+ * @param {Point} point - The point to check.
179
+ * @param {Point} tempPoint - A temporary point object to use.
180
+ * @returns {boolean} True if the graphics object contains the point, otherwise false.
181
181
  */
182
182
  containsPoint(point: Point, tempPoint: Point): boolean;
183
183
  /**
184
- * TBD.
184
+ * Updates the local bounds of the graphics object.
185
185
  */
186
186
  updateLocalBounds(): void;
187
187
  /**
188
- * TBD.
188
+ * Updates the cached sprite texture.
189
189
  */
190
190
  updateCachedSpriteTexture(): void;
191
191
  /**
192
- * TBD.
193
- * @param {object} shape - TBD.
194
- * @returns {GraphicsData} TBD.
192
+ * Draws a shape with the specified properties.
193
+ * @param {object} shape - The shape to draw.
194
+ * @returns {GraphicsData} The graphics data for the drawn shape.
195
195
  */
196
196
  drawShape(shape: object): GraphicsData;
197
197
  /**
198
- * TBD.
199
- * @param {Point[]} points - TBD.
200
- * @param {boolean} cull - TBD.
198
+ * Draws a triangle with the specified points and culling options.
199
+ * @param {Point[]} points - The points of the triangle.
200
+ * @param {boolean} cull - Whether to perform backface culling.
201
201
  */
202
202
  drawTriangle(points: Point[], cull?: boolean): void;
203
203
  /**
204
- * TBD.
205
- * @param {number[]|Point[]} vertices - TBD.
206
- * @param {number[]} indices - TBD.
207
- * @param {boolean} cull - TBD.
204
+ * Draws triangles with the specified vertices and indices.
205
+ * @param {number[]|Point[]} vertices - The vertices of the triangles.
206
+ * @param {number[]} indices - The indices of the vertices to use.
207
+ * @param {boolean} cull - Whether to perform backface culling.
208
208
  */
209
209
  drawTriangles(vertices: number[] | Point[], indices: number[], cull?: boolean): void;
210
210
  }
@@ -1,13 +1,13 @@
1
1
  export class GraphicsData {
2
2
  /**
3
- * TBD.
4
- * @param {number} lineWidth - TBD.
5
- * @param {number} lineColor - TBD.
6
- * @param {number} lineAlpha - TBD.
7
- * @param {number} fillColor - TBD.
8
- * @param {number} fillAlpha - TBD.
9
- * @param {boolean} fill - TBD.
10
- * @param {object} shape - TBD.
3
+ * Creates a new GraphicsData object.
4
+ * @param {number} lineWidth - The line width.
5
+ * @param {number} lineColor - The line color.
6
+ * @param {number} lineAlpha - The line alpha.
7
+ * @param {number} fillColor - The fill color.
8
+ * @param {number} fillAlpha - The fill alpha.
9
+ * @param {boolean} fill - Whether to fill the shape.
10
+ * @param {object} shape - The shape to draw.
11
11
  */
12
12
  constructor(lineWidth: number, lineColor: number, lineAlpha: number, fillColor: number, fillAlpha: number, fill: boolean, shape: object);
13
13
  lineWidth: number;
@@ -21,8 +21,8 @@ export class GraphicsData {
21
21
  shape: any;
22
22
  type: any;
23
23
  /**
24
- * TBD.
25
- * @returns {GraphicsData} TBD.
24
+ * Clones this GraphicsData object.
25
+ * @returns {GraphicsData} A new cloned GraphicsData object.
26
26
  */
27
27
  clone(): GraphicsData;
28
28
  }
@@ -2,11 +2,11 @@ export const SORT_ASCENDING: -1;
2
2
  export const SORT_DESCENDING: 1;
3
3
  export class Group extends DisplayObject {
4
4
  /**
5
- * TBD.
6
- * @param {import('../core/game.js').Game} game - TBD.
7
- * @param {DisplayObject} parent - TBD.
8
- * @param {string} name - TBD.
9
- * @param {boolean} addToStage - TBD.
5
+ * Creates a new Group object.
6
+ * @param {import('../core/game.js').Game} game - The game instance this group belongs to.
7
+ * @param {DisplayObject} parent - The parent display object.
8
+ * @param {string} name - The name of this group.
9
+ * @param {boolean} addToStage - Whether to add this group to the stage.
10
10
  */
11
11
  constructor(game: import("../core/game.js").Game, parent?: DisplayObject, name?: string, addToStage?: boolean);
12
12
  /** @type {number} */
@@ -36,89 +36,89 @@ export class Group extends DisplayObject {
36
36
  /** @type {string} */
37
37
  _sortProperty: string;
38
38
  /**
39
- * TBD.
40
- * @param {boolean} destroyChildren - TBD.
41
- * @param {boolean} soft - TBD.
39
+ * Destroys this group and cleans up resources.
40
+ * @param {boolean} destroyChildren - Whether to destroy children as well.
41
+ * @param {boolean} soft - Whether to perform a soft destroy (leaving the group in the parent's children list).
42
42
  */
43
43
  destroy(destroyChildren?: boolean, soft?: boolean): void;
44
44
  filters: any;
45
45
  /**
46
- * TBD.
47
- * @param {DisplayObject} child - TBD.
48
- * @param {boolean} silent - TBD.
49
- * @param {number} index - TBD.
50
- * @returns {DisplayObject} TBD.
46
+ * Adds a child to this group.
47
+ * @param {DisplayObject} child - The child to add.
48
+ * @param {boolean} silent - Whether to dispatch events.
49
+ * @param {number} index - The index to add the child at.
50
+ * @returns {DisplayObject} The added child.
51
51
  */
52
52
  add(child: DisplayObject, silent?: boolean, index?: number): DisplayObject;
53
53
  /**
54
- * TBD.
55
- * @param {DisplayObject} child - TBD.
56
- * @param {number} index - TBD.
57
- * @param {boolean} silent - TBD.
54
+ * Adds a child to this group at a specific index.
55
+ * @param {DisplayObject} child - The child to add.
56
+ * @param {number} index - The index to add the child at.
57
+ * @param {boolean} silent - Whether to dispatch events.
58
58
  */
59
59
  addAt(child: DisplayObject, index: number, silent: boolean): void;
60
60
  /**
61
- * TBD.
62
- * @param {number} index - TBD.
63
- * @returns {DisplayObject} TBD.
61
+ * Gets a child at the specified index.
62
+ * @param {number} index - The index of the child to get.
63
+ * @returns {DisplayObject} The child at the specified index, or -1 if not found.
64
64
  */
65
65
  getAt(index: number): DisplayObject;
66
66
  /**
67
- * TBD.
67
+ * Updates the Z indices of all children in this group.
68
68
  */
69
69
  updateZ(): void;
70
70
  /**
71
- * TBD.
72
- * @returns {DisplayObject} TBD.
71
+ * Gets the next child in this group (with circular wrapping).
72
+ * @returns {DisplayObject} The next child, or null if no children exist.
73
73
  */
74
74
  next(): DisplayObject;
75
75
  /**
76
- * TBD.
77
- * @returns {DisplayObject} TBD.
76
+ * Gets the previous child in this group (with circular wrapping).
77
+ * @returns {DisplayObject} The previous child, or null if no children exist.
78
78
  */
79
79
  previous(): DisplayObject;
80
80
  /**
81
- * TBD.
82
- * @param {DisplayObject} child1 - TBD.
83
- * @param {DisplayObject} child2 - TBD.
81
+ * Swaps the positions of two children in this group.
82
+ * @param {DisplayObject} child1 - The first child to swap.
83
+ * @param {DisplayObject} child2 - The second child to swap.
84
84
  */
85
85
  swap(child1: DisplayObject, child2: DisplayObject): void;
86
86
  /**
87
- * TBD.
88
- * @param {DisplayObject} child - TBD.
89
- * @returns {DisplayObject} TBD.
87
+ * Brings a child to the top of this group.
88
+ * @param {DisplayObject} child - The child to bring to the top.
89
+ * @returns {DisplayObject} The child that was brought to the top.
90
90
  */
91
91
  bringToTop(child: DisplayObject): DisplayObject;
92
92
  /**
93
- * TBD.
94
- * @param {DisplayObject} child - TBD.
95
- * @returns {DisplayObject} TBD.
93
+ * Sends a child to the back of this group.
94
+ * @param {DisplayObject} child - The child to send to the back.
95
+ * @returns {DisplayObject} The child that was sent to the back.
96
96
  */
97
97
  sendToBack(child: DisplayObject): DisplayObject;
98
98
  /**
99
- * TBD.
99
+ * Reverses the order of children in this group.
100
100
  */
101
101
  reverse(): void;
102
102
  /**
103
- * TBD.
104
- * @param {DisplayObject} child - TBD.
105
- * @returns {number} TBD.
103
+ * Gets the index of a child in this group.
104
+ * @param {DisplayObject} child - The child to get the index of.
105
+ * @returns {number} The index of the child, or -1 if not found.
106
106
  */
107
107
  getIndex(child: DisplayObject): number;
108
108
  renderOrderID: number;
109
109
  /**
110
- * TBD.
111
- * @param {DisplayObject} child - TBD.
112
- * @param {boolean} destroy - TBD.
113
- * @param {boolean} silent - TBD.
114
- * @returns {boolean} TBD.
110
+ * Removes a child from this group.
111
+ * @param {DisplayObject} child - The child to remove.
112
+ * @param {boolean} destroy - Whether to destroy the child after removing it.
113
+ * @param {boolean} silent - Whether to dispatch events.
114
+ * @returns {boolean} True if the child was removed, false otherwise.
115
115
  */
116
116
  remove(child: DisplayObject, destroy?: boolean, silent?: boolean): boolean;
117
117
  /**
118
- * TBD.
119
- * @param {boolean} destroy - TBD.
120
- * @param {boolean} silent - TBD.
121
- * @param {boolean} destroyTexture - TBD.
118
+ * Removes all children from this group.
119
+ * @param {boolean} destroy - Whether to destroy children as well.
120
+ * @param {boolean} silent - Whether to dispatch events.
121
+ * @param {boolean} destroyTexture - Whether to destroy textures as well.
122
122
  */
123
123
  removeAll(destroy?: boolean, silent?: boolean, destroyTexture?: boolean): void;
124
124
  }
@@ -1,11 +1,11 @@
1
1
  export class Image extends DisplayObject {
2
2
  /**
3
- * TBD.
4
- * @param {import('../core/game.js').Game} game - TBD.
5
- * @param {number} x - TBD.
6
- * @param {number} y - TBD.
7
- * @param {string | number | Texture} key - TBD.
8
- * @param {string | number} frame - TBD.
3
+ * Creates a new Image instance.
4
+ * @param {import('../core/game.js').Game} game - The game instance this image belongs to.
5
+ * @param {number} x - The x position of the image.
6
+ * @param {number} y - The y position of the image.
7
+ * @param {string | number | Texture} key - The texture key or texture to use.
8
+ * @param {string | number} frame - The frame identifier (name or index) to use.
9
9
  */
10
10
  constructor(game: import("../core/game.js").Game, x: number, y: number, key: string | number | Texture, frame?: string | number);
11
11
  /** @type {number} */
@@ -33,86 +33,88 @@ export class Image extends DisplayObject {
33
33
  animations: AnimationManager;
34
34
  renderOrderID: number;
35
35
  /**
36
- * TBD.
37
- * @param {string | number | Texture} key - TBD.
38
- * @param {string | number | null | undefined} frame - TBD.
39
- * @param {boolean} stopAnimation - TBD.
36
+ * Loads a texture for this image.
37
+ * @param {string | number | Texture} key - The texture key or texture to use.
38
+ * @param {string | number | null | undefined} frame - The frame identifier (name or index) to use.
39
+ * @param {boolean} stopAnimation - Whether to stop the animation when changing textures.
40
40
  */
41
41
  loadTexture(key: string | number | Texture, frame?: string | number | null | undefined, stopAnimation?: boolean): void;
42
42
  customRender: boolean;
43
43
  /**
44
- * TBD.
45
- * @param {import('../core/frame.js').Frame} frame - TBD.
44
+ * Sets the current frame of this image.
45
+ * @param {import('../core/frame.js').Frame} frame - The frame to set.
46
46
  */
47
47
  setFrame(frame: import("../core/frame.js").Frame): void;
48
48
  refreshTexture: boolean;
49
49
  /**
50
- * TBD.
51
- * @param {DisplayObject} parent - TBD.
52
- * @param {number} width - TBD.
53
- * @param {number} height - TBD.
50
+ * Resizes the frame of this image.
51
+ * @param {DisplayObject} parent - The parent display object.
52
+ * @param {number} width - The new width of the frame.
53
+ * @param {number} height - The new height of the frame.
54
54
  */
55
55
  resizeFrame(parent: DisplayObject, width: number, height: number): void;
56
56
  /**
57
- * TBD.
57
+ * Resets the frame of this image to its original frame.
58
58
  */
59
59
  resetFrame(): void;
60
60
  /**
61
- * TBD.
61
+ * Sets the current frame index of this image.
62
+ * @param {number} value - The new frame index to set.
62
63
  */
63
64
  set frame(value: number);
64
65
  /**
65
- * TBD.
66
- * @returns {number} TBD.
66
+ * Gets the current frame index of this image.
67
+ * @returns {number} The current frame index.
67
68
  */
68
69
  get frame(): number;
69
70
  /**
70
- * TBD.
71
+ * Sets the current frame name of this image.
72
+ * @param {string} value - The new frame name to set.
71
73
  */
72
74
  set frameName(value: string);
73
75
  /**
74
- * TBD.
75
- * @returns {string} TBD.
76
+ * Gets the current frame name of this image.
77
+ * @returns {string} The current frame name.
76
78
  */
77
79
  get frameName(): string;
78
80
  /**
79
- * TBD.
80
- * @param {Rectangle} rect - TBD.
81
- * @param {boolean} copy - TBD.
81
+ * Crops the texture of this image.
82
+ * @param {Rectangle} rect - The rectangle to crop to.
83
+ * @param {boolean} copy - Whether to copy the rect or use it directly.
82
84
  */
83
85
  crop(rect: Rectangle, copy?: boolean): void;
84
86
  cropRect: Rectangle;
85
87
  _crop: any;
86
88
  /**
87
- * TBD.
89
+ * Updates the crop rectangle of this image.
88
90
  */
89
91
  updateCrop(): void;
90
92
  /**
91
- * TBD.
93
+ * Called when the texture of this image is updated.
92
94
  */
93
95
  onTextureUpdate(): void;
94
96
  /**
95
- * TBD.
96
- * @param {Texture} texture - TBD.
97
- * @param {boolean} destroyBase - TBD.
97
+ * Sets the texture for this image.
98
+ * @param {Texture} texture - The new texture to set.
99
+ * @param {boolean} destroyBase - Whether to destroy the base texture.
98
100
  */
99
101
  setTexture(texture: Texture, destroyBase?: boolean): void;
100
102
  /**
101
- * TBD.
102
- * @param {import('../geom/matrix.js').Matrix} matrix - TBD.
103
- * @returns {Rectangle} TBD.
103
+ * Gets the bounds of this image.
104
+ * @param {import('../geom/matrix.js').Matrix} matrix - The transformation matrix to use.
105
+ * @returns {Rectangle} The bounds rectangle of this image.
104
106
  */
105
107
  getBounds(matrix?: import("../geom/matrix.js").Matrix): Rectangle;
106
108
  /**
107
- * TBD.
108
- * @param {object} renderSession - TBD.
109
- * @param {import('../geom/matrix.js').Matrix} matrix - TBD.
109
+ * Renders this image using WebGL.
110
+ * @param {object} renderSession - The WebGL rendering session.
111
+ * @param {import('../geom/matrix.js').Matrix} matrix - The transformation matrix to use.
110
112
  */
111
113
  renderWebGL(renderSession: object, matrix?: import("../geom/matrix.js").Matrix): void;
112
114
  /**
113
- * TBD.
114
- * @param {object} renderSession - TBD.
115
- * @param {import('../geom/matrix.js').Matrix} matrix - TBD.
115
+ * Renders this image using Canvas.
116
+ * @param {object} renderSession - The Canvas rendering session.
117
+ * @param {import('../geom/matrix.js').Matrix} matrix - The transformation matrix to use.
116
118
  */
117
119
  renderCanvas(renderSession: object, matrix?: import("../geom/matrix.js").Matrix): void;
118
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/image.js"],"names":[],"mappings":"AASA;IACE;;;;;;;OAOG;IACH,kBANW,OAAO,iBAAiB,EAAE,IAAI,KAC9B,MAAM,KACN,MAAM,OACN,MAAM,GAAG,MAAM,GAAG,OAAO,UACzB,MAAM,GAAG,MAAM,EAwCzB;IApCC,qBAAqB;IACrB,MADW,MAAM,CACA;IAGjB,wCAAwC;IACxC,KADW,MAAM,GAAG,MAAM,GAAG,OAAO,CACtB;IACd,aAAwD;IAOxD,qBAAqB;IACrB,MADW,MAAM,CACG;IACpB,qBAAqB;IACrB,YADW,MAAM,CACG;IACpB,6BAA6B;IAC7B,eADW,OAAO,GAAG,IAAI,CACA;IACzB,6BAA6B;IAC7B,eADW,OAAO,GAAG,IAAI,CACA;IACzB,qBAAqB;IACrB,WADW,MAAM,CACY;IAC7B,YAAkB;IAClB,qDAAkB;IAClB,sBAAsB;IACtB,gBADW,OAAO,CACS;IAK3B,2BAA2B;IAC3B,QADW,YAAY,CACa;IACpC,+BAA+B;IAC/B,YADW,gBAAgB,CACiB;IAqC1C,sBAAuB;IAiB3B;;;;;OAKG;IACH,iBAJW,MAAM,GAAG,MAAM,GAAG,OAAO,UACzB,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,kBAClC,OAAO,QAsCjB;IAzBC,sBAAyB;IA2B3B;;;OAGG;IACH,gBAFW,OAAO,kBAAkB,EAAE,KAAK,QAyC1C;IAFG,wBAA0B;IAI9B;;;;;OAKG;IACH,oBAJW,aAAa,SACb,MAAM,UACN,MAAM,QAKhB;IAED;;OAEG;IACH,mBAIC;IAUD;;OAEG;IACH,iBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAiBD;;OAEG;IACH,qBATa,MAAM,EAWlB;IAbD;;;OAGG;IACH,iBAFa,MAAM,CAIlB;IAWD;;;;OAIG;IACH,WAHW,SAAS,SACT,OAAO,QAiBjB;IAVK,oBAAsE;IAMxE,WAAiB;IAMrB;;OAEG;IACH,mBA2BC;IAkCD;;OAEG;IACH,wBAQC;IAED;;;;OAIG;IACH,oBAHW,OAAO,gBACP,OAAO,QAIjB;IAED;;;;OAIG;IACH,mBAHW,OAAO,mBAAmB,EAAE,MAAM,GAChC,SAAS,CAIrB;IAUD;;;;OAIG;IACH,2BAHW,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,QAI5C;IAED;;;;OAIG;IACH,4BAHW,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,QAI5C;CACF;8BAlY6B,qBAAqB;wBAE3B,oBAAoB;0BAJlB,sBAAsB;6BADnB,0BAA0B;iCAFtB,8BAA8B"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/image.js"],"names":[],"mappings":"AASA;IACE;;;;;;;OAOG;IACH,kBANW,OAAO,iBAAiB,EAAE,IAAI,KAC9B,MAAM,KACN,MAAM,OACN,MAAM,GAAG,MAAM,GAAG,OAAO,UACzB,MAAM,GAAG,MAAM,EAwCzB;IApCC,qBAAqB;IACrB,MADW,MAAM,CACA;IAGjB,wCAAwC;IACxC,KADW,MAAM,GAAG,MAAM,GAAG,OAAO,CACtB;IACd,aAAwD;IAOxD,qBAAqB;IACrB,MADW,MAAM,CACG;IACpB,qBAAqB;IACrB,YADW,MAAM,CACG;IACpB,6BAA6B;IAC7B,eADW,OAAO,GAAG,IAAI,CACA;IACzB,6BAA6B;IAC7B,eADW,OAAO,GAAG,IAAI,CACA;IACzB,qBAAqB;IACrB,WADW,MAAM,CACY;IAC7B,YAAkB;IAClB,qDAAkB;IAClB,sBAAsB;IACtB,gBADW,OAAO,CACS;IAK3B,2BAA2B;IAC3B,QADW,YAAY,CACa;IACpC,+BAA+B;IAC/B,YADW,gBAAgB,CACiB;IAqC1C,sBAAuB;IAiB3B;;;;;OAKG;IACH,iBAJW,MAAM,GAAG,MAAM,GAAG,OAAO,UACzB,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,kBAClC,OAAO,QAsCjB;IAzBC,sBAAyB;IA2B3B;;;OAGG;IACH,gBAFW,OAAO,kBAAkB,EAAE,KAAK,QAyC1C;IAFG,wBAA0B;IAI9B;;;;;OAKG;IACH,oBAJW,aAAa,SACb,MAAM,UACN,MAAM,QAKhB;IAED;;OAEG;IACH,mBAIC;IAUD;;;OAGG;IACH,iBAFW,MAAM,EAIhB;IAdD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAkBD;;;OAGG;IACH,qBAFW,MAAM,EAIhB;IAdD;;;OAGG;IACH,iBAFa,MAAM,CAIlB;IAYD;;;;OAIG;IACH,WAHW,SAAS,SACT,OAAO,QAiBjB;IAVK,oBAAsE;IAMxE,WAAiB;IAMrB;;OAEG;IACH,mBA2BC;IAoCD;;OAEG;IACH,wBAQC;IAED;;;;OAIG;IACH,oBAHW,OAAO,gBACP,OAAO,QAIjB;IAED;;;;OAIG;IACH,mBAHW,OAAO,mBAAmB,EAAE,MAAM,GAChC,SAAS,CAIrB;IAUD;;;;OAIG;IACH,2BAHW,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,QAI5C;IAED;;;;OAIG;IACH,4BAHW,MAAM,WACN,OAAO,mBAAmB,EAAE,MAAM,QAI5C;CACF;8BAtY6B,qBAAqB;wBAE3B,oBAAoB;0BAJlB,sBAAsB;6BADnB,0BAA0B;iCAFtB,8BAA8B"}