@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,10 +1,10 @@
1
1
  export class Rectangle {
2
2
  /**
3
- * TBD.
4
- * @param {number} x - TBD.
5
- * @param {number} y - TBD.
6
- * @param {number} width - TBD.
7
- * @param {number} height - TBD.
3
+ * Creates a new Rectangle instance.
4
+ * @param {number} x - The x coordinate of the top-left corner of the rectangle (default: 0).
5
+ * @param {number} y - The y coordinate of the top-left corner of the rectangle (default: 0).
6
+ * @param {number} width - The width of the rectangle (default: 0).
7
+ * @param {number} height - The height of the rectangle (default: 0).
8
8
  */
9
9
  constructor(x?: number, y?: number, width?: number, height?: number);
10
10
  /** @type {number} */
@@ -18,289 +18,289 @@ export class Rectangle {
18
18
  /** @type {number} */
19
19
  type: number;
20
20
  /**
21
- * TBD.
22
- * @param {number} dx - TBD.
23
- * @param {number} dy - TBD.
24
- * @returns {Rectangle} TBD.
21
+ * Offsets the rectangle's position by the specified amounts.
22
+ * @param {number} dx - The amount to offset the x coordinate by.
23
+ * @param {number} dy - The amount to offset the y coordinate by.
24
+ * @returns {Rectangle} This rectangle instance for chaining.
25
25
  */
26
26
  offset(dx: number, dy: number): Rectangle;
27
27
  /**
28
- * TBD.
29
- * @param {Point} point - TBD.
30
- * @returns {Rectangle} TBD.
28
+ * Offsets the rectangle's position by the specified point coordinates.
29
+ * @param {Point} point - The point to offset the rectangle by.
30
+ * @returns {Rectangle} This rectangle instance for chaining.
31
31
  */
32
32
  offsetPoint(point: Point): Rectangle;
33
33
  /**
34
- * TBD.
35
- * @param {number} x - TBD.
36
- * @param {number} y - TBD.
37
- * @param {number} width - TBD.
38
- * @param {number} height - TBD.
39
- * @returns {Rectangle} TBD.
34
+ * Sets the rectangle's position and size to new values.
35
+ * @param {number} x - The new x coordinate of the top-left corner of the rectangle.
36
+ * @param {number} y - The new y coordinate of the top-left corner of the rectangle.
37
+ * @param {number} width - The new width of the rectangle.
38
+ * @param {number} height - The new height of the rectangle.
39
+ * @returns {Rectangle} This rectangle instance for chaining.
40
40
  */
41
41
  setTo(x: number, y: number, width: number, height: number): Rectangle;
42
42
  /**
43
- * TBD.
44
- * @param {number} x - TBD.
45
- * @param {number} y - TBD.
46
- * @returns {Rectangle} TBD.
43
+ * Scales the rectangle's size by the specified amounts.
44
+ * @param {number} x - The amount to scale the width by.
45
+ * @param {number} y - The amount to scale the height by (default: x).
46
+ * @returns {Rectangle} This rectangle instance for chaining.
47
47
  */
48
48
  scale(x: number, y: number): Rectangle;
49
49
  /**
50
- * TBD.
51
- * @param {number} x - TBD.
52
- * @param {number} y - TBD.
53
- * @returns {Rectangle} TBD.
50
+ * Centers the rectangle on the specified point.
51
+ * @param {number} x - The x coordinate to center the rectangle on.
52
+ * @param {number} y - The y coordinate to center the rectangle on.
53
+ * @returns {Rectangle} This rectangle instance for chaining.
54
54
  */
55
55
  centerOn(x: number, y: number): Rectangle;
56
56
  /**
57
- * TBD.
57
+ * Sets the x coordinate of the center of this rectangle.
58
58
  */
59
59
  set centerX(value: number);
60
60
  /**
61
- * TBD.
62
- * @returns {number} TBD.
61
+ * Gets the x coordinate of the center of this rectangle.
62
+ * @returns {number} The x coordinate of the center of this rectangle.
63
63
  */
64
64
  get centerX(): number;
65
65
  /**
66
- * TBD.
66
+ * Sets the y coordinate of the center of this rectangle.
67
67
  */
68
68
  set centerY(value: number);
69
69
  /**
70
- * TBD.
71
- * @returns {number} TBD.
70
+ * Gets the y coordinate of the center of this rectangle.
71
+ * @returns {number} The y coordinate of the center of this rectangle.
72
72
  */
73
73
  get centerY(): number;
74
74
  /**
75
- * TBD.
75
+ * Floors the x and y coordinates of the rectangle (rounds down to nearest integer).
76
76
  */
77
77
  floor(): void;
78
78
  /**
79
- * TBD.
79
+ * Floors all coordinates of the rectangle (rounds down to nearest integer).
80
80
  */
81
81
  floorAll(): void;
82
82
  /**
83
- * TBD.
83
+ * Ceils the x and y coordinates of the rectangle (rounds up to nearest integer).
84
84
  */
85
85
  ceil(): void;
86
86
  /**
87
- * TBD.
87
+ * Ceils all coordinates of the rectangle (rounds up to nearest integer).
88
88
  */
89
89
  ceilAll(): void;
90
90
  /**
91
- * TBD.
92
- * @param {Rectangle} source - TBD.
93
- * @returns {Rectangle} TBD.
91
+ * Copies the values from another rectangle to this rectangle.
92
+ * @param {Rectangle} source - The rectangle to copy values from.
93
+ * @returns {Rectangle} This rectangle instance for chaining.
94
94
  */
95
95
  copyFrom(source: Rectangle): Rectangle;
96
96
  /**
97
- * TBD.
98
- * @param {Rectangle} dest - TBD.
99
- * @returns {Rectangle} TBD.
97
+ * Copies the values of this rectangle to another rectangle.
98
+ * @param {Rectangle} dest - The rectangle to copy values to.
99
+ * @returns {Rectangle} The destination rectangle.
100
100
  */
101
101
  copyTo(dest: Rectangle): Rectangle;
102
102
  /**
103
- * TBD.
104
- * @param {number} dx - TBD.
105
- * @param {number} dy - TBD.
106
- * @returns {Rectangle} TBD.
103
+ * Increases the size of the rectangle by the specified amounts.
104
+ * @param {number} dx - The amount to increase the width by.
105
+ * @param {number} dy - The amount to increase the height by.
106
+ * @returns {Rectangle} This rectangle instance for chaining.
107
107
  */
108
108
  inflate(dx: number, dy: number): Rectangle;
109
109
  /**
110
- * TBD.
111
- * @param {Point} output - TBD.
112
- * @returns {Point} TBD.
110
+ * Gets the size of the rectangle as a point.
111
+ * @param {Point} output - The point to store the size in (optional).
112
+ * @returns {Point} The size of the rectangle as a point.
113
113
  */
114
114
  size(output: Point): Point;
115
115
  /**
116
- * TBD.
117
- * @param {number} width - TBD.
118
- * @param {number} height - TBD.
119
- * @returns {Rectangle} TBD.
116
+ * Resizes the rectangle to the specified dimensions.
117
+ * @param {number} width - The new width of the rectangle.
118
+ * @param {number} height - The new height of the rectangle.
119
+ * @returns {Rectangle} This rectangle instance for chaining.
120
120
  */
121
121
  resize(width: number, height: number): Rectangle;
122
122
  /**
123
- * TBD.
124
- * @param {Rectangle} output - TBD.
125
- * @returns {Rectangle} TBD.
123
+ * Creates a clone of this rectangle.
124
+ * @param {Rectangle} output - The rectangle to store the clone in (optional).
125
+ * @returns {Rectangle} A new rectangle with the same values as this one.
126
126
  */
127
127
  clone(output: Rectangle): Rectangle;
128
128
  /**
129
- * TBD.
130
- * @param {number} x - TBD.
131
- * @param {number} y - TBD.
132
- * @returns {boolean} TBD.
129
+ * Checks if the specified point is contained within this rectangle.
130
+ * @param {number} x - The x coordinate of the point to check.
131
+ * @param {number} y - The y coordinate of the point to check.
132
+ * @returns {boolean} True if the point is contained within this rectangle, false otherwise.
133
133
  */
134
134
  contains(x: number, y: number): boolean;
135
135
  /**
136
- * TBD.
137
- * @param {Rectangle} b - TBD.
138
- * @returns {boolean} TBD.
136
+ * Checks if the specified rectangle is fully contained within this rectangle.
137
+ * @param {Rectangle} b - The rectangle to check if it's contained.
138
+ * @returns {boolean} True if the rectangle is contained within this rectangle, false otherwise.
139
139
  */
140
140
  containsRect(b: Rectangle): boolean;
141
141
  /**
142
- * TBD.
143
- * @param {Rectangle} b - TBD.
144
- * @returns {boolean} TBD.
142
+ * Checks if this rectangle is equal to another rectangle.
143
+ * @param {Rectangle} b - The rectangle to compare with.
144
+ * @returns {boolean} True if the rectangles have the same values, false otherwise.
145
145
  */
146
146
  equals(b: Rectangle): boolean;
147
147
  /**
148
- * TBD.
149
- * @param {Rectangle} b - TBD.
150
- * @param {Rectangle} out - TBD.
151
- * @returns {Rectangle} TBD.
148
+ * Gets the intersection of this rectangle and another rectangle.
149
+ * @param {Rectangle} b - The rectangle to intersect with.
150
+ * @param {Rectangle} out - The rectangle to store the result in (optional).
151
+ * @returns {Rectangle} The intersection of the two rectangles.
152
152
  */
153
153
  intersection(b: Rectangle, out: Rectangle): Rectangle;
154
154
  /**
155
- * TBD.
156
- * @param {Rectangle} b - TBD.
157
- * @returns {boolean} TBD.
155
+ * Checks if this rectangle intersects with another rectangle.
156
+ * @param {Rectangle} b - The rectangle to check for intersection with.
157
+ * @returns {boolean} True if the rectangles intersect, false otherwise.
158
158
  */
159
159
  intersects(b: Rectangle): boolean;
160
160
  /**
161
- * TBD.
162
- * @param {number} left - TBD.
163
- * @param {number} right - TBD.
164
- * @param {number} top - TBD.
165
- * @param {number} bottom - TBD.
166
- * @param {number} tolerance - TBD.
167
- * @returns {boolean} TBD.
161
+ * Checks if this rectangle intersects with the specified bounds.
162
+ * @param {number} left - The left boundary of the area to check for intersection.
163
+ * @param {number} right - The right boundary of the area to check for intersection.
164
+ * @param {number} top - The top boundary of the area to check for intersection.
165
+ * @param {number} bottom - The bottom boundary of the area to check for intersection.
166
+ * @param {number} tolerance - A tolerance value to use when checking (default: 0).
167
+ * @returns {boolean} True if the rectangle intersects with the bounds, false otherwise.
168
168
  */
169
169
  intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean;
170
170
  /**
171
- * TBD.
172
- * @param {Rectangle} b - TBD.
173
- * @param {Rectangle} out - TBD.
174
- * @returns {Rectangle} TBD.
171
+ * Gets the union of this rectangle and another rectangle.
172
+ * @param {Rectangle} b - The rectangle to union with.
173
+ * @param {Rectangle} out - The rectangle to store the result in (optional).
174
+ * @returns {Rectangle} The union of the two rectangles.
175
175
  */
176
176
  union(b: Rectangle, out: Rectangle): Rectangle;
177
177
  /**
178
- * TBD.
179
- * @param {Point} output - TBD.
180
- * @returns {Point} TBD.
178
+ * Gets a random point within this rectangle.
179
+ * @param {Point} output - The point to store the result in (optional).
180
+ * @returns {Point} A random point within this rectangle.
181
181
  */
182
182
  random(output?: Point): Point;
183
183
  /**
184
- * TBD.
185
- * @param {number} position - TBD.
186
- * @param {Point} output - TBD.
187
- * @returns {Point} TBD.
184
+ * Gets a point at a specific position on the rectangle.
185
+ * @param {number} position - The position to get the point for (TOP_LEFT, TOP_CENTER, etc.).
186
+ * @param {Point} output - The point to store the result in (optional).
187
+ * @returns {Point} A point at the specified position on the rectangle.
188
188
  */
189
189
  getPoint(position: number, output?: Point): Point;
190
190
  /**
191
- * TBD.
192
- * @returns {string} TBD.
191
+ * Returns a string representation of this rectangle.
192
+ * @returns {string} A string representation of the rectangle.
193
193
  */
194
194
  toString(): string;
195
195
  /**
196
- * TBD.
197
- * @returns {number} TBD.
196
+ * Gets half the width of this rectangle.
197
+ * @returns {number} Half the width of this rectangle.
198
198
  */
199
199
  get halfWidth(): number;
200
200
  /**
201
- * TBD.
202
- * @returns {number} TBD.
201
+ * Gets half the height of this rectangle.
202
+ * @returns {number} Half the height of this rectangle.
203
203
  */
204
204
  get halfHeight(): number;
205
205
  /**
206
- * TBD.
206
+ * Sets the top coordinate of this rectangle.
207
207
  */
208
208
  set top(value: number);
209
209
  /**
210
- * TBD.
211
- * @returns {number} TBD.
210
+ * Gets the top coordinate of this rectangle.
211
+ * @returns {number} The top coordinate of this rectangle.
212
212
  */
213
213
  get top(): number;
214
214
  /**
215
- * TBD.
215
+ * Sets the top-left point of this rectangle.
216
216
  */
217
217
  set topLeft(value: Point);
218
218
  /**
219
- * TBD.
220
- * @returns {Point} TBD.
219
+ * Gets the top-left point of this rectangle.
220
+ * @returns {Point} The top-left point of this rectangle.
221
221
  */
222
222
  get topLeft(): Point;
223
223
  /**
224
- * TBD.
224
+ * Sets the top-right point of this rectangle.
225
225
  */
226
226
  set topRight(value: Point);
227
227
  /**
228
- * TBD.
229
- * @returns {Point} TBD.
228
+ * Gets the top-right point of this rectangle.
229
+ * @returns {Point} The top-right point of this rectangle.
230
230
  */
231
231
  get topRight(): Point;
232
232
  /**
233
- * TBD.
233
+ * Sets the right coordinate of this rectangle.
234
234
  */
235
235
  set right(value: number);
236
236
  /**
237
- * TBD.
238
- * @returns {number} TBD.
237
+ * Gets the right coordinate of this rectangle.
238
+ * @returns {number} The right coordinate of this rectangle.
239
239
  */
240
240
  get right(): number;
241
241
  /**
242
- * TBD.
242
+ * Sets the bottom coordinate of this rectangle.
243
243
  */
244
244
  set bottom(value: number);
245
245
  /**
246
- * TBD.
247
- * @returns {number} TBD.
246
+ * Gets the bottom coordinate of this rectangle.
247
+ * @returns {number} The bottom coordinate of this rectangle.
248
248
  */
249
249
  get bottom(): number;
250
250
  /**
251
- * TBD.
251
+ * Sets the bottom-left point of this rectangle.
252
252
  */
253
253
  set bottomLeft(value: Point);
254
254
  /**
255
- * TBD.
256
- * @returns {Point} TBD.
255
+ * Gets the bottom-left point of this rectangle.
256
+ * @returns {Point} The bottom-left point of this rectangle.
257
257
  */
258
258
  get bottomLeft(): Point;
259
259
  /**
260
- * TBD.
260
+ * Sets the bottom-right point of this rectangle.
261
261
  */
262
262
  set bottomRight(value: Point);
263
263
  /**
264
- * TBD.
265
- * @returns {Point} TBD.
264
+ * Gets the bottom-right point of this rectangle.
265
+ * @returns {Point} The bottom-right point of this rectangle.
266
266
  */
267
267
  get bottomRight(): Point;
268
268
  /**
269
- * TBD.
269
+ * Sets the left coordinate of this rectangle.
270
270
  */
271
271
  set left(value: number);
272
272
  /**
273
- * TBD.
274
- * @returns {number} TBD.
273
+ * Gets the left coordinate of this rectangle.
274
+ * @returns {number} The left coordinate of this rectangle.
275
275
  */
276
276
  get left(): number;
277
277
  /**
278
- * TBD.
279
- * @returns {number} TBD.
278
+ * Gets the volume (area) of this rectangle.
279
+ * @returns {number} The volume (area) of this rectangle.
280
280
  */
281
281
  get volume(): number;
282
282
  /**
283
- * TBD.
284
- * @returns {number} TBD.
283
+ * Gets the perimeter of this rectangle.
284
+ * @returns {number} The perimeter of this rectangle.
285
285
  */
286
286
  get perimeter(): number;
287
287
  /**
288
- * TBD.
289
- * @returns {number} TBD.
288
+ * Gets a random x coordinate within this rectangle.
289
+ * @returns {number} A random x coordinate within this rectangle.
290
290
  */
291
291
  get randomX(): number;
292
292
  /**
293
- * TBD.
294
- * @returns {number} TBD.
293
+ * Gets a random y coordinate within this rectangle.
294
+ * @returns {number} A random y coordinate within this rectangle.
295
295
  */
296
296
  get randomY(): number;
297
297
  /**
298
- * TBD.
298
+ * Sets whether this rectangle is empty (zero width or height).
299
299
  */
300
300
  set empty(value: boolean);
301
301
  /**
302
- * TBD.
303
- * @returns {boolean} TBD.
302
+ * Checks if this rectangle is empty (has zero width or height).
303
+ * @returns {boolean} True if the rectangle is empty, false otherwise.
304
304
  */
305
305
  get empty(): boolean;
306
306
  }
@@ -1,11 +1,11 @@
1
1
  export class RoundedRectangle {
2
2
  /**
3
- * TBD.
4
- * @param {number} x - TBD.
5
- * @param {number} y - TBD.
6
- * @param {number} width - TBD.
7
- * @param {number} height - TBD.
8
- * @param {number} radius - TBD.
3
+ * Creates a new RoundedRectangle instance.
4
+ * @param {number} x - The x coordinate of the top-left corner of the rectangle (default: 0).
5
+ * @param {number} y - The y coordinate of the top-left corner of the rectangle (default: 0).
6
+ * @param {number} width - The width of the rectangle (default: 0).
7
+ * @param {number} height - The height of the rectangle (default: 0).
8
+ * @param {number} radius - The corner radius (default: 20).
9
9
  */
10
10
  constructor(x?: number, y?: number, width?: number, height?: number, radius?: number);
11
11
  x: number;
@@ -15,15 +15,15 @@ export class RoundedRectangle {
15
15
  radius: number;
16
16
  type: number;
17
17
  /**
18
- * TBD.
19
- * @param {number} x - TBD.
20
- * @param {number} y - TBD.
21
- * @returns {boolean} TBD.
18
+ * Checks if the specified point is contained within this rounded rectangle.
19
+ * @param {number} x - The x coordinate of the point to check.
20
+ * @param {number} y - The y coordinate of the point to check.
21
+ * @returns {boolean} True if the point is contained within this rounded rectangle, false otherwise.
22
22
  */
23
23
  contains(x: number, y: number): boolean;
24
24
  /**
25
- * TBD.
26
- * @returns {RoundedRectangle} TBD.
25
+ * Creates a clone of this rounded rectangle.
26
+ * @returns {RoundedRectangle} A new rounded rectangle with the same values as this one.
27
27
  */
28
28
  clone(): RoundedRectangle;
29
29
  }
@@ -1,4 +0,0 @@
1
- onlyBuiltDependencies:
2
- - esbuild
3
- trustPolicy: no-downgrade
4
- minimumReleaseAge: 2880