@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,7 +1,7 @@
1
1
  export class WebGLRenderer {
2
2
  /**
3
- * TBD.
4
- * @param {import('../../core/game.js').Game} game - TBD.
3
+ * Creates a new WebGLRenderer instance.
4
+ * @param {import('../../core/game.js').Game} game - The game instance.
5
5
  */
6
6
  constructor(game: import("../../core/game.js").Game);
7
7
  /** @type {number} */
@@ -31,50 +31,50 @@ export class WebGLRenderer {
31
31
  blendModeManager: WebGLBlendModeManager;
32
32
  renderSession: {};
33
33
  /**
34
- * TBD.
34
+ * Destroys this renderer and cleans up resources.
35
35
  */
36
36
  destroy(): void;
37
37
  gl: WebGLRenderingContext & {
38
38
  id: number;
39
39
  };
40
40
  /**
41
- * TBD.
41
+ * Initializes the WebGL registry.
42
42
  */
43
43
  initRegistry(): void;
44
44
  /**
45
- * TBD.
46
- * @param {import('../../core/game.js').Game} game - TBD.
45
+ * Initializes the WebGL context for rendering.
46
+ * @param {import('../../core/game.js').Game} game - The game instance.
47
47
  * @throws {Error}
48
48
  */
49
49
  initContext(game: import("../../core/game.js").Game): void;
50
50
  glContextId: any;
51
51
  /**
52
- * TBD.
53
- * @param {import('../../core/stage.js').Stage} stage - TBD.
52
+ * Renders the stage to WebGL.
53
+ * @param {import('../../core/stage.js').Stage} stage - The root stage to render.
54
54
  */
55
55
  render(stage: import("../../core/stage.js").Stage): void;
56
56
  /**
57
- * TBD.
58
- * @param {import('../../display/display_object.js').DisplayObject} displayObject - TBD.
59
- * @param {Point} projection - TBD.
60
- * @param {object} buffer - TBD.
61
- * @param {import('../../geom/matrix.js').Matrix} matrix - TBD.
57
+ * Renders a display object to WebGL.
58
+ * @param {import('../../display/display_object.js').DisplayObject} displayObject - The display object to render.
59
+ * @param {Point} projection - The projection matrix.
60
+ * @param {object} buffer - The render buffer.
61
+ * @param {import('../../geom/matrix.js').Matrix} matrix - The transformation matrix.
62
62
  */
63
63
  renderDisplayObject(displayObject: import("../../display/display_object.js").DisplayObject, projection: Point, buffer: object, matrix: import("../../geom/matrix.js").Matrix): void;
64
64
  /**
65
- * TBD.
66
- * @param {number} width - TBD.
67
- * @param {number} height - TBD.
65
+ * Resizes the WebGL canvas to the specified dimensions.
66
+ * @param {number} width - The new width of the canvas.
67
+ * @param {number} height - The new height of the canvas.
68
68
  */
69
69
  resize(width: number, height: number): void;
70
70
  /**
71
- * TBD.
72
- * @param {import('./base_texture.js').BaseTexture} texture - TBD.
73
- * @returns {boolean} TBD.
71
+ * Updates a texture in the WebGL context.
72
+ * @param {import('./base_texture.js').BaseTexture} texture - The base texture to update.
73
+ * @returns {boolean} Whether the update was successful.
74
74
  */
75
75
  updateTexture(texture: import("./base_texture.js").BaseTexture): boolean;
76
76
  /**
77
- * TBD.
77
+ * Maps blend modes to WebGL rendering operations.
78
78
  */
79
79
  mapBlendModes(): void;
80
80
  }
@@ -1,7 +1,7 @@
1
1
  export class ComplexPrimitiveShader {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext} gl - TBD.
3
+ * Creates a new ComplexShader instance.
4
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext);
7
7
  gl: WebGLRenderingContext;
