@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
@@ -10,8 +10,8 @@ export const XML: 8;
10
10
  export const RENDER_TEXTURE: 9;
11
11
  export class Cache {
12
12
  /**
13
- * TBD.
14
- * @param {import('./game.js').Game} game - TBD.
13
+ * Creates a new Cache instance.
14
+ * @param {import('./game.js').Game} game - The game instance.
15
15
  */
16
16
  constructor(game: import("./game.js").Game);
17
17
  game: import("./game.js").Game;
@@ -34,158 +34,158 @@ export class Cache {
34
34
  onSoundUnlock: Signal;
35
35
  _cacheMap: {}[];
36
36
  /**
37
- * TBD.
37
+ * Adds the default image to the cache.
38
38
  */
39
39
  addDefaultImage(): void;
40
40
  /**
41
- * TBD.
41
+ * Adds the missing image to the cache.
42
42
  */
43
43
  addMissingImage(): void;
44
44
  /**
45
- * TBD.
46
- * @param {string} key - TBD.
47
- * @param {string} url - TBD.
48
- * @param {HTMLImageElement} data - TBD.
49
- * @returns {object} TBD.
45
+ * Adds an image to the cache.
46
+ * @param {string} key - The unique key for this cache entry.
47
+ * @param {string} url - The URL the image was loaded from.
48
+ * @param {HTMLImageElement} data - The image data to cache.
49
+ * @returns {object} The cached image object.
50
50
  */
51
51
  addImage(key: string, url: string, data: HTMLImageElement): object;
52
52
  /**
53
- * TBD.
54
- * @param {string} key - TBD.
55
- * @param {string} url - TBD.
56
- * @param {HTMLCanvasElement} data - TBD.
57
- * @param {object} atlasData - TBD.
53
+ * Adds a texture atlas to the cache.
54
+ * @param {string} key - The unique key for this cache entry.
55
+ * @param {string} url - The URL the atlas was loaded from.
56
+ * @param {HTMLCanvasElement} data - The canvas data for the atlas.
57
+ * @param {object} atlasData - The atlas data to cache.
58
58
  */
59
59
  addTextureAtlas(key: string, url: string, data: HTMLCanvasElement, atlasData: object): void;
60
60
  /**
61
- * TBD.
62
- * @param {string} key - TBD.
63
- * @param {string} url - TBD.
64
- * @param {object} data - TBD.
61
+ * Adds sound data to the cache.
62
+ * @param {string} key - The unique key for this cache entry.
63
+ * @param {string} url - The URL the sound was loaded from.
64
+ * @param {object} data - The sound data to cache.
65
65
  */
66
66
  addSound(key: string, url: string, data: object): void;
67
67
  /**
68
- * TBD.
69
- * @param {string} key - TBD.
70
- * @param {string} url - TBD.
71
- * @param {string} data - TBD.
68
+ * Adds text data to the cache.
69
+ * @param {string} key - The unique key for this cache entry.
70
+ * @param {string} url - The URL the text was loaded from.
71
+ * @param {string} data - The text data to cache.
72
72
  */
73
73
  addText(key: string, url: string, data: string): void;
74
74
  /**
75
- * TBD.
76
- * @param {string} key - TBD.
77
- * @param {string} url - TBD.
78
- * @param {HTMLCanvasElement} data - TBD.
79
- * @param {object} atlasData - TBD.
80
- * @param {string} atlasType - TBD.
81
- * @param {number} xSpacing - TBD.
82
- * @param {number} ySpacing - TBD.
75
+ * Adds a bitmap font to the cache.
76
+ * @param {string} key - The unique key for this cache entry.
77
+ * @param {string} url - The URL the bitmap font was loaded from.
78
+ * @param {HTMLCanvasElement} data - The canvas data for the font.
79
+ * @param {object} atlasData - The bitmap font atlas data to cache.
80
+ * @param {string} atlasType - The type of the atlas data ('json' or 'xml').
81
+ * @param {number} xSpacing - Horizontal spacing between characters.
82
+ * @param {number} ySpacing - Vertical spacing between characters.
83
83
  */
84
84
  addBitmapFont(key: string, url: string, data: HTMLCanvasElement, atlasData: object, atlasType: string, xSpacing?: number, ySpacing?: number): void;
85
85
  /**
86
- * TBD.
87
- * @param {string} key - TBD.
88
- * @param {string} url - TBD.
89
- * @param {object} data - TBD.
86
+ * Adds JSON data to the cache.
87
+ * @param {string} key - The unique key for this cache entry.
88
+ * @param {string} url - The URL the JSON was loaded from.
89
+ * @param {object} data - The JSON data to cache.
90
90
  */
91
91
  addJSON(key: string, url: string, data: object): void;
92
92
  /**
93
- * TBD.
94
- * @param {string} key - TBD.
95
- * @param {string} url - TBD.
96
- * @param {XMLDocument} data - TBD.
93
+ * Adds XML data to the cache.
94
+ * @param {string} key - The unique key for this cache entry.
95
+ * @param {string} url - The URL the XML was loaded from.
96
+ * @param {XMLDocument} data - The XML data to cache.
97
97
  */
98
98
  addXML(key: string, url: string, data: XMLDocument): void;
99
99
  /**
100
- * TBD.
101
- * @param {string} key - TBD.
102
- * @param {string} property - TBD.
103
- * @param {any} value - TBD.
100
+ * Updates a sound property in the cache.
101
+ * @param {string} key - The unique key for the cached sound.
102
+ * @param {string} property - The property to update.
103
+ * @param {any} value - The new value for the property.
104
104
  */
105
105
  updateSound(key: string, property: string, value: any): void;
106
106
  /**
107
- * TBD.
108
- * @param {string} key - TBD.
109
- * @param {AudioBuffer} data - TBD.
107
+ * Marks a sound as decoded in the cache.
108
+ * @param {string} key - The unique key for the cached sound.
109
+ * @param {AudioBuffer} data - The decoded audio buffer.
110
110
  */
111
111
  decodedSound(key: string, data: AudioBuffer): void;
112
112
  /**
113
- * TBD.
114
- * @param {string} key - TBD.
115
- * @returns {boolean} TBD.
113
+ * Checks if a sound has been decoded in the cache.
114
+ * @param {string} key - The unique key for the cached sound.
115
+ * @returns {boolean} True if the sound is decoded, false otherwise.
116
116
  */
117
117
  isSoundDecoded(key: string): boolean;
118
118
  /**
119
- * TBD.
120
- * @param {string} key - TBD.
121
- * @returns {boolean} TBD.
119
+ * Checks if a sound is ready to play (decoded and not locked).
120
+ * @param {string} key - The unique key for the cached sound.
121
+ * @returns {boolean} True if the sound is ready, false otherwise.
122
122
  */
123
123
  isSoundReady(key: string): boolean;
124
124
  /**
125
- * TBD.
126
- * @param {number} cache - TBD.
127
- * @param {string} key - TBD.
128
- * @returns {boolean} TBD.
125
+ * Checks if a cache entry exists.
126
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
127
+ * @param {string} key - The unique key for the cache entry.
128
+ * @returns {boolean} True if the entry exists, false otherwise.
129
129
  */
130
130
  checkKey(cache: number, key: string): boolean;
131
131
  /**
132
- * TBD.
133
- * @param {string} url - TBD.
134
- * @returns {boolean} TBD.
132
+ * Checks if a URL has been resolved and cached.
133
+ * @param {string} url - The URL to check.
134
+ * @returns {boolean} True if the URL has been resolved and cached, false otherwise.
135
135
  */
136
136
  checkURL(url: string): boolean;
137
137
  /**
138
- * TBD.
139
- * @param {string} key - TBD.
140
- * @returns {boolean} TBD.
138
+ * Checks if a canvas cache entry exists.
139
+ * @param {string} key - The unique key for the cache entry.
140
+ * @returns {boolean} True if the entry exists, false otherwise.
141
141
  */
142
142
  checkCanvasKey(key: string): boolean;
143
143
  /**
144
- * TBD.
145
- * @param {string} key - TBD.
146
- * @returns {boolean} TBD.
144
+ * Checks if an image cache entry exists.
145
+ * @param {string} key - The unique key for the cache entry.
146
+ * @returns {boolean} True if the entry exists, false otherwise.
147
147
  */
148
148
  checkImageKey(key: string): boolean;
149
149
  /**
150
- * TBD.
151
- * @param {string} key - TBD.
152
- * @returns {boolean} TBD.
150
+ * Checks if a texture cache entry exists.
151
+ * @param {string} key - The unique key for the cache entry.
152
+ * @returns {boolean} True if the entry exists, false otherwise.
153
153
  */
154
154
  checkTextureKey(key: string): boolean;
155
155
  /**
156
- * TBD.
157
- * @param {string} key - TBD.
158
- * @returns {boolean} TBD.
156
+ * Checks if a sound cache entry exists.
157
+ * @param {string} key - The unique key for the cache entry.
158
+ * @returns {boolean} True if the entry exists, false otherwise.
159
159
  */
160
160
  checkSoundKey(key: string): boolean;
161
161
  /**
162
- * TBD.
163
- * @param {string} key - TBD.
164
- * @returns {boolean} TBD.
162
+ * Checks if a text cache entry exists.
163
+ * @param {string} key - The unique key for the cache entry.
164
+ * @returns {boolean} True if the entry exists, false otherwise.
165
165
  */
166
166
  checkTextKey(key: string): boolean;
167
167
  /**
168
- * TBD.
169
- * @param {string} key - TBD.
170
- * @returns {boolean} TBD.
168
+ * Checks if a bitmap data cache entry exists.
169
+ * @param {string} key - The unique key for the cache entry.
170
+ * @returns {boolean} True if the entry exists, false otherwise.
171
171
  */
172
172
  checkBitmapDataKey(key: string): boolean;
173
173
  /**
174
- * TBD.
175
- * @param {string} key - TBD.
176
- * @returns {boolean} TBD.
174
+ * Checks if a bitmap font cache entry exists.
175
+ * @param {string} key - The unique key for the cache entry.
176
+ * @returns {boolean} True if the entry exists, false otherwise.
177
177
  */
178
178
  checkBitmapFontKey(key: string): boolean;
179
179
  /**
180
- * TBD.
181
- * @param {string} key - TBD.
182
- * @returns {boolean} TBD.
180
+ * Checks if a JSON cache entry exists.
181
+ * @param {string} key - The unique key for the cache entry.
182
+ * @returns {boolean} True if the entry exists, false otherwise.
183
183
  */
184
184
  checkJSONKey(key: string): boolean;
185
185
  /**
186
- * TBD.
187
- * @param {string} key - TBD.
188
- * @returns {boolean} TBD.
186
+ * Checks if an XML cache entry exists.
187
+ * @param {string} key - The unique key for the cache entry.
188
+ * @returns {boolean} True if the entry exists, false otherwise.
189
189
  */
190
190
  checkXMLKey(key: string): boolean;
191
191
  /**
@@ -266,144 +266,144 @@ export class Cache {
266
266
  */
267
267
  getRenderTexture(key: string): import("../display/webgl/render_texture.js").RenderTexture;
268
268
  /**
269
- * TBD.
270
- * @param {string} key - TBD.
271
- * @param {number} cache - TBD.
272
- * @returns {BaseTexture} TBD.
269
+ * Gets the base texture of a cache entry.
270
+ * @param {string} key - The unique key for the cache entry.
271
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
272
+ * @returns {BaseTexture} The base texture.
273
273
  */
274
274
  getBaseTexture(key: string, cache?: number): BaseTexture;
275
275
  /**
276
- * TBD.
277
- * @param {string} key - TBD.
278
- * @param {number} cache - TBD.
279
- * @returns {Frame} TBD.
276
+ * Gets a frame from the cache.
277
+ * @param {string} key - The unique key for the cache entry.
278
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
279
+ * @returns {Frame} The frame.
280
280
  */
281
281
  getFrame(key: string, cache?: number): Frame;
282
282
  /**
283
- * TBD.
284
- * @param {string} key - TBD.
285
- * @param {number} cache - TBD.
286
- * @returns {number} TBD.
283
+ * Gets the frame count of a cache entry.
284
+ * @param {string} key - The unique key for the cache entry.
285
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
286
+ * @returns {number} The number of frames.
287
287
  */
288
288
  getFrameCount(key: string, cache?: number): number;
289
289
  /**
290
- * TBD.
291
- * @param {string} key - TBD.
292
- * @param {number} cache - TBD.
293
- * @returns {FrameData} TBD.
290
+ * Gets the frame data of a cache entry.
291
+ * @param {string} key - The unique key for the cache entry.
292
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
293
+ * @returns {FrameData} The frame data.
294
294
  */
295
295
  getFrameData(key: string, cache?: number): FrameData;
296
296
  /**
297
- * TBD.
298
- * @param {string} key - TBD.
299
- * @param {number} cache - TBD.
300
- * @returns {boolean} TBD.
297
+ * Checks if a cache entry has frame data.
298
+ * @param {string} key - The unique key for the cache entry.
299
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
300
+ * @returns {boolean} True if the entry has frame data, false otherwise.
301
301
  */
302
302
  hasFrameData(key: string, cache?: number): boolean;
303
303
  /**
304
- * TBD.
305
- * @param {string} key - TBD.
306
- * @param {FrameData} frameData - TBD.
307
- * @param {number} cache - TBD.
304
+ * Updates the frame data of a cache entry.
305
+ * @param {string} key - The unique key for the cache entry.
306
+ * @param {FrameData} frameData - The new frame data.
307
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
308
308
  */
309
309
  updateFrameData(key: string, frameData: FrameData, cache?: number): void;
310
310
  /**
311
- * TBD.
312
- * @param {string} key - TBD.
313
- * @param {number} index - TBD.
314
- * @param {number} cache - TBD.
315
- * @returns {Frame} TBD.
311
+ * Gets a frame by index from the cache.
312
+ * @param {string} key - The unique key for the cache entry.
313
+ * @param {number} index - The index of the frame to get.
314
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
315
+ * @returns {Frame} The frame at the specified index.
316
316
  */
317
317
  getFrameByIndex(key: string, index: number, cache?: number): Frame;
318
318
  /**
319
- * TBD.
320
- * @param {string} key - TBD.
321
- * @param {string} name - TBD.
322
- * @param {number} cache - TBD.
323
- * @returns {Frame} TBD.
319
+ * Gets a frame by name from the cache.
320
+ * @param {string} key - The unique key for the cache entry.
321
+ * @param {string} name - The name of the frame to get.
322
+ * @param {number} cache - The cache type (CANVAS, IMAGE, etc.).
323
+ * @returns {Frame} The frame with the specified name.
324
324
  */
325
325
  getFrameByName(key: string, name: string, cache?: number): Frame;
326
326
  /**
327
- * TBD.
328
- * @param {string} url - TBD.
329
- * @returns {string} TBD.
327
+ * Gets the resolved URL from cache.
328
+ * @param {string} url - The original URL to resolve.
329
+ * @returns {string} The resolved URL or null if not found.
330
330
  */
331
331
  getURL(url: string): string;
332
332
  /**
333
- * TBD.
334
- * @param {object} cache - TBD.
335
- * @returns {string[]} TBD.
333
+ * Gets all keys from a cache type.
334
+ * @param {object} cache - The cache type (CANVAS, IMAGE, etc.).
335
+ * @returns {string[]} An array of cache keys.
336
336
  */
337
337
  getKeys(cache?: object): string[];
338
338
  /**
339
- * TBD.
340
- * @param {string} key - TBD.
339
+ * Removes a canvas cache entry.
340
+ * @param {string} key - The unique key for the cache entry to remove.
341
341
  */
342
342
  removeCanvas(key: string): void;
343
343
  /**
344
- * TBD.
345
- * @param {string} key - TBD.
346
- * @param {boolean} destroyBaseTexture - TBD.
344
+ * Removes an image cache entry.
345
+ * @param {string} key - The unique key for the cache entry to remove.
346
+ * @param {boolean} destroyBaseTexture - Whether to destroy the base texture (default: true).
347
347
  */
348
348
  removeImage(key: string, destroyBaseTexture?: boolean): void;
349
349
  /**
350
- * TBD.
351
- * @param {string} key - TBD.
350
+ * Removes a sound cache entry.
351
+ * @param {string} key - The unique key for the cache entry to remove.
352
352
  */
353
353
  removeSound(key: string): void;
354
354
  /**
355
- * TBD.
356
- * @param {string} key - TBD.
355
+ * Removes a text cache entry.
356
+ * @param {string} key - The unique key for the cache entry to remove.
357
357
  */
358
358
  removeText(key: string): void;
359
359
  /**
360
- * TBD.
361
- * @param {string} key - TBD.
360
+ * Removes a bitmap data cache entry.
361
+ * @param {string} key - The unique key for the cache entry to remove.
362
362
  */
363
363
  removeBitmapData(key: string): void;
364
364
  /**
365
- * TBD.
366
- * @param {string} key - TBD.
365
+ * Removes a bitmap font cache entry.
366
+ * @param {string} key - The unique key for the cache entry to remove.
367
367
  */
368
368
  removeBitmapFont(key: string): void;
369
369
  /**
370
- * TBD.
371
- * @param {string} key - TBD.
370
+ * Removes a JSON cache entry.
371
+ * @param {string} key - The unique key for the cache entry to remove.
372
372
  */
373
373
  removeJSON(key: string): void;
374
374
  /**
375
- * TBD.
376
- * @param {string} key - TBD.
375
+ * Removes an XML cache entry.
376
+ * @param {string} key - The unique key for the cache entry to remove.
377
377
  */
378
378
  removeXML(key: string): void;
379
379
  /**
380
- * TBD.
381
- * @param {string} key - TBD.
380
+ * Removes a render texture cache entry.
381
+ * @param {string} key - The unique key for the cache entry to remove.
382
382
  */
383
383
  removeRenderTexture(key: string): void;
384
384
  /**
385
- * TBD.
386
- * @param {string} key - TBD.
385
+ * Removes a sprite sheet cache entry.
386
+ * @param {string} key - The unique key for the cache entry to remove.
387
387
  */
388
388
  removeSpriteSheet(key: string): void;
389
389
  /**
390
- * TBD.
391
- * @param {string} key - TBD.
390
+ * Removes a texture atlas cache entry.
391
+ * @param {string} key - The unique key for the cache entry to remove.
392
392
  */
393
393
  removeTextureAtlas(key: string): void;
394
394
  /**
395
- * TBD.
395
+ * Clears all GL textures from the cache.
396
396
  */
397
397
  clearGLTextures(): void;
398
398
  /**
399
- * TBD.
400
- * @param {string} url - TBD.
401
- * @param {object} data - TBD.
402
- * @returns {string} TBD.
399
+ * Resolves a URL and stores it in the cache.
400
+ * @param {string} url - The URL to resolve.
401
+ * @param {object} data - The data to associate with the resolved URL.
402
+ * @returns {string} The resolved URL or null if not enabled.
403
403
  */
404
404
  _resolveURL(url: string, data: object): string;
405
405
  /**
406
- * TBD.
406
+ * Destroys the cache and cleans up resources.
407
407
  */
408
408
  destroy(): void;
409
409
  }
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/device.js"],"names":[],"mappings":"AAAA;IAKI;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,KAFU,OAAO,CAED;IAChB;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,UAFU,OAAO,CAEI;IACrB;;OAEG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,cAFU,OAAO,CAEQ;IACzB;;OAEG;IACH,QAFU,OAAO,CAEE;IACnB;;OAEG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,WAFU,OAAO,CAEK;IACtB,gBAAsB;IACtB;;OAEG;IACH,QAFU,OAAO,CAEE;IACnB;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,MAFU,OAAO,CAEA;IACjB;;OAEG;IACH,QAFU,OAAO,CAEE;IACnB;;OAEG;IACH,YAFU,OAAO,CAEM;IACvB;;OAEG;IACH,mBAFU,MAAM,CAEW;IAC3B;;OAEG;IACH,kBAFU,MAAM,CAEU;IAC1B;;OAEG;IACH,oBAFU,OAAO,CAEc;IAC/B;;OAEG;IACH,eAFU,OAAO,CAES;IAC1B;;OAEG;IACH,uBAFU;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAEH;IAC/B;;OAEG;IACH,uBAFU;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAEH;CAElC"}
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/device.js"],"names":[],"mappings":"AAAA;IAMI;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,KAFU,OAAO,CAED;IAChB;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,UAFU,OAAO,CAEI;IACrB;;OAEG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,cAFU,OAAO,CAEQ;IACzB;;OAEG;IACH,QAFU,OAAO,CAEE;IACnB;;OAEG;IACH,OAFU,OAAO,CAEC;IAClB;;OAEG;IACH,WAFU,OAAO,CAEK;IACtB,gBAAsB;IACtB;;OAEG;IACH,QAFU,OAAO,CAEE;IACnB;;OAEG;IACH,SAFU,OAAO,CAEG;IACpB;;OAEG;IACH,MAFU,OAAO,CAEA;IACjB;;OAEG;IACH,QAFU,OAAO,CAEE;IACnB;;OAEG;IACH,YAFU,OAAO,CAEM;IACvB;;OAEG;IACH,mBAFU,MAAM,CAEW;IAC3B;;OAEG;IACH,kBAFU,MAAM,CAEU;IAC1B;;OAEG;IACH,oBAFU,OAAO,CAEc;IAC/B;;OAEG;IACH,eAFU,OAAO,CAES;IAC1B;;OAEG;IACH,uBAFU;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAEH;IAC/B;;OAEG;IACH,uBAFU;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAEH;CAElC"}
@@ -11,24 +11,24 @@ export class DOM {
11
11
  scrollXProvider: () => number;
12
12
  scrollYProvider: () => number;
13
13
  /**
14
- * TBD.
15
- * @param {HTMLCanvasElement} element - TBD.
16
- * @param {Point} point - TBD.
17
- * @returns {Point} TBD.
14
+ * Gets the offset position of an element relative to the document.
15
+ * @param {HTMLCanvasElement} element - The element to get the offset for.
16
+ * @param {Point} point - Optional Point object to store the result.
17
+ * @returns {Point} The offset position of the element.
18
18
  */
19
19
  getOffset(element: HTMLCanvasElement, point?: Point): Point;
20
20
  /**
21
- * TBD.
22
- * @param {HTMLCanvasElement} element - TBD.
23
- * @param {number} cushion - TBD.
24
- * @returns {boolean} TBD.
21
+ * Gets the bounding rectangle of an element with optional cushion.
22
+ * @param {HTMLCanvasElement} element - The element to get bounds for.
23
+ * @param {number} cushion - Optional padding to add around the element.
24
+ * @returns {boolean} True if bounds were successfully retrieved, false otherwise.
25
25
  */
26
26
  getBounds(element: HTMLCanvasElement, cushion?: number): boolean;
27
27
  /**
28
- * TBD.
29
- * @param {DOMRect} coords - TBD.
30
- * @param {number} cushion - TBD.
31
- * @returns {{width: number, height: number, left: number, right: number, top: number, bottom: number}} TBD.
28
+ * Calibrates DOM rectangle coordinates with optional cushion.
29
+ * @param {DOMRect} coords - The DOM rectangle coordinates to calibrate.
30
+ * @param {number} cushion - Optional padding to add around the rectangle.
31
+ * @returns {{width: number, height: number, left: number, right: number, top: number, bottom: number}} The calibrated rectangle.
32
32
  */
33
33
  calibrate(coords: DOMRect, cushion?: number): {
34
34
  width: number;
@@ -39,63 +39,63 @@ export class DOM {
39
39
  bottom: number;
40
40
  };
41
41
  /**
42
- * TBD.
43
- * @param {string} primaryFallback - TBD.
44
- * @returns {string} TBD.
42
+ * Gets the screen orientation.
43
+ * @param {string} primaryFallback - The fallback method to use if screen orientation API is not available.
44
+ * @returns {string} The screen orientation ('portrait-primary', 'landscape-primary', etc.).
45
45
  */
46
46
  getScreenOrientation(primaryFallback: string): string;
47
47
  /**
48
- * TBD.
49
- * @returns {number} TBD.
48
+ * Gets the horizontal scroll position of the window.
49
+ * @returns {number} The horizontal scroll position in pixels.
50
50
  */
51
51
  get scrollX(): number;
52
52
  /**
53
- * TBD.
54
- * @returns {number} TBD.
53
+ * Gets the vertical scroll position of the window.
54
+ * @returns {number} The vertical scroll position in pixels.
55
55
  */
56
56
  get scrollY(): number;
57
57
  /**
58
- * TBD.
59
- * @returns {number} TBD.
58
+ * Gets the width of the window's client area.
59
+ * @returns {number} The width of the client area in pixels.
60
60
  */
61
61
  get clientWidth(): number;
62
62
  /**
63
- * TBD.
64
- * @returns {number} TBD.
63
+ * Gets the height of the window's client area.
64
+ * @returns {number} The height of the client area in pixels.
65
65
  */
66
66
  get clientHeight(): number;
67
67
  }
68
68
  declare class VisualBoundsDesktopRectangle {
69
69
  /**
70
- * TBD.
71
- * @returns {number} TBD.
70
+ * Gets the horizontal scroll position of the window.
71
+ * @returns {number} The horizontal scroll position in pixels.
72
72
  */
73
73
  get x(): number;
74
74
  /**
75
- * TBD.
76
- * @returns {number} TBD.
75
+ * Gets the vertical scroll position of the window.
76
+ * @returns {number} The vertical scroll position in pixels.
77
77
  */
78
78
  get y(): number;
79
79
  /**
80
- * TBD.
81
- * @returns {number} TBD.
80
+ * Gets the width of the window.
81
+ * @returns {number} The width of the window in pixels.
82
82
  */
83
83
  get width(): number;
84
84
  /**
85
- * TBD.
86
- * @returns {number} TBD.
85
+ * Gets the height of the window.
86
+ * @returns {number} The height of the window in pixels.
87
87
  */
88
88
  get height(): number;
89
89
  }
90
90
  declare class VisualBoundsRectangle {
91
91
  /**
92
- * TBD.
93
- * @returns {number} TBD.
92
+ * Gets the horizontal scroll position of the document.
93
+ * @returns {number} The horizontal scroll position in pixels.
94
94
  */
95
95
  get x(): number;
96
96
  /**
97
- * TBD.
98
- * @returns {number} TBD.
97
+ * Gets the vertical scroll position of the document.
98
+ * @returns {number} The vertical scroll position in pixels.
99
99
  */
100
100
  get y(): number;
101
101
  /**
@@ -111,23 +111,23 @@ declare class VisualBoundsRectangle {
111
111
  }
112
112
  declare class LayoutBoundsDesktopRectangle {
113
113
  /**
114
- * TBD.
115
- * @returns {number} TBD.
114
+ * Gets the horizontal scroll position of the window.
115
+ * @returns {number} The horizontal scroll position in pixels.
116
116
  */
117
117
  get x(): number;
118
118
  /**
119
- * TBD.
120
- * @returns {number} TBD.
119
+ * Gets the vertical scroll position of the window.
120
+ * @returns {number} The vertical scroll position in pixels.
121
121
  */
122
122
  get y(): number;
123
123
  /**
124
- * TBD.
125
- * @returns {number} TBD.
124
+ * Gets the width of the window.
125
+ * @returns {number} The width of the window in pixels.
126
126
  */
127
127
  get width(): number;
128
128
  /**
129
- * TBD.
130
- * @returns {number} TBD.
129
+ * Gets the height of the window.
130
+ * @returns {number} The height of the window in pixels.
131
131
  */
132
132
  get height(): number;
133
133
  }