@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,8 +1,8 @@
1
1
  export class AbstractFilter {
2
2
  /**
3
- * TBD.
4
- * @param {string[]} fragmentSrc - TBD.
5
- * @param {object} uniforms - TBD.
3
+ * Creates a new AbstractFilter instance.
4
+ * @param {string[]} fragmentSrc - The fragment shader source.
5
+ * @param {object} uniforms - The uniform variables for the shader.
6
6
  */
7
7
  constructor(fragmentSrc: string[], uniforms: object);
8
8
  passes: this[];
@@ -12,7 +12,7 @@ export class AbstractFilter {
12
12
  uniforms: any;
13
13
  fragmentSrc: string[];
14
14
  /**
15
- * TBD.
15
+ * Initializes the filter.
16
16
  */
17
17
  syncUniforms(): void;
18
18
  }
@@ -1,8 +1,8 @@
1
1
  export class BaseTexture {
2
2
  /**
3
- * TBD.
4
- * @param {HTMLCanvasElement} source - TBD.
5
- * @param {number} [scaleMode] - TBD.
3
+ * Updates the base texture with a new source.
4
+ * @param {HTMLCanvasElement} source - The new canvas element to use as the texture source.
5
+ * @param {number} [scaleMode] - The scale mode to use for the texture.
6
6
  */
7
7
  constructor(source: HTMLCanvasElement, scaleMode?: number);
8
8
  resolution: number;
@@ -18,21 +18,21 @@ export class BaseTexture {
18
18
  _powerOf2: boolean;
19
19
  _dirty: boolean[];
20
20
  /**
21
- * TBD.
22
- * @param {number} width - TBD.
23
- * @param {number} height - TBD.
21
+ * Updates the base texture with new dimensions.
22
+ * @param {number} width - The new width of the texture.
23
+ * @param {number} height - The new height of the texture.
24
24
  */
25
25
  forceLoaded(width: number, height: number): void;
26
26
  /**
27
- * TBD.
27
+ * Destroys the texture.
28
28
  */
29
29
  destroy(): void;
30
30
  /**
31
- * TBD.
31
+ * Marks the texture as dirty.
32
32
  */
33
33
  dirty(): void;
34
34
  /**
35
- * TBD.
35
+ * Unloads the texture from the GPU.
36
36
  */
37
37
  unloadFromGPU(): void;
38
38
  }
@@ -2,18 +2,18 @@ export class WebGLBlendModeManager {
2
2
  gl: WebGLRenderingContext;
3
3
  currentBlendMode: number;
4
4
  /**
5
- * TBD.
6
- * @param {WebGLRenderingContext} gl - TBD.
5
+ * Initializes the blend mode manager with a WebGL context.
6
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
7
7
  */
8
8
  setContext(gl: WebGLRenderingContext): void;
9
9
  /**
10
- * TBD.
11
- * @param {number} blendMode - TBD.
12
- * @returns {boolean} TBD.
10
+ * Sets the blend mode for the specified WebGL context.
11
+ * @param {number} blendMode - The blend mode to set.
12
+ * @returns {boolean} True if the blend mode was set successfully, false otherwise.
13
13
  */
14
14
  setBlendMode(blendMode: number): boolean;
15
15
  /**
16
- * TBD.
16
+ * Sets the blend mode for the WebGL context.
17
17
  */
18
18
  destroy(): void;
19
19
  }
@@ -1,42 +1,42 @@
1
1
  /**
2
- * TBD.
3
- * @param {object} list - TBD.
4
- * @returns {object} TBD.
2
+ * Calculates the area of a triangle defined by three points.
3
+ * @param {object} list - The list of points to process.
4
+ * @returns {object} The processed earcut data structure.
5
5
  */
6
6
  export function sortLinked(list: object): object;
7
7
  /**
8
- * TBD.
9
- * @param {object} a - TBD.
10
- * @param {object} b - TBD.
11
- * @returns {number} TBD.
8
+ * Calculates the area of a triangle defined by three points.
9
+ * @param {object} a - The first point of the triangle.
10
+ * @param {object} b - The second point of the triangle.
11
+ * @returns {number} The calculated area of the triangle.
12
12
  */
13
13
  export function compareX(a: object, b: object): number;
14
14
  /**
15
- * TBD.
16
- * @param {number} x - TBD.
17
- * @param {number} y - TBD.
18
- * @param {number} minX - TBD.
19
- * @param {number} minY - TBD.
20
- * @param {number} size - TBD.
21
- * @returns {number} TBD.
15
+ * Determines if a point is inside a triangle.
16
+ * @param {number} x - The x-coordinate of the point to test.
17
+ * @param {number} y - The y-coordinate of the point to test.
18
+ * @param {number} minX - The minimum x-coordinate of the bounding box.
19
+ * @param {number} minY - The minimum y-coordinate of the bounding box.
20
+ * @param {number} size - The size of the bounding box.
21
+ * @returns {number} The calculated distance from the point to the triangle edge.
22
22
  */
23
23
  export function zOrder(x: number, y: number, minX: number, minY: number, size: number): number;
24
24
  /**
25
- * TBD.
26
- * @param {object} start - TBD.
27
- * @param {number} minX - TBD.
28
- * @param {number} minY - TBD.
29
- * @param {number} size - TBD.
25
+ * Calculates the orientation of three points (clockwise, counterclockwise, or collinear).
26
+ * @param {object} start - The starting point of the triangle edge.
27
+ * @param {number} minX - The minimum x-coordinate of the bounding box.
28
+ * @param {number} minY - The minimum y-coordinate of the bounding box.
29
+ * @param {number} size - The size of the bounding box.
30
30
  */
31
31
  export function indexCurve(start: object, minX: number, minY: number, size: number): void;
32
32
  /**
33
33
  * TBD.
34
34
  * @param {object} start - TBD.
35
- * @returns {object} TBD.
35
+ * @returns {object} The calculated point that is the closest to the triangle edge.
36
36
  */
37
37
  export function getLeftmost(start: object): object;
38
38
  /**
39
- * TBD.
39
+ * Determines if a point is inside the triangle defined by three points.
40
40
  * @param {number} ax - TBD.
41
41
  * @param {number} ay - TBD.
42
42
  * @param {number} bx - TBD.
@@ -58,50 +58,50 @@ export function pointInTriangle(ax: number, ay: number, bx: number, by: number,
58
58
  export function area(p: object, q: object, r: object): number;
59
59
  /**
60
60
  * TBD.
61
- * @param {object} p1 - TBD.
62
- * @param {object} p2 - TBD.
63
- * @returns {boolean} TBD.
61
+ * @param {object} p1 - The first point of the triangle.
62
+ * @param {object} p2 - The second point of the triangle.
63
+ * @returns {boolean} True if the point is inside the triangle, false otherwise.
64
64
  */
65
65
  export function equals(p1: object, p2: object): boolean;
66
66
  /**
67
- * TBD.
68
- * @param {object} p1 - TBD.
69
- * @param {object} q1 - TBD.
70
- * @param {object} p2 - TBD.
71
- * @param {object} q2 - TBD.
72
- * @returns {boolean} TBD.
67
+ * Determines if two line segments intersect.
68
+ * @param {object} p1 - The first point of the first line segment.
69
+ * @param {object} q1 - The second point of the first line segment.
70
+ * @param {object} p2 - The first point of the second line segment.
71
+ * @param {object} q2 - The second point of the second line segment.
72
+ * @returns {boolean} True if the line segments intersect, false otherwise.
73
73
  */
74
74
  export function intersects(p1: object, q1: object, p2: object, q2: object): boolean;
75
75
  /**
76
- * TBD.
77
- * @param {object} a - TBD.
78
- * @param {object} b - TBD.
79
- * @returns {boolean} TBD.
76
+ * Determines if two line segments intersect.
77
+ * @param {object} a - The first point of the line segment.
78
+ * @param {object} b - The second point of the line segment.
79
+ * @returns {boolean} True if the points are collinear, false otherwise.
80
80
  */
81
81
  export function intersectsPolygon(a: object, b: object): boolean;
82
82
  /**
83
- * TBD.
84
- * @param {object} a - TBD.
85
- * @param {object} b - TBD.
86
- * @returns {object} TBD.
83
+ * Calculates the cross product of three points.
84
+ * @param {object} a - The first point of the cross product.
85
+ * @param {object} b - The second point of the cross product.
86
+ * @returns {object} The calculated cross product result.
87
87
  */
88
88
  export function locallyInside(a: object, b: object): object;
89
89
  /**
90
- * TBD.
91
- * @param {object} a - TBD.
92
- * @param {object} b - TBD.
93
- * @returns {boolean} TBD.
90
+ * Determines if a point is inside the triangle defined by three points.
91
+ * @param {object} a - The first point of the triangle.
92
+ * @param {object} b - The second point of the triangle.
93
+ * @returns {boolean} True if the point is inside the triangle, false otherwise.
94
94
  */
95
95
  export function middleInside(a: object, b: object): boolean;
96
96
  /**
97
- * TBD.
98
- * @param {object} a - TBD.
99
- * @param {object} b - TBD.
100
- * @returns {boolean} TBD.
97
+ * Determines if a point is inside the triangle defined by three points.
98
+ * @param {object} a - The first point of the triangle.
99
+ * @param {object} b - The second point of the triangle.
100
+ * @returns {boolean} True if the point is inside the triangle, false otherwise.
101
101
  */
102
102
  export function isValidDiagonal(a: object, b: object): boolean;
103
103
  /**
104
- * TBD.
104
+ * Calculates the distance from a point to a triangle edge.
105
105
  * @param {object} a - TBD.
106
106
  * @param {object} b - TBD.
107
107
  * @returns {object} TBD.
@@ -138,78 +138,78 @@ export function isEar(ear: object): boolean;
138
138
  export function isEarHashed(ear: object, minX: number, minY: number, size: number): boolean;
139
139
  /**
140
140
  * TBD.
141
- * @param {object} data - TBD.
142
- * @param {number} start - TBD.
143
- * @param {number} end - TBD.
144
- * @param {number} dim - TBD.
145
- * @param {boolean} clockwise - TBD.
146
- * @returns {object} TBD.
141
+ * @param {object} data - The earcut data structure containing the points.
142
+ * @param {number} start - The starting index in the data structure.
143
+ * @param {number} end - The ending index in the data structure.
144
+ * @param {number} dim - The dimension of the data (2 or 3).
145
+ * @param {boolean} clockwise - Whether the triangles should be clockwise or counterclockwise.
146
+ * @returns {object} The processed earcut data structure with triangulation information.
147
147
  */
148
148
  export function linkedList(data: object, start: number, end: number, dim: number, clockwise: boolean): object;
149
149
  /**
150
- * TBD.
151
- * @param {object} start - TBD.
152
- * @param {object} end - TBD.
153
- * @returns {object} TBD.
150
+ * Calculates the minimum and maximum coordinates of a set of points.
151
+ * @param {object} start - The starting point in the data structure.
152
+ * @param {object} end - The ending point in the data structure.
153
+ * @returns {object} The calculated bounding box with min and max coordinates.
154
154
  */
155
155
  export function filterPoints(start: object, end: object): object;
156
156
  /**
157
- * TBD.
158
- * @param {object} hole - TBD.
159
- * @param {object} outerNode - TBD.
160
- * @returns {object} TBD.
157
+ * Calculates the minimum and maximum coordinates of a set of points.
158
+ * @param {object} hole - The hole to process.
159
+ * @param {object} outerNode - The outer node that contains the hole.
160
+ * @returns {object} The processed hole data structure.
161
161
  */
162
162
  export function findHoleBridge(hole: object, outerNode: object): object;
163
163
  /**
164
- * TBD.
165
- * @param {object} hole - TBD.
166
- * @param {object} outerNode - TBD.
164
+ * Processes a hole in the triangulation data structure.
165
+ * @param {object} hole - The hole to process.
166
+ * @param {object} outerNode - The outer node that contains the hole.
167
167
  */
168
168
  export function eliminateHole(hole: object, outerNode: object): void;
169
169
  /**
170
- * TBD.
171
- * @param {object} data - TBD.
172
- * @param {object} holeIndices - TBD.
173
- * @param {object} outerNode - TBD.
174
- * @param {object} dim - TBD.
175
- * @returns {object} TBD.
170
+ * Calculates the centroid of a polygon.
171
+ * @param {object} data - The earcut data structure containing the points.
172
+ * @param {object} holeIndices - The indices of the holes in the data structure.
173
+ * @param {object} outerNode - The outer node that contains the holes.
174
+ * @param {object} dim - The dimension of the data (2 or 3).
175
+ * @returns {object} The processed earcut data structure with holes included.
176
176
  */
177
177
  export function eliminateHoles(data: object, holeIndices: object, outerNode: object, dim: object): object;
178
178
  /**
179
- * TBD.
180
- * @param {object} start - TBD.
181
- * @param {object} triangles - TBD.
182
- * @param {number} dim - TBD.
183
- * @returns {object} TBD.
179
+ * Calculates the centroid of a polygon.
180
+ * @param {object} start - The starting point in the data structure.
181
+ * @param {object} triangles - The triangles to process.
182
+ * @param {number} dim - The dimension of the data (2 or 3).
183
+ * @returns {object} The processed triangulation data structure.
184
184
  */
185
185
  export function cureLocalIntersections(start: object, triangles: object, dim: number): object;
186
186
  /**
187
- * TBD.
188
- * @param {object} start - TBD.
189
- * @param {object} triangles - TBD.
190
- * @param {number} dim - TBD.
191
- * @param {number} minX - TBD.
192
- * @param {number} minY - TBD.
193
- * @param {number} size - TBD.
187
+ * Calculates the centroid of a polygon.
188
+ * @param {object} start - The starting point in the data structure.
189
+ * @param {object} triangles - The triangles to process.
190
+ * @param {number} dim - The dimension of the data (2 or 3).
191
+ * @param {number} minX - The minimum x-coordinate of the bounding box.
192
+ * @param {number} minY - The minimum y-coordinate of the bounding box.
193
+ * @param {number} size - The size of the bounding box.
194
194
  */
195
195
  export function splitEarcut(start: object, triangles: object, dim: number, minX: number, minY: number, size: number): void;
196
196
  /**
197
- * TBD.
198
- * @param {object} ear - TBD.
199
- * @param {object} triangles - TBD.
200
- * @param {number} dim - TBD.
201
- * @param {number} minX - TBD.
202
- * @param {number} minY - TBD.
203
- * @param {number} size - TBD.
204
- * @param {object} pass - TBD.
197
+ * Calculates the centroid of a polygon.
198
+ * @param {object} ear - The ear to process.
199
+ * @param {object} triangles - The triangles to process.
200
+ * @param {number} dim - The dimension of the data (2 or 3).
201
+ * @param {number} minX - The minimum x-coordinate of the bounding box.
202
+ * @param {number} minY - The minimum y-coordinate of the bounding box.
203
+ * @param {number} size - The size of the bounding box.
204
+ * @param {object} pass - The pass information for triangulation.
205
205
  */
206
206
  export function earcutLinked(ear: object, triangles: object, dim: number, minX: number, minY: number, size: number, pass: object): void;
207
207
  /**
208
- * TBD.
209
- * @param {object} data - TBD.
210
- * @param {object} holeIndices - TBD.
211
- * @param {number} dim - TBD.
212
- * @returns {object} TBD.
208
+ * Calculates the centroid of a polygon.
209
+ * @param {object} data - The earcut data structure containing the points.
210
+ * @param {object} holeIndices - The indices of the holes in the data structure.
211
+ * @param {number} dim - The dimension of the data (2 or 3).
212
+ * @returns {object} The processed earcut data structure with triangulation information.
213
213
  */
214
214
  export function triangulate(data: object, holeIndices: object, dim: number): object;
215
215
  //# sourceMappingURL=earcut.d.ts.map
@@ -1,9 +1,9 @@
1
1
  export class Node {
2
2
  /**
3
- * TBD.
4
- * @param {number} i - TBD.
5
- * @param {number} x - TBD.
6
- * @param {number} y - TBD.
3
+ * Creates a new Node instance.
4
+ * @param {number} i - The vertice index in coordinates array.
5
+ * @param {number} x - The x coordinate of the vertex.
6
+ * @param {number} y - The y coordinate of the vertex.
7
7
  */
8
8
  constructor(i: number, x: number, y: number);
9
9
  i: number;
@@ -1,7 +1,7 @@
1
1
  export class FastSpriteBatch {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext & { id: number }} gl - TBD.
3
+ * Creates a new FastSpriteBatch instance.
4
+ * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext & {
7
7
  id: number;
@@ -22,8 +22,8 @@ export class FastSpriteBatch {
22
22
  shader: any;
23
23
  matrix: any;
24
24
  /**
25
- * TBD.
26
- * @param {WebGLRenderingContext & { id: number }} gl - TBD.
25
+ * Sets the WebGL context for this batch.
26
+ * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context.
27
27
  */
28
28
  setContext(gl: WebGLRenderingContext & {
29
29
  id: number;
@@ -32,35 +32,35 @@ export class FastSpriteBatch {
32
32
  id: number;
33
33
  };
34
34
  /**
35
- * TBD.
36
- * @param {object} spriteBatch - TBD.
37
- * @param {object} renderSession - TBD.
35
+ * Renders a sprite batch using WebGL.
36
+ * @param {object} spriteBatch - The sprite batch to render.
37
+ * @param {object} renderSession - The render session to use.
38
38
  */
39
39
  begin(spriteBatch: object, renderSession: object): void;
40
40
  /**
41
- * TBD.
41
+ * Updates the sprite batch.
42
42
  */
43
43
  end(): void;
44
44
  /**
45
- * TBD.
46
- * @param {object} spriteBatch - TBD.
45
+ * Flushes the sprite batch to WebGL.
46
+ * @param {object} spriteBatch - The sprite batch to flush.
47
47
  */
48
48
  render(spriteBatch: object): void;
49
49
  /**
50
- * TBD.
51
- * @param {import('../../display/image.js').Image} sprite - TBD.
50
+ * Renders a sprite using WebGL.
51
+ * @param {import('../../display/image.js').Image} sprite - The sprite to render.
52
52
  */
53
53
  renderSprite(sprite: import("../../display/image.js").Image): void;
54
54
  /**
55
- * TBD.
55
+ * Binds the sprite batch to the WebGL context.
56
56
  */
57
57
  flush(): void;
58
58
  /**
59
- * TBD.
59
+ * Renders a sprite using the sprite batch.
60
60
  */
61
61
  stop(): void;
62
62
  /**
63
- * TBD.
63
+ * Sets up the sprite batch for WebGL rendering.
64
64
  */
65
65
  start(): void;
66
66
  }
@@ -3,34 +3,34 @@ export class WebGLFilterManager {
3
3
  offsetX: number;
4
4
  offsetY: number;
5
5
  /**
6
- * TBD.
7
- * @param {WebGLRenderingContext} gl - TBD.
6
+ * Initializes the filter manager with a WebGL context.
7
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
8
8
  */
9
9
  setContext(gl: WebGLRenderingContext): void;
10
10
  gl: WebGLRenderingContext;
11
11
  texturePool: any[];
12
12
  /**
13
- * TBD.
13
+ * Applies a filter to the specified texture.
14
14
  */
15
15
  begin(): void;
16
16
  /**
17
- * TBD.
17
+ * Updates the filter texture for the specified size.
18
18
  */
19
19
  pushFilter(): void;
20
20
  /**
21
- * TBD.
21
+ * Resizes the filter manager to the specified dimensions.
22
22
  */
23
23
  popFilter(): void;
24
24
  /**
25
- * TBD.
25
+ * Destroys this filter manager and cleans up resources.
26
26
  */
27
27
  applyFilterPass(): void;
28
28
  /**
29
- * TBD.
29
+ * Initializes the filter manager.
30
30
  */
31
31
  initShaderBuffers(): void;
32
32
  /**
33
- * TBD.
33
+ * Sets up the filter manager for WebGL rendering.
34
34
  */
35
35
  destroy(): void;
36
36
  }
@@ -1,10 +1,10 @@
1
1
  export class FilterTexture {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext} gl - TBD.
5
- * @param {number} width - TBD.
6
- * @param {number} height - TBD.
7
- * @param {number} scaleMode - TBD.
3
+ * Creates a new FilterTexture instance.
4
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
5
+ * @param {number} width - The width of the filter texture.
6
+ * @param {number} height - The height of the filter texture.
7
+ * @param {number} scaleMode - The scale mode to use.
8
8
  */
9
9
  constructor(gl: WebGLRenderingContext, width: number, height: number, scaleMode: number);
10
10
  gl: WebGLRenderingContext;
@@ -12,19 +12,19 @@ export class FilterTexture {
12
12
  texture: WebGLTexture;
13
13
  renderBuffer: WebGLRenderbuffer;
14
14
  /**
15
- * TBD.
15
+ * Destroys this filter texture and cleans up resources.
16
16
  */
17
17
  clear(): void;
18
18
  /**
19
- * TBD.
20
- * @param {number} width - TBD.
21
- * @param {number} height - TBD.
19
+ * Updates the size of this filter texture.
20
+ * @param {number} width - The new width of the filter texture.
21
+ * @param {number} height - The new height of the filter texture.
22
22
  */
23
23
  resize(width: number, height: number): void;
24
24
  width: any;
25
25
  height: number;
26
26
  /**
27
- * TBD.
27
+ * Updates the resolution of this filter texture.
28
28
  */
29
29
  destroy(): void;
30
30
  }
@@ -1,7 +1,7 @@
1
1
  export class GraphicsData {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext} gl - TBD.
3
+ * Creates a new GraphicsData instance.
4
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext);
7
7
  gl: WebGLRenderingContext;
@@ -14,13 +14,13 @@ export class GraphicsData {
14
14
  alpha: number;
15
15
  dirty: boolean;
16
16
  /**
17
- * TBD.
17
+ * Destroys this graphics data and cleans up resources.
18
18
  */
19
19
  reset(): void;
20
20
  glPoints: Float32Array<ArrayBuffer>;
21
21
  glIndicies: Uint16Array<ArrayBuffer>;
22
22
  /**
23
- * TBD.
23
+ * Updates the graphics data for WebGL rendering.
24
24
  */
25
25
  upload(): void;
26
26
  }
@@ -1,11 +1,11 @@
1
1
  export class RenderTexture extends Texture {
2
2
  /**
3
- * TBD.
4
- * @param {number} width - TBD.
5
- * @param {number} height - TBD.
6
- * @param {import('./renderer.js').WebGLRenderer|import('../canvas/renderer.js').CanvasRenderer} renderer - TBD.
7
- * @param {number} scaleMode - TBD.
8
- * @param {number} resolution - TBD.
3
+ * Creates a new RenderTexture instance.
4
+ * @param {number} width - The width of the render texture.
5
+ * @param {number} height - The height of the render texture.
6
+ * @param {import('./renderer.js').WebGLRenderer|import('../canvas/renderer.js').CanvasRenderer} renderer - The renderer to use.
7
+ * @param {number} scaleMode - The scale mode to use.
8
+ * @param {number} resolution - The resolution to use.
9
9
  */
10
10
  constructor(width: number, height: number, renderer: import("./renderer.js").WebGLRenderer | import("../canvas/renderer.js").CanvasRenderer, scaleMode: number, resolution?: number);
11
11
  resolution: number;
@@ -14,34 +14,34 @@ export class RenderTexture extends Texture {
14
14
  render: () => void;
15
15
  projection: Point;
16
16
  /**
17
- * TBD.
17
+ * Destroys this render texture and cleans up resources.
18
18
  */
19
19
  resize(): void;
20
20
  /**
21
- * TBD.
21
+ * Updates the size of this render texture.
22
22
  */
23
23
  clear(): void;
24
24
  /**
25
- * TBD.
25
+ * Updates the resolution of this render texture.
26
26
  */
27
27
  renderWebGL(): void;
28
28
  /**
29
- * TBD.
29
+ * Updates the scale mode of this render texture.
30
30
  */
31
31
  renderCanvas(): void;
32
32
  /**
33
- * TBD.
34
- * @returns {HTMLImageElement} TBD.
33
+ * Gets the HTML image element for this render texture.
34
+ * @returns {HTMLImageElement} The HTML image element.
35
35
  */
36
36
  getImage(): HTMLImageElement;
37
37
  /**
38
- * TBD.
39
- * @returns {string} TBD.
38
+ * Gets the base64 string representation of this render texture.
39
+ * @returns {string} The base64 string representation.
40
40
  */
41
41
  getBase64(): string;
42
42
  /**
43
- * TBD.
44
- * @returns {HTMLCanvasElement} TBD.
43
+ * Gets the canvas element for this render texture.
44
+ * @returns {HTMLCanvasElement} The canvas element.
45
45
  */
46
46
  getCanvas(): HTMLCanvasElement;
47
47
  }