@@ -11,7 +11,7 @@ export class ComplexPrimitiveShader {
11
11
  fragmentSrc: string[];
12
12
  vertexSrc: string[];
13
13
  /**
14
- * TBD.
14
+ * Destroys this shader and cleans up resources.
15
15
  */
16
16
  init(): void;
17
17
  projectionVector: WebGLUniformLocation;
@@ -24,7 +24,7 @@ export class ComplexPrimitiveShader {
24
24
  translationMatrix: WebGLUniformLocation;
25
25
  alpha: WebGLUniformLocation;
26
26
  /**
27
- * TBD.
27
+ * Binds this shader to the WebGL context.
28
28
  */
29
29
  destroy(): void;
30
30
  uniforms: any;
@@ -1,7 +1,7 @@
1
1
  export class FastShader {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext} gl - TBD.
3
+ * Creates a new FastShader instance.
4
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext);
7
7
  gl: WebGLRenderingContext;
@@ -12,7 +12,7 @@ export class FastShader {
12
12
  fragmentSrc: string[];
13
13
  vertexSrc: string[];
14
14
  /**
15
- * TBD.
15
+ * Creates a new FastShader instance.
16
16
  */
17
17
  init(): void;
18
18
  uSampler: WebGLUniformLocation;
@@ -28,7 +28,7 @@ export class FastShader {
28
28
  colorAttribute: number;
29
29
  attributes: number[];
30
30
  /**
31
- * TBD.
31
+ * Destroys this shader and cleans up resources.
32
32
  */
33
33
  destroy(): void;
34
34
  uniforms: any;
@@ -1,7 +1,7 @@
1
1
  export class NormalShader {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext & { id: number }} gl - TBD.
3
+ * Creates a new NormalShader instance.
4
+ * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext & {
7
7
  id: number;
@@ -21,7 +21,7 @@ export class NormalShader {
21
21
  uniforms: {};
22
22
  attributes: any[];
23
23
  /**
24
- * TBD.
24
+ * Destroys this shader and cleans up resources.
25
25
  */
26
26
  init(): void;
27
27
  uSampler: WebGLUniformLocation;
@@ -32,20 +32,20 @@ export class NormalShader {
32
32
  aTextureCoord: number;
33
33
  colorAttribute: number;
34
34
  /**
35
- * TBD.
35
+ * Binds this shader to the WebGL context.
36
36
  */
37
37
  initUniforms(): void;
38
38
  /**
39
- * TBD.
40
- * @param {object} uniform - TBD.
39
+ * Sets a uniform value for this shader.
40
+ * @param {object} uniform - The uniform to set.
41
41
  */
42
42
  initSampler2D(uniform: object): void;
43
43
  /**
44
- * TBD.
44
+ * Sets the shader to use for rendering.
45
45
  */
46
46
  syncUniforms(): void;
47
47
  /**
48
- * TBD.
48
+ * Destroys this shader and cleans up resources.
49
49
  */
50
50
  destroy(): void;
51
51
  }
@@ -1,7 +1,7 @@
1
1
  export class PrimitiveShader {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext} gl - TBD.
3
+ * Creates a new PrimitiveShader instance.
4
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext);
7
7
  gl: WebGLRenderingContext;
@@ -11,7 +11,7 @@ export class PrimitiveShader {
11
11
  fragmentSrc: string[];
12
12
  vertexSrc: string[];
13
13
  /**
14
- * TBD.
14
+ * Destroys this shader and cleans up resources.
15
15
  */
16
16
  init(): void;
17
17
  projectionVector: WebGLUniformLocation;
@@ -24,7 +24,7 @@ export class PrimitiveShader {
24
24
  translationMatrix: WebGLUniformLocation;
25
25
  alpha: WebGLUniformLocation;
26
26
  /**
27
- * TBD.
27
+ * Binds this shader to the WebGL context.
28
28
  */
29
29
  destroy(): void;
30
30
  uniforms: any;
@@ -1,7 +1,7 @@
1
1
  export class StripShader {
2
2
  /**
3
- * TBD.
4
- * @param {WebGLRenderingContext} gl - TBD.
3
+ * Creates a new StripShader instance.
4
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
5
5
  */
6
6
  constructor(gl: WebGLRenderingContext);
7
7
  gl: WebGLRenderingContext;
@@ -11,7 +11,7 @@ export class StripShader {
11
11
  fragmentSrc: string[];
12
12
  vertexSrc: string[];
13
13
  /**
14
- * TBD.
14
+ * Destroys this shader and cleans up resources.
15
15
  */
16
16
  init(): void;
17
17
  uSampler: WebGLUniformLocation;
@@ -24,7 +24,7 @@ export class StripShader {
24
24
  translationMatrix: WebGLUniformLocation;
25
25
  alpha: WebGLUniformLocation;
26
26
  /**
27
- * TBD.
27
+ * Binds this shader to the WebGL context.
28
28
  */
29
29
  destroy(): void;
30
30
  uniforms: any;
@@ -12,27 +12,27 @@ export class WebGLShaderManager {
12
12
  tempAttribState: any[];
13
13
  stack: any[];
14
14
  /**
15
- * TBD.
16
- * @param {WebGLRenderingContext & { id: number }} gl - TBD.
15
+ * Initializes the shader manager with a WebGL context.
16
+ * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context.
17
17
  */
18
18
  setContext(gl: WebGLRenderingContext & {
19
19
  id: number;
20
20
  }): void;
21
21
  /**
22
- * TBD.
23
- * @param {number[]} attribs - TBD.
22
+ * Sets up the shader manager for WebGL rendering.
23
+ * @param {number[]} attribs - The attribute locations to set up.
24
24
  */
25
25
  setAttribs(attribs: number[]): void;
26
26
  /**
27
- * TBD.
28
- * @param {NormalShader} shader - TBD.
29
- * @returns {boolean} TBD.
27
+ * Sets up the shader manager for WebGL rendering.
28
+ * @param {NormalShader} shader - The shader to set up.
29
+ * @returns {boolean} Whether the shader setup was successful.
30
30
  */
31
31
  setShader(shader: NormalShader): boolean;
32
32
  _currentId: any;
33
33
  currentShader: NormalShader;
34
34
  /**
35
- * TBD.
35
+ * Destroys the manager.
36
36
  */
37
37
  destroy(): void;
38
38
  }
@@ -16,8 +16,8 @@ export class WebGLSpriteBatch {
16
16
  sprites: any[];
17
17
  defaultShader: AbstractFilter;
18
18
  /**
19
- * TBD.
20
- * @param {WebGLRenderingContext & { id: number }} gl - TBD.
19
+ * Renders a sprite using WebGL.
20
+ * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context.
21
21
  */
22
22
  setContext(gl: WebGLRenderingContext & {
23
23
  id: number;
@@ -29,47 +29,47 @@ export class WebGLSpriteBatch {
29
29
  indexBuffer: WebGLBuffer;
30
30
  currentBlendMode: number;
31
31
  /**
32
- * TBD.
33
- * @param {object} renderSession - TBD.
32
+ * Renders the sprite batch using WebGL.
33
+ * @param {object} renderSession - The render session to use.
34
34
  */
35
35
  begin(renderSession: object): void;
36
36
  renderSession: any;
37
37
  shader: any;
38
38
  /**
39
- * TBD.
39
+ * Updates the sprite batch.
40
40
  */
41
41
  end(): void;
42
42
  /**
43
- * TBD.
44
- * @param {import('../../display/image.js').Image} sprite - TBD.
45
- * @param {import('../../geom/matrix.js').Matrix} matrix - TBD.
43
+ * Renders a sprite using the sprite batch.
44
+ * @param {import('../../display/image.js').Image} sprite - The sprite to render.
45
+ * @param {import('../../geom/matrix.js').Matrix} matrix - The transformation matrix.
46
46
  */
47
47
  render(sprite: import("../../display/image.js").Image, matrix: import("../../geom/matrix.js").Matrix): void;
48
48
  /**
49
- * TBD.
49
+ * Binds the sprite batch to the WebGL context.
50
50
  */
51
51
  renderTilingSprite(): void;
52
52
  /**
53
- * TBD.
53
+ * Updates the sprite batch.
54
54
  */
55
55
  flush(): void;
56
56
  /**
57
- * TBD.
58
- * @param {import('./base_texture.js').BaseTexture} texture - TBD.
59
- * @param {number} size - TBD.
60
- * @param {number} startIndex - TBD.
57
+ * Updates the sprite batch with a new texture.
58
+ * @param {import('./base_texture.js').BaseTexture} texture - The texture to use.
59
+ * @param {number} size - The size of the batch.
60
+ * @param {number} startIndex - The start index in the batch.
61
61
  */
62
62
  renderBatch(texture: import("./base_texture.js").BaseTexture, size: number, startIndex: number): void;
63
63
  /**
64
- * TBD.
64
+ * Destroys this sprite batch and cleans up resources.
65
65
  */
66
66
  stop(): void;
67
67
  /**
68
- * TBD.
68
+ * Renders the sprite batch using Canvas.
69
69
  */
70
70
  start(): void;
71
71
  /**
72
- * TBD.
72
+ * Destroys the sprite batch instance.
73
73
  */
74
74
  destroy(): void;
75
75
  }
@@ -3,34 +3,34 @@ export class WebGLStencilManager {
3
3
  reverse: boolean;
4
4
  count: number;
5
5
  /**
6
- * TBD.
7
- * @param {WebGLRenderingContext} gl - TBD.
6
+ * Binds the stencil buffer for rendering.
7
+ * @param {WebGLRenderingContext} gl - The WebGL rendering context.
8
8
  */
9
9
  setContext(gl: WebGLRenderingContext): void;
10
10
  gl: WebGLRenderingContext;
11
11
  /**
12
- * TBD.
12
+ * Sets up the stencil buffer for rendering.
13
13
  */
14
14
  destroy(): void;
15
15
  /**
16
- * TBD.
17
- * @param {import('../graphics.js').Graphics} graphics - TBD.
18
- * @param {import('./graphics_data.js').GraphicsData} webGLData - TBD.
19
- * @param {object} renderSession - TBD.
16
+ * Renders the stencil buffer for graphics.
17
+ * @param {import('../graphics.js').Graphics} graphics - The graphics object to render.
18
+ * @param {import('./graphics_data.js').GraphicsData} webGLData - The WebGL graphics data.
19
+ * @param {object} renderSession - The rendering session.
20
20
  */
21
21
  pushStencil(graphics: import("../graphics.js").Graphics, webGLData: import("./graphics_data.js").GraphicsData, renderSession: object): void;
22
22
  /**
23
- * TBD.
24
- * @param {import('../graphics.js').Graphics} graphics - TBD.
25
- * @param {import('./graphics_data.js').GraphicsData} webGLData - TBD.
26
- * @param {object} renderSession - TBD.
23
+ * Renders the stencil buffer for graphics.
24
+ * @param {import('../graphics.js').Graphics} graphics - The graphics object to render.
25
+ * @param {import('./graphics_data.js').GraphicsData} webGLData - The WebGL graphics data.
26
+ * @param {object} renderSession - The rendering session.
27
27
  */
28
28
  bindGraphics(graphics: import("../graphics.js").Graphics, webGLData: import("./graphics_data.js").GraphicsData, renderSession: object): void;
29
29
  /**
30
- * TBD.
31
- * @param {import('../graphics.js').Graphics} graphics - TBD.
32
- * @param {import('./graphics_data.js').GraphicsData} webGLData - TBD.
33
- * @param {object} renderSession - TBD.
30
+ * Renders the stencil buffer for graphics.
31
+ * @param {import('../graphics.js').Graphics} graphics - The graphics object to render.
32
+ * @param {import('./graphics_data.js').GraphicsData} webGLData - The WebGL graphics data.
33
+ * @param {object} renderSession - The rendering session.
34
34
  */
35
35
  popStencil(graphics: import("../graphics.js").Graphics, webGLData: import("./graphics_data.js").GraphicsData, renderSession: object): void;
36
36
  }
@@ -10,11 +10,11 @@ export class TextureUvs {
10
10
  }
11
11
  export class Texture {
12
12
  /**
13
- * TBD.
14
- * @param {import('./base_texture.js').BaseTexture} baseTexture - TBD.
15
- * @param {Rectangle | null | undefined} frame - TBD.
16
- * @param {Rectangle | null | undefined} crop - TBD.
17
- * @param {Rectangle | null | undefined} trim - TBD.
13
+ * Creates a new Texture instance.
14
+ * @param {import('./base_texture.js').BaseTexture} baseTexture - The base texture to use.
15
+ * @param {Rectangle | null | undefined} frame - The frame rectangle.
16
+ * @param {Rectangle | null | undefined} crop - The crop rectangle.
17
+ * @param {Rectangle | null | undefined} trim - The trim rectangle.
18
18
  */
19
19
  constructor(baseTexture: import("./base_texture.js").BaseTexture, frame?: Rectangle | null | undefined, crop?: Rectangle | null | undefined, trim?: Rectangle | null | undefined);
20
20
  noFrame: boolean;
@@ -40,22 +40,22 @@ export class Texture {
40
40
  /** @type {Rectangle} */
41
41
  crop: Rectangle;
42
42
  /**
43
- * TBD.
43
+ * Destroys this texture and cleans up resources.
44
44
  */
45
45
  onBaseTextureLoaded(): void;
46
46
  /**
47
- * TBD.
48
- * @param {boolean} destroyBase - TBD.
47
+ * Destroys this texture and cleans up resources.
48
+ * @param {boolean} destroyBase - Whether to destroy the base texture as well.
49
49
  */
50
50
  destroy(destroyBase?: boolean): void;
51
51
  /**
52
- * TBD.
53
- * @param {Rectangle} frame - TBD.
54
- * @throws {Error}.
52
+ * Sets the frame of this texture.
53
+ * @param {Rectangle} frame - The new frame rectangle.
54
+ * @throws {Error} If the operation fails.
55
55
  */
56
56
  setFrame(frame: Rectangle): void;
57
57
  /**
58
- * TBD.
58
+ * Updates the texture UVs based on the crop frame.
59
59
  */
60
60
  _updateUvs(): void;
61
61
  }