@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,13 +1,13 @@
1
1
  export class BitmapText 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} font - TBD.
8
- * @param {string} text - TBD.
9
- * @param {number} size - TBD.
10
- * @param {string} align - TBD.
3
+ * Creates a new BitmapText instance.
4
+ * @param {import('../core/game.js').Game} game - The game instance this bitmap text belongs to.
5
+ * @param {number} x - The x position of the bitmap text.
6
+ * @param {number} y - The y position of the bitmap text.
7
+ * @param {string} font - The key of the bitmap font to use.
8
+ * @param {string} text - The text to display.
9
+ * @param {number} size - The font size.
10
+ * @param {string} align - The text alignment (left, center, right).
11
11
  */
12
12
  constructor(game: import("../core/game.js").Game, x?: number, y?: number, font?: string, text?: string, size?: number, align?: string);
13
13
  /** @type {number} */
@@ -36,26 +36,26 @@ export class BitmapText extends DisplayObject {
36
36
  dirty: boolean;
37
37
  renderOrderID: number;
38
38
  /**
39
- * TBD.
40
- * @param {string} text - TBD.
39
+ * Sets the text to display.
40
+ * @param {string} text - The new text to display.
41
41
  */
42
42
  setText(text: string): void;
43
43
  /**
44
- * TBD.
45
- * @param {string | number | boolean | Date} value - TBD.
44
+ * Sets the text content of this bitmap text.
45
+ * @param {string | number | boolean | Date} value - The new text content to set.
46
46
  */
47
47
  set text(value: string | number | boolean | Date);
48
48
  /**
49
- * TBD.
50
- * @returns {string} TBD.
49
+ * Gets the text content of this bitmap text.
50
+ * @returns {string} The current text content.
51
51
  */
52
52
  get text(): string;
53
53
  /**
54
- * TBD.
55
- * @param {object} data - TBD.
56
- * @param {number} scale - TBD.
57
- * @param {string} text - TBD.
58
- * @returns {{width: number, text: string, end: boolean, chars: number[]}} TBD.
54
+ * Scans a line of text to calculate its width and other properties.
55
+ * @param {object} data - The font data for this bitmap text.
56
+ * @param {number} scale - The scaling factor to apply to the font size.
57
+ * @param {string} text - The text to scan.
58
+ * @returns {{width: number, text: string, end: boolean, chars: number[]}} An object containing the width, processed text, end status, and character positions.
59
59
  */
60
60
  scanLine(data: object, scale: number, text: string): {
61
61
  width: number;
@@ -64,93 +64,100 @@ export class BitmapText extends DisplayObject {
64
64
  chars: number[];
65
65
  };
66
66
  /**
67
- * TBD.
68
- * @param {string} text - TBD.
69
- * @param {string} replace - TBD.
70
- * @returns {string} TBD.
67
+ * Cleans the provided text by removing invalid characters and replacing them with a specified character.
68
+ * @param {string} text - The text to clean.
69
+ * @param {string} replace - The character to use for replacement of invalid characters (default: '').
70
+ * @returns {string} The cleaned text.
71
71
  */
72
72
  cleanText(text: string, replace?: string): string;
73
73
  /**
74
- * TBD.
74
+ * Updates the internal text rendering based on current properties and content.
75
75
  */
76
76
  updateText(): void;
77
77
  /**
78
- * TBD.
79
- * @returns {number} TBD.
78
+ * Removes unused glyphs from the pool and returns the number removed.
79
+ * @returns {number} The number of glyphs that were removed from the pool.
80
80
  */
81
81
  purgeGlyphs(): number;
82
82
  /**
83
- * TBD.
83
+ * Updates the transform of this bitmap text, updating its text if needed.
84
84
  */
85
85
  updateTransform(): void;
86
86
  /**
87
- * TBD.
88
- * @param {string} value - TBD.
89
- * @param {number} position - TBD.
90
- * @returns {BitmapText} TBD.
87
+ * Adds a color to a specific position in the text.
88
+ * @param {string} value - The color to apply (in hex format or CSS color name).
89
+ * @param {number} position - The character position to apply the color to.
90
+ * @returns {BitmapText} This bitmap text instance for chaining.
91
91
  */
92
92
  addColor(value: string, position: number): BitmapText;
93
93
  /**
94
- * TBD.
94
+ * Sets the text alignment property.
95
+ * @param {string} value - The new text alignment (left, center, right).
95
96
  */
96
97
  set align(value: string);
97
98
  /**
98
- * TBD.
99
- * @returns {string} TBD.
99
+ * Gets the text alignment property.
100
+ * @returns {string} The current text alignment (left, center, right).
100
101
  */
101
102
  get align(): string;
102
103
  /**
103
- * TBD.
104
+ * Sets the tint color of this bitmap text.
105
+ * @param {number} value - The new tint color in RGB format.
104
106
  */
105
107
  set tint(value: number);
106
108
  /**
107
- * TBD.
108
- * @returns {number} TBD.
109
+ * Gets the tint color of this bitmap text.
110
+ * @returns {number} The current tint color in RGB format.
109
111
  */
110
112
  get tint(): number;
111
113
  /**
112
- * TBD.
114
+ * Sets the fill color of this bitmap text.
115
+ * @param {string} value - The new fill color in hex format or CSS color name.
113
116
  */
114
117
  set fill(value: string);
115
118
  /**
116
- * TBD.
117
- * @returns {string} TBD.
119
+ * Gets the fill color of this bitmap text as a hex string.
120
+ * @returns {string} The current fill color in hex format.
118
121
  */
119
122
  get fill(): string;
120
123
  /**
121
- * TBD.
124
+ * Sets the font key used by this bitmap text.
125
+ * @param {string} value - The new font key to use.
122
126
  */
123
127
  set font(value: string);
124
128
  /**
125
- * TBD.
126
- * @returns {string} TBD.
129
+ * Gets the font key used by this bitmap text.
130
+ * @returns {string} The current font key.
127
131
  */
128
132
  get font(): string;
129
133
  /**
130
- * TBD.
134
+ * Sets the font size of this bitmap text.
135
+ * @param {number} value - The new font size to use.
131
136
  */
132
137
  set fontSize(value: number);
133
138
  /**
134
- * TBD.
135
- * @returns {number} TBD.
139
+ * Gets the font size of this bitmap text.
140
+ * @returns {number} The current font size.
136
141
  */
137
142
  get fontSize(): number;
138
143
  /**
139
- * TBD.
144
+ * Sets the maximum width of this bitmap text.
145
+ * @param {number} value - The new maximum width to set.
140
146
  */
141
147
  set maxWidth(value: number);
142
148
  /**
143
- * TBD.
144
- * @returns {number} TBD.
149
+ * Gets the maximum width of this bitmap text.
150
+ * @returns {number} The current maximum width.
145
151
  */
146
152
  get maxWidth(): number;
147
153
  /**
148
- * TBD.
154
+ * Sets whether smoothing is enabled for this bitmap text's font.
155
+ * @param {boolean} value - Whether to enable smoothing (true) or not (false).
149
156
  */
150
157
  set smoothed(value: boolean);
151
158
  /**
152
- * TBD.
153
- * @returns {boolean} TBD.
159
+ * Gets whether smoothing is enabled for this bitmap text's font.
160
+ * @returns {boolean} True if smoothing is enabled, false otherwise.
154
161
  */
155
162
  get smoothed(): boolean;
156
163
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bitmap_text.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/bitmap_text.js"],"names":[],"mappings":"AAKA;IACE;;;;;;;;;OASG;IACH,kBARW,OAAO,iBAAiB,EAAE,IAAI,MAC9B,MAAM,MACN,MAAM,SACN,MAAM,SACN,MAAM,SACN,MAAM,UACN,MAAM,EA8BhB;IA1BC,qBAAqB;IACrB,MADW,MAAM,CACM;IAEvB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,oBAAoB;IACpB,aADW,KAAK,CACc;IAC9B,iBAAiB;IACjB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,qBAAqB;IACrB,OADW,MAAM,CACiB;IAClC,WAA2C;IAC3C,qBAAqB;IACrB,OADW,MAAM,CACA;IACjB,qBAAqB;IACrB,WADW,MAAM,CACI;IACrB,qBAAqB;IACrB,QADW,MAAM,CACE;IACnB,qBAAqB;IACrB,OADW,MAAM,CACI;IAErB,sBAAsB;IACtB,OADW,OAAO,CACA;IAwBhB,sBAAuB;IAY3B;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAkUD;;;OAGG;IACH,gBAFW,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,EAQ1C;IAlBD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IA9TD;;;;;;OAMG;IACH,eALW,MAAM,SACN,MAAM,QACN,MAAM,GACJ;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAC,CA6DxE;IAED;;;;;OAKG;IACH,gBAJW,MAAM,YACN,MAAM,GACJ,MAAM,CAsBlB;IAED;;OAEG;IACH,mBAkEC;IAED;;;OAGG;IACH,eAFa,MAAM,CAiBlB;IAED;;OAEG;IACH,wBAOC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,YACN,MAAM,GACJ,UAAU,CAStB;IAUD;;OAEG;IACH,iBATa,MAAM,EAclB;IAhBD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAoBD;;OAEG;IACH,gBATa,MAAM,EAclB;IAhBD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IA2BD;;OAEG;IACH,gBAhBa,MAAM,EAkBlB;IApBD;;;OAGG;IACH,YAFa,MAAM,CAWlB;IAiBD;;OAEG;IACH,gBATa,MAAM,EAgBlB;IAlBD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAsBD;;OAEG;IACH,oBATa,MAAM,EAelB;IAjBD;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAyCD;;OAEG;IACH,oBATa,MAAM,EAclB;IAhBD;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAoBD;;OAEG;IACH,oBATa,OAAO,EAenB;IAjBD;;;OAGG;IACH,gBAFa,OAAO,CAInB;CAYF;8BArc6B,qBAAqB;sBAD7B,kBAAkB;sBAElB,YAAY"}
1
+ {"version":3,"file":"bitmap_text.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/bitmap_text.js"],"names":[],"mappings":"AAKA;IACE;;;;;;;;;OASG;IACH,kBARW,OAAO,iBAAiB,EAAE,IAAI,MAC9B,MAAM,MACN,MAAM,SACN,MAAM,SACN,MAAM,SACN,MAAM,UACN,MAAM,EA8BhB;IA1BC,qBAAqB;IACrB,MADW,MAAM,CACM;IAEvB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,oBAAoB;IACpB,aADW,KAAK,CACc;IAC9B,iBAAiB;IACjB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,qBAAqB;IACrB,OADW,MAAM,CACiB;IAClC,WAA2C;IAC3C,qBAAqB;IACrB,OADW,MAAM,CACA;IACjB,qBAAqB;IACrB,WADW,MAAM,CACI;IACrB,qBAAqB;IACrB,QADW,MAAM,CACE;IACnB,qBAAqB;IACrB,OADW,MAAM,CACI;IAErB,sBAAsB;IACtB,OADW,OAAO,CACA;IAwBhB,sBAAuB;IAY3B;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAuUD;;;OAGG;IACH,gBAFW,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,EAQ1C;IAlBD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAnUD;;;;;;OAMG;IACH,eALW,MAAM,SACN,MAAM,QACN,MAAM,GACJ;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAC,CA6DxE;IAED;;;;;OAKG;IACH,gBAJW,MAAM,YACN,MAAM,GACJ,MAAM,CAsBlB;IAED;;OAEG;IACH,mBAkEC;IAED;;;OAGG;IACH,eAFa,MAAM,CAiBlB;IAED;;OAEG;IACH,wBAOC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,YACN,MAAM,GACJ,UAAU,CAStB;IAUD;;;OAGG;IACH,iBAFW,MAAM,EAOhB;IAjBD;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAqBD;;;OAGG;IACH,gBAFW,MAAM,EAOhB;IAjBD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IA4BD;;;OAGG;IACH,gBAFW,MAAM,EAIhB;IArBD;;;OAGG;IACH,YAFa,MAAM,CAWlB;IAkBD;;;OAGG;IACH,gBAFW,MAAM,EAShB;IAnBD;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAuBD;;;OAGG;IACH,oBAFW,MAAM,EAQhB;IAlBD;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IA0CD;;;OAGG;IACH,oBAFW,MAAM,EAOhB;IAjBD;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAqBD;;;OAGG;IACH,oBAFW,OAAO,EAQjB;IAlBD;;;OAGG;IACH,gBAFa,OAAO,CAInB;CAaF;8BA5c6B,qBAAqB;sBAD7B,kBAAkB;sBAElB,YAAY"}
@@ -1,17 +1,17 @@
1
1
  export class Button extends Image {
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} key - TBD.
8
- * @param {Function} callback - TBD.
9
- * @param {object} callbackContext - TBD.
10
- * @param {string} overFrame - TBD.
11
- * @param {string} outFrame - TBD.
12
- * @param {string} downFrame - TBD.
13
- * @param {string} upFrame - TBD.
14
- * @param {string} disabledFrame - TBD.
3
+ * Creates a new Button instance.
4
+ * @param {import('../core/game.js').Game} game - The game instance this button belongs to.
5
+ * @param {number} x - The x position of the button.
6
+ * @param {number} y - The y position of the button.
7
+ * @param {string} key - The texture key to use for the button.
8
+ * @param {Function} callback - The function to call when the button is clicked.
9
+ * @param {object} callbackContext - The context in which to call the callback function.
10
+ * @param {string} overFrame - The frame identifier to use when the mouse is over the button.
11
+ * @param {string} outFrame - The frame identifier to use when the mouse is outside the button.
12
+ * @param {string} downFrame - The frame identifier to use when the button is pressed.
13
+ * @param {string} upFrame - The frame identifier to use when the button is released.
14
+ * @param {string} disabledFrame - The frame identifier to use when the button is disabled.
15
15
  */
16
16
  constructor(game: import("../core/game.js").Game, x?: number, y?: number, key?: string, callback?: Function, callbackContext?: object, overFrame?: string, outFrame?: string, downFrame?: string, upFrame?: string, disabledFrame?: string);
17
17
  _onOverFrame: any;
@@ -29,73 +29,74 @@ export class Button extends Image {
29
29
  forceOut: boolean;
30
30
  input: InputHandler;
31
31
  /**
32
- * TBD.
33
- * @param {boolean} isEnabled - TBD.
34
- * @param {boolean} isImmediate - TBD.
32
+ * Sets whether this button is enabled or disabled.
33
+ * @param {boolean} isEnabled - Whether the button should be enabled (true) or disabled (false).
34
+ * @param {boolean} isImmediate - Whether to change the state immediately or with a delay (default: false).
35
35
  */
36
36
  setEnabled(isEnabled: boolean, isImmediate?: boolean): void;
37
37
  /**
38
- * TBD.
38
+ * Clears all the frame settings for this button.
39
39
  */
40
40
  clearFrames(): void;
41
41
  /**
42
- * TBD.
42
+ * Called when this button is removed from the world.
43
43
  */
44
44
  removedFromWorld(): void;
45
45
  /**
46
- * TBD.
46
+ * Sets whether input is currently enabled for this button.
47
+ * @param {boolean} value - Whether to enable (true) or disable (false) input.
47
48
  */
48
49
  set inputEnabled(value: boolean);
49
50
  /**
50
- * TBD.
51
- * @returns {boolean} TBD.
51
+ * Gets whether input is currently enabled for this button.
52
+ * @returns {boolean} True if input is enabled, false otherwise.
52
53
  */
53
54
  get inputEnabled(): boolean;
54
55
  /**
55
- * TBD.
56
- * @param {string} state - TBD.
57
- * @param {string} frame - TBD.
58
- * @param {boolean} switchImmediately - TBD.
56
+ * Sets a specific frame for a particular state of this button.
57
+ * @param {string} state - The state name (Over, Out, Down, Up, Disabled).
58
+ * @param {string} frame - The frame identifier to set for this state.
59
+ * @param {boolean} switchImmediately - Whether to switch to the new frame immediately (default: false).
59
60
  */
60
61
  setStateFrame(state: string, frame: string, switchImmediately?: boolean): void;
61
62
  /**
62
- * TBD.
63
- * @param {string} newState - TBD.
64
- * @returns {boolean} TBD.
63
+ * Changes the frame of this button to match the specified state.
64
+ * @param {string} newState - The new state to change to (Over, Out, Down, Up, Disabled).
65
+ * @returns {boolean} True if the frame was changed, false otherwise.
65
66
  */
66
67
  changeStateFrame(newState: string): boolean;
67
68
  /**
68
- * TBD.
69
- * @param {string} overFrame - TBD.
70
- * @param {string} outFrame - TBD.
71
- * @param {string} downFrame - TBD.
72
- * @param {string} upFrame - TBD.
73
- * @param {string} disabledFrame - TBD.
69
+ * Sets the frame identifiers for all states of this button.
70
+ * @param {string} overFrame - The frame identifier to use when the mouse is over the button.
71
+ * @param {string} outFrame - The frame identifier to use when the mouse is outside the button.
72
+ * @param {string} downFrame - The frame identifier to use when the button is pressed.
73
+ * @param {string} upFrame - The frame identifier to use when the button is released.
74
+ * @param {string} disabledFrame - The frame identifier to use when the button is disabled.
74
75
  */
75
76
  setFrames(overFrame: string, outFrame: string, downFrame: string, upFrame: string, disabledFrame?: string): void;
76
77
  /**
77
- * TBD.
78
- * @param {object} sprite - TBD.
79
- * @param {object} pointer - TBD.
78
+ * Handles the input over event for this button.
79
+ * @param {object} sprite - The sprite that triggered the event.
80
+ * @param {object} pointer - The pointer that triggered the event.
80
81
  */
81
82
  onInputOverHandler(sprite: object, pointer: object): void;
82
83
  /**
83
- * TBD.
84
- * @param {object} sprite - TBD.
85
- * @param {object} pointer - TBD.
84
+ * Handles the input out event for this button.
85
+ * @param {object} sprite - The sprite that triggered the event.
86
+ * @param {object} pointer - The pointer that triggered the event.
86
87
  */
87
88
  onInputOutHandler(sprite: object, pointer: object): void;
88
89
  /**
89
- * TBD.
90
- * @param {object} sprite - TBD.
91
- * @param {object} pointer - TBD.
90
+ * Handles the input down event for this button.
91
+ * @param {object} sprite - The sprite that triggered the event.
92
+ * @param {object} pointer - The pointer that triggered the event.
92
93
  */
93
94
  onInputDownHandler(sprite: object, pointer: object): void;
94
95
  /**
95
- * TBD.
96
- * @param {object} sprite - TBD.
97
- * @param {object} pointer - TBD.
98
- * @param {boolean} isOver - TBD.
96
+ * Handles the input up event for this button.
97
+ * @param {object} sprite - The sprite that triggered the event.
98
+ * @param {object} pointer - The pointer that triggered the event.
99
+ * @param {boolean} isOver - Whether the pointer is currently over the button (default: true).
99
100
  */
100
101
  onInputUpHandler(sprite: object, pointer: object, isOver: boolean): void;
101
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/button.js"],"names":[],"mappings":"AAWA;IACE;;;;;;;;;;;;;OAaG;IACH,kBAZW,OAAO,iBAAiB,EAAE,IAAI,MAC9B,MAAM,MACN,MAAM,QACN,MAAM,yCAEN,MAAM,cACN,MAAM,aACN,MAAM,cACN,MAAM,YACN,MAAM,kBACN,MAAM,EA0ChB;IAzBC,kBAAwB;IACxB,iBAAuB;IACvB,kBAAwB;IACxB,gBAAsB;IACtB,sBAA4B;IAC5B,oBAA+B;IAC/B,mBAA8B;IAC9B,oBAA+B;IAC/B,kBAA6B;IAC7B,yBAA2B;IAC3B,iCAA+C;IAC/C,sBAAyB;IACzB,kBAAqB;IACrB,oBAAmC;IAwCrC;;;;OAIG;IACH,sBAHW,OAAO,gBACP,OAAO,QAWjB;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,yBAEC;IA2ID;;OAEG;IACH,wBATa,OAAO,EAoBnB;IAtBD;;;OAGG;IACH,oBAFa,OAAO,CAInB;IAvID;;;;;OAKG;IACH,qBAJW,MAAM,SACN,MAAM,sBACN,OAAO,QAYjB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,OAAO,CAiBnB;IAED;;;;;;;OAOG;IACH,qBANW,MAAM,YACN,MAAM,aACN,MAAM,WACN,MAAM,kBACN,MAAM,QAUhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAchB;IAED;;;;OAIG;IACH,0BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,WACN,MAAM,UACN,OAAO,QAsBjB;CAyBF;sBAjRqB,YAAY;uBADX,mBAAmB;6BADb,0BAA0B"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/phaser/display/button.js"],"names":[],"mappings":"AAWA;IACE;;;;;;;;;;;;;OAaG;IACH,kBAZW,OAAO,iBAAiB,EAAE,IAAI,MAC9B,MAAM,MACN,MAAM,QACN,MAAM,yCAEN,MAAM,cACN,MAAM,aACN,MAAM,cACN,MAAM,YACN,MAAM,kBACN,MAAM,EA0ChB;IAzBC,kBAAwB;IACxB,iBAAuB;IACvB,kBAAwB;IACxB,gBAAsB;IACtB,sBAA4B;IAC5B,oBAA+B;IAC/B,mBAA8B;IAC9B,oBAA+B;IAC/B,kBAA6B;IAC7B,yBAA2B;IAC3B,iCAA+C;IAC/C,sBAAyB;IACzB,kBAAqB;IACrB,oBAAmC;IAwCrC;;;;OAIG;IACH,sBAHW,OAAO,gBACP,OAAO,QAWjB;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,yBAEC;IA2ID;;;OAGG;IACH,wBAFW,OAAO,EAajB;IAvBD;;;OAGG;IACH,oBAFa,OAAO,CAInB;IAvID;;;;;OAKG;IACH,qBAJW,MAAM,SACN,MAAM,sBACN,OAAO,QAYjB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACJ,OAAO,CAiBnB;IAED;;;;;;;OAOG;IACH,qBANW,MAAM,YACN,MAAM,aACN,MAAM,WACN,MAAM,kBACN,MAAM,QAUhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAchB;IAED;;;;OAIG;IACH,0BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,WACN,MAAM,QAOhB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,WACN,MAAM,UACN,OAAO,QAsBjB;CA0BF;sBAlRqB,YAAY;uBADX,mBAAmB;6BADb,0BAA0B"}
@@ -1,8 +1,8 @@
1
1
  export class CanvasBuffer {
2
2
  /**
3
- * TBD.
4
- * @param {number} width - TBD.
5
- * @param {number} height - TBD.
3
+ * Creates a new CanvasBuffer instance.
4
+ * @param {number} width - The width of the canvas buffer.
5
+ * @param {number} height - The height of the canvas buffer.
6
6
  */
7
7
  constructor(width: number, height: number);
8
8
  width: number;
@@ -10,17 +10,17 @@ export class CanvasBuffer {
10
10
  canvas: HTMLCanvasElement;
11
11
  context: CanvasRenderingContext2D;
12
12
  /**
13
- * TBD.
13
+ * Clears the canvas buffer.
14
14
  */
15
15
  clear(): void;
16
16
  /**
17
- * TBD.
18
- * @param {number} width - TBD.
19
- * @param {number} height - TBD.
17
+ * Resizes the canvas buffer.
18
+ * @param {number} width - The new width of the canvas buffer.
19
+ * @param {number} height - The new height of the canvas buffer.
20
20
  */
21
21
  resize(width: number, height: number): void;
22
22
  /**
23
- * TBD.
23
+ * Destroys the canvas buffer and cleans up resources.
24
24
  */
25
25
  destroy(): void;
26
26
  }
@@ -1,7 +1,7 @@
1
1
  export class CanvasRenderer {
2
2
  /**
3
- * TBD.
4
- * @param {import('../../core/game.js').Game} game - TBD.
3
+ * Creates a new CanvasRenderer 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} */
@@ -26,35 +26,35 @@ export class CanvasRenderer {
26
26
  roundPixels: any;
27
27
  };
28
28
  /**
29
- * TBD.
30
- * @param {import('../../core/stage.js').Stage} root - TBD.
29
+ * Renders the stage to canvas.
30
+ * @param {import('../../core/stage.js').Stage} root - The root stage to render.
31
31
  */
32
32
  render(root: import("../../core/stage.js").Stage): void;
33
33
  /**
34
- * TBD.
35
- * @param {boolean} removeView - TBD.
34
+ * Destroys this renderer and cleans up resources.
35
+ * @param {boolean} removeView - Whether to remove the view from the DOM.
36
36
  */
37
37
  destroy(removeView?: boolean): void;
38
38
  /**
39
- * TBD.
40
- * @param {number} width - TBD.
41
- * @param {number} height - TBD.
39
+ * Resizes the canvas to the specified dimensions.
40
+ * @param {number} width - The new width of the canvas.
41
+ * @param {number} height - The new height of the canvas.
42
42
  */
43
43
  resize(width: number, height: number): void;
44
44
  /**
45
- * TBD.
46
- * @param {import('../../display/image.js').Image} displayObject - TBD.
47
- * @param {CanvasRenderingContext2D} context - TBD.
48
- * @param {import('../../geom/matrix.js').Matrix} matrix - TBD.
45
+ * Renders a display object to canvas.
46
+ * @param {import('../../display/image.js').Image} displayObject - The display object to render.
47
+ * @param {CanvasRenderingContext2D} context - The canvas rendering context.
48
+ * @param {import('../../geom/matrix.js').Matrix} matrix - The transformation matrix.
49
49
  */
50
50
  renderDisplayObject(displayObject: import("../../display/image.js").Image, context: CanvasRenderingContext2D, matrix: import("../../geom/matrix.js").Matrix): void;
51
51
  /**
52
- * TBD.
52
+ * Maps blend modes to canvas rendering operations.
53
53
  */
54
54
  mapBlendModes(): void;
55
55
  /**
56
- * TBD.
57
- * @param {import('../../core/game.js').Game} game - TBD.
56
+ * Initializes the WebGL context for rendering.
57
+ * @param {import('../../core/game.js').Game} game - The game instance.
58
58
  */
59
59
  initContext(game: import("../../core/game.js").Game): void;
60
60
  }