@vpmedia/phaser 1.103.0 → 1.105.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.
- package/dist/index.js +997 -403
- package/dist/index.js.map +1 -1
- package/dist/phaser/core/animation.d.ts +35 -11
- package/dist/phaser/core/animation.d.ts.map +1 -1
- package/dist/phaser/core/animation_manager.d.ts +20 -10
- package/dist/phaser/core/animation_manager.d.ts.map +1 -1
- package/dist/phaser/core/animation_parser.d.ts +2 -2
- package/dist/phaser/core/animation_parser.d.ts.map +1 -1
- package/dist/phaser/core/array_set.d.ts +3 -3
- package/dist/phaser/core/array_set.d.ts.map +1 -1
- package/dist/phaser/core/cache.d.ts +68 -60
- package/dist/phaser/core/cache.d.ts.map +1 -1
- package/dist/phaser/core/device.d.ts +23 -0
- package/dist/phaser/core/device.d.ts.map +1 -1
- package/dist/phaser/core/device_util.d.ts +10 -10
- package/dist/phaser/core/device_util.d.ts.map +1 -1
- package/dist/phaser/core/dom.d.ts +6 -5
- package/dist/phaser/core/dom.d.ts.map +1 -1
- package/dist/phaser/core/event_manager.d.ts +49 -158
- package/dist/phaser/core/event_manager.d.ts.map +1 -1
- package/dist/phaser/core/factory.d.ts +8 -7
- package/dist/phaser/core/factory.d.ts.map +1 -1
- package/dist/phaser/core/frame.d.ts +27 -48
- package/dist/phaser/core/frame.d.ts.map +1 -1
- package/dist/phaser/core/frame_data.d.ts +11 -58
- package/dist/phaser/core/frame_data.d.ts.map +1 -1
- package/dist/phaser/core/frame_util.d.ts +4 -14
- package/dist/phaser/core/frame_util.d.ts.map +1 -1
- package/dist/phaser/core/game.d.ts +50 -3
- package/dist/phaser/core/game.d.ts.map +1 -1
- package/dist/phaser/core/input.d.ts +66 -13
- package/dist/phaser/core/input.d.ts.map +1 -1
- package/dist/phaser/core/input_handler.d.ts +64 -20
- package/dist/phaser/core/input_handler.d.ts.map +1 -1
- package/dist/phaser/core/input_mouse.d.ts +26 -1
- package/dist/phaser/core/input_mouse.d.ts.map +1 -1
- package/dist/phaser/core/input_mspointer.d.ts +18 -2
- package/dist/phaser/core/input_mspointer.d.ts.map +1 -1
- package/dist/phaser/core/input_pointer.d.ts +53 -9
- package/dist/phaser/core/input_pointer.d.ts.map +1 -1
- package/dist/phaser/core/input_touch.d.ts +19 -1
- package/dist/phaser/core/input_touch.d.ts.map +1 -1
- package/dist/phaser/core/loader.d.ts +56 -28
- package/dist/phaser/core/loader.d.ts.map +1 -1
- package/dist/phaser/core/loader_parser.d.ts +4 -4
- package/dist/phaser/core/loader_parser.d.ts.map +1 -1
- package/dist/phaser/core/raf.d.ts +2 -2
- package/dist/phaser/core/raf.d.ts.map +1 -1
- package/dist/phaser/core/scale_manager.d.ts +77 -17
- package/dist/phaser/core/scale_manager.d.ts.map +1 -1
- package/dist/phaser/core/scene.d.ts +3 -1
- package/dist/phaser/core/scene.d.ts.map +1 -1
- package/dist/phaser/core/scene_manager.d.ts +25 -9
- package/dist/phaser/core/scene_manager.d.ts.map +1 -1
- package/dist/phaser/core/signal.d.ts +9 -8
- package/dist/phaser/core/signal.d.ts.map +1 -1
- package/dist/phaser/core/signal_binding.d.ts +2 -2
- package/dist/phaser/core/signal_binding.d.ts.map +1 -1
- package/dist/phaser/core/sound.d.ts +58 -10
- package/dist/phaser/core/sound.d.ts.map +1 -1
- package/dist/phaser/core/sound_manager.d.ts +28 -9
- package/dist/phaser/core/sound_manager.d.ts.map +1 -1
- package/dist/phaser/core/sound_sprite.d.ts +10 -4
- package/dist/phaser/core/sound_sprite.d.ts.map +1 -1
- package/dist/phaser/core/stage.d.ts +7 -3
- package/dist/phaser/core/stage.d.ts.map +1 -1
- package/dist/phaser/core/time.d.ts +32 -5
- package/dist/phaser/core/time.d.ts.map +1 -1
- package/dist/phaser/core/timer.d.ts +30 -10
- package/dist/phaser/core/timer.d.ts.map +1 -1
- package/dist/phaser/core/timer_event.d.ts +11 -12
- package/dist/phaser/core/timer_event.d.ts.map +1 -1
- package/dist/phaser/core/tween.d.ts +38 -14
- package/dist/phaser/core/tween.d.ts.map +1 -1
- package/dist/phaser/core/tween_data.d.ts +30 -5
- package/dist/phaser/core/tween_data.d.ts.map +1 -1
- package/dist/phaser/core/tween_easing.d.ts +31 -31
- package/dist/phaser/core/tween_easing.d.ts.map +1 -1
- package/dist/phaser/core/tween_manager.d.ts +8 -4
- package/dist/phaser/core/tween_manager.d.ts.map +1 -1
- package/dist/phaser/core/world.d.ts +1 -1
- package/dist/phaser/core/world.d.ts.map +1 -1
- package/dist/phaser/display/bitmap_text.d.ts +35 -20
- package/dist/phaser/display/bitmap_text.d.ts.map +1 -1
- package/dist/phaser/display/button.d.ts +24 -8
- package/dist/phaser/display/button.d.ts.map +1 -1
- package/dist/phaser/display/canvas/buffer.d.ts +6 -2
- package/dist/phaser/display/canvas/buffer.d.ts.map +1 -1
- package/dist/phaser/display/canvas/graphics.d.ts +3 -3
- package/dist/phaser/display/canvas/graphics.d.ts.map +1 -1
- package/dist/phaser/display/canvas/masker.d.ts.map +1 -1
- package/dist/phaser/display/canvas/pool.d.ts +2 -2
- package/dist/phaser/display/canvas/pool.d.ts.map +1 -1
- package/dist/phaser/display/canvas/renderer.d.ts +18 -5
- package/dist/phaser/display/canvas/renderer.d.ts.map +1 -1
- package/dist/phaser/display/canvas/tinter.d.ts +3 -3
- package/dist/phaser/display/canvas/tinter.d.ts.map +1 -1
- package/dist/phaser/display/canvas/util.d.ts +9 -9
- package/dist/phaser/display/canvas/util.d.ts.map +1 -1
- package/dist/phaser/display/display_object.d.ts +82 -23
- package/dist/phaser/display/display_object.d.ts.map +1 -1
- package/dist/phaser/display/graphics.d.ts +42 -16
- package/dist/phaser/display/graphics.d.ts.map +1 -1
- package/dist/phaser/display/graphics_data.d.ts +11 -1
- package/dist/phaser/display/graphics_data.d.ts.map +1 -1
- package/dist/phaser/display/graphics_data_util.d.ts +1 -1
- package/dist/phaser/display/graphics_data_util.d.ts.map +1 -1
- package/dist/phaser/display/group.d.ts +24 -9
- package/dist/phaser/display/group.d.ts.map +1 -1
- package/dist/phaser/display/image.d.ts +36 -13
- package/dist/phaser/display/image.d.ts.map +1 -1
- package/dist/phaser/display/sprite_batch.d.ts +1 -1
- package/dist/phaser/display/sprite_batch.d.ts.map +1 -1
- package/dist/phaser/display/sprite_util.d.ts +5 -5
- package/dist/phaser/display/sprite_util.d.ts.map +1 -1
- package/dist/phaser/display/text.d.ts +86 -66
- package/dist/phaser/display/text.d.ts.map +1 -1
- package/dist/phaser/display/webgl/abstract_filter.d.ts +8 -1
- package/dist/phaser/display/webgl/abstract_filter.d.ts.map +1 -1
- package/dist/phaser/display/webgl/base_texture.d.ts +14 -2
- package/dist/phaser/display/webgl/base_texture.d.ts.map +1 -1
- package/dist/phaser/display/webgl/blend_manager.d.ts +5 -2
- package/dist/phaser/display/webgl/blend_manager.d.ts.map +1 -1
- package/dist/phaser/display/webgl/earcut.d.ts +10 -10
- package/dist/phaser/display/webgl/earcut.d.ts.map +1 -1
- package/dist/phaser/display/webgl/earcut_node.d.ts +1 -1
- package/dist/phaser/display/webgl/earcut_node.d.ts.map +1 -1
- package/dist/phaser/display/webgl/fast_sprite_batch.d.ts +17 -1
- package/dist/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
- package/dist/phaser/display/webgl/filter_manager.d.ts +5 -1
- package/dist/phaser/display/webgl/filter_manager.d.ts.map +1 -1
- package/dist/phaser/display/webgl/filter_texture.d.ts +7 -2
- package/dist/phaser/display/webgl/filter_texture.d.ts.map +1 -1
- package/dist/phaser/display/webgl/graphics.d.ts +11 -10
- package/dist/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/dist/phaser/display/webgl/graphics_data.d.ts +11 -1
- package/dist/phaser/display/webgl/graphics_data.d.ts.map +1 -1
- package/dist/phaser/display/webgl/mask_manager.d.ts.map +1 -1
- package/dist/phaser/display/webgl/render_texture.d.ts +12 -1
- package/dist/phaser/display/webgl/render_texture.d.ts.map +1 -1
- package/dist/phaser/display/webgl/renderer.d.ts +25 -6
- package/dist/phaser/display/webgl/renderer.d.ts.map +1 -1
- package/dist/phaser/display/webgl/shader/complex.d.ts +7 -1
- package/dist/phaser/display/webgl/shader/complex.d.ts.map +1 -1
- package/dist/phaser/display/webgl/shader/fast.d.ts +8 -1
- package/dist/phaser/display/webgl/shader/fast.d.ts.map +1 -1
- package/dist/phaser/display/webgl/shader/normal.d.ts +11 -0
- package/dist/phaser/display/webgl/shader/normal.d.ts.map +1 -1
- package/dist/phaser/display/webgl/shader/primitive.d.ts +7 -1
- package/dist/phaser/display/webgl/shader/primitive.d.ts.map +1 -1
- package/dist/phaser/display/webgl/shader/strip.d.ts +7 -1
- package/dist/phaser/display/webgl/shader/strip.d.ts.map +1 -1
- package/dist/phaser/display/webgl/shader_manager.d.ts +14 -2
- package/dist/phaser/display/webgl/shader_manager.d.ts.map +1 -1
- package/dist/phaser/display/webgl/sprite_batch.d.ts +19 -2
- package/dist/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
- package/dist/phaser/display/webgl/stencil_manager.d.ts +8 -4
- package/dist/phaser/display/webgl/stencil_manager.d.ts.map +1 -1
- package/dist/phaser/display/webgl/texture.d.ts +35 -2
- package/dist/phaser/display/webgl/texture.d.ts.map +1 -1
- package/dist/phaser/display/webgl/texture_util.d.ts +2 -2
- package/dist/phaser/display/webgl/texture_util.d.ts.map +1 -1
- package/dist/phaser/display/webgl/util.d.ts +6 -6
- package/dist/phaser/display/webgl/util.d.ts.map +1 -1
- package/dist/phaser/geom/circle.d.ts +11 -10
- package/dist/phaser/geom/circle.d.ts.map +1 -1
- package/dist/phaser/geom/ellipse.d.ts +6 -5
- package/dist/phaser/geom/ellipse.d.ts.map +1 -1
- package/dist/phaser/geom/line.d.ts +14 -14
- package/dist/phaser/geom/line.d.ts.map +1 -1
- package/dist/phaser/geom/matrix.d.ts +13 -12
- package/dist/phaser/geom/matrix.d.ts.map +1 -1
- package/dist/phaser/geom/point.d.ts +19 -19
- package/dist/phaser/geom/point.d.ts.map +1 -1
- package/dist/phaser/geom/polygon.d.ts +6 -6
- package/dist/phaser/geom/polygon.d.ts.map +1 -1
- package/dist/phaser/geom/rectangle.d.ts +20 -20
- package/dist/phaser/geom/rectangle.d.ts.map +1 -1
- package/dist/phaser/geom/rounded_rectangle.d.ts +2 -2
- package/dist/phaser/geom/rounded_rectangle.d.ts.map +1 -1
- package/dist/phaser/geom/util/circle.d.ts +9 -7
- package/dist/phaser/geom/util/circle.d.ts.map +1 -1
- package/dist/phaser/geom/util/ellipse.d.ts +1 -1
- package/dist/phaser/geom/util/ellipse.d.ts.map +1 -1
- package/dist/phaser/geom/util/line.d.ts +5 -3
- package/dist/phaser/geom/util/line.d.ts.map +1 -1
- package/dist/phaser/geom/util/matrix.d.ts +2 -1
- package/dist/phaser/geom/util/matrix.d.ts.map +1 -1
- package/dist/phaser/geom/util/point.d.ts +19 -19
- package/dist/phaser/geom/util/point.d.ts.map +1 -1
- package/dist/phaser/geom/util/polygon.d.ts +2 -1
- package/dist/phaser/geom/util/polygon.d.ts.map +1 -1
- package/dist/phaser/geom/util/rectangle.d.ts +17 -15
- package/dist/phaser/geom/util/rectangle.d.ts.map +1 -1
- package/dist/phaser/geom/util/rounded_rectangle.d.ts +2 -1
- package/dist/phaser/geom/util/rounded_rectangle.d.ts.map +1 -1
- package/dist/phaser/util/math.d.ts +51 -142
- package/dist/phaser/util/math.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/phaser/core/animation.ts +41 -18
- package/src/phaser/core/animation_manager.ts +21 -12
- package/src/phaser/core/animation_parser.ts +11 -3
- package/src/phaser/core/array_set.ts +8 -8
- package/src/phaser/core/cache.ts +75 -60
- package/src/phaser/core/device.ts +23 -1
- package/src/phaser/core/device_util.ts +10 -10
- package/src/phaser/core/dom.ts +5 -5
- package/src/phaser/core/event_manager.ts +52 -177
- package/src/phaser/core/factory.ts +25 -17
- package/src/phaser/core/frame.ts +37 -51
- package/src/phaser/core/frame_data.ts +29 -74
- package/src/phaser/core/frame_util.ts +3 -16
- package/src/phaser/core/game.ts +40 -11
- package/src/phaser/core/input.ts +68 -17
- package/src/phaser/core/input_handler.ts +81 -45
- package/src/phaser/core/input_mouse.ts +42 -13
- package/src/phaser/core/input_mspointer.ts +24 -9
- package/src/phaser/core/input_pointer.ts +55 -12
- package/src/phaser/core/input_touch.ts +26 -9
- package/src/phaser/core/loader.ts +97 -42
- package/src/phaser/core/loader_parser.ts +6 -7
- package/src/phaser/core/raf.ts +2 -2
- package/src/phaser/core/scale_manager.ts +85 -27
- package/src/phaser/core/scene.ts +3 -2
- package/src/phaser/core/scene_manager.ts +26 -11
- package/src/phaser/core/signal.ts +10 -10
- package/src/phaser/core/signal_binding.ts +2 -2
- package/src/phaser/core/sound.ts +72 -26
- package/src/phaser/core/sound_manager.ts +31 -13
- package/src/phaser/core/sound_sprite.ts +10 -5
- package/src/phaser/core/stage.ts +8 -4
- package/src/phaser/core/time.ts +33 -7
- package/src/phaser/core/timer.ts +40 -14
- package/src/phaser/core/timer_event.ts +23 -14
- package/src/phaser/core/tween.ts +43 -23
- package/src/phaser/core/tween_data.ts +31 -7
- package/src/phaser/core/tween_easing.ts +31 -31
- package/src/phaser/core/tween_manager.ts +10 -7
- package/src/phaser/core/world.ts +1 -2
- package/src/phaser/display/bitmap_text.ts +41 -18
- package/src/phaser/display/button.ts +24 -23
- package/src/phaser/display/canvas/buffer.ts +6 -3
- package/src/phaser/display/canvas/graphics.ts +3 -4
- package/src/phaser/display/canvas/masker.ts +2 -3
- package/src/phaser/display/canvas/pool.ts +3 -4
- package/src/phaser/display/canvas/renderer.ts +19 -7
- package/src/phaser/display/canvas/tinter.ts +4 -5
- package/src/phaser/display/canvas/util.ts +9 -9
- package/src/phaser/display/display_object.ts +120 -61
- package/src/phaser/display/graphics.ts +56 -25
- package/src/phaser/display/graphics_data.ts +11 -2
- package/src/phaser/display/graphics_data_util.ts +1 -2
- package/src/phaser/display/group.ts +32 -14
- package/src/phaser/display/image.ts +37 -19
- package/src/phaser/display/sprite_batch.ts +1 -2
- package/src/phaser/display/sprite_util.ts +5 -6
- package/src/phaser/display/text.ts +82 -56
- package/src/phaser/display/webgl/abstract_filter.ts +8 -2
- package/src/phaser/display/webgl/base_texture.ts +14 -3
- package/src/phaser/display/webgl/blend_manager.ts +5 -3
- package/src/phaser/display/webgl/earcut.ts +27 -27
- package/src/phaser/display/webgl/earcut_node.ts +1 -1
- package/src/phaser/display/webgl/fast_sprite_batch.ts +19 -4
- package/src/phaser/display/webgl/filter_manager.ts +5 -2
- package/src/phaser/display/webgl/filter_texture.ts +7 -3
- package/src/phaser/display/webgl/graphics.ts +10 -11
- package/src/phaser/display/webgl/graphics_data.ts +11 -2
- package/src/phaser/display/webgl/mask_manager.ts +2 -3
- package/src/phaser/display/webgl/render_texture.ts +12 -2
- package/src/phaser/display/webgl/renderer.ts +24 -7
- package/src/phaser/display/webgl/shader/complex.ts +7 -2
- package/src/phaser/display/webgl/shader/fast.ts +8 -2
- package/src/phaser/display/webgl/shader/normal.ts +12 -2
- package/src/phaser/display/webgl/shader/primitive.ts +7 -2
- package/src/phaser/display/webgl/shader/strip.ts +7 -2
- package/src/phaser/display/webgl/shader_manager.ts +13 -3
- package/src/phaser/display/webgl/sprite_batch.ts +20 -4
- package/src/phaser/display/webgl/stencil_manager.ts +8 -5
- package/src/phaser/display/webgl/texture.ts +35 -4
- package/src/phaser/display/webgl/texture_util.ts +2 -3
- package/src/phaser/display/webgl/util.ts +6 -6
- package/src/phaser/geom/circle.ts +10 -10
- package/src/phaser/geom/ellipse.ts +6 -6
- package/src/phaser/geom/line.ts +14 -14
- package/src/phaser/geom/matrix.ts +12 -12
- package/src/phaser/geom/point.ts +19 -19
- package/src/phaser/geom/polygon.ts +5 -5
- package/src/phaser/geom/rectangle.ts +21 -21
- package/src/phaser/geom/rounded_rectangle.ts +2 -2
- package/src/phaser/geom/util/circle.ts +7 -7
- package/src/phaser/geom/util/ellipse.ts +1 -1
- package/src/phaser/geom/util/line.ts +5 -5
- package/src/phaser/geom/util/matrix.ts +1 -1
- package/src/phaser/geom/util/point.ts +20 -20
- package/src/phaser/geom/util/polygon.ts +1 -1
- package/src/phaser/geom/util/rectangle.ts +15 -15
- package/src/phaser/geom/util/rounded_rectangle.ts +1 -1
- package/src/phaser/util/math.ts +65 -151
package/dist/index.js
CHANGED
|
@@ -1317,11 +1317,7 @@ var math_exports = /* @__PURE__ */ __exportAll({
|
|
|
1317
1317
|
const DEG_TO_RAD = Math.PI / 180;
|
|
1318
1318
|
const RAD_TO_DEG = 180 / Math.PI;
|
|
1319
1319
|
const PI_2 = Math.PI * 2;
|
|
1320
|
-
/**
|
|
1321
|
-
* Converts a hexadecimal color value to RGB components.
|
|
1322
|
-
* @param {number} hex - The hexadecimal color value.
|
|
1323
|
-
* @returns {number[]} An array containing the RGB components [r, g, b].
|
|
1324
|
-
*/
|
|
1320
|
+
/** Converts a hexadecimal color value to RGB components. */
|
|
1325
1321
|
const hex2rgb = (hex) => {
|
|
1326
1322
|
return [
|
|
1327
1323
|
(hex >> 16 & 255) / 255,
|
|
@@ -1329,79 +1325,41 @@ const hex2rgb = (hex) => {
|
|
|
1329
1325
|
(hex & 255) / 255
|
|
1330
1326
|
];
|
|
1331
1327
|
};
|
|
1332
|
-
/**
|
|
1333
|
-
* Converts RGB components to a hexadecimal color value.
|
|
1334
|
-
* @param {number} rgb - The RGB components array [r, g, b].
|
|
1335
|
-
* @returns {number} The hexadecimal color value.
|
|
1336
|
-
*/
|
|
1328
|
+
/** Converts RGB components to a hexadecimal color value. */
|
|
1337
1329
|
const rgb2hex = (rgb) => {
|
|
1338
1330
|
return (rgb[0] * 255 << 16) + (rgb[1] * 255 << 8) + rgb[2] * 255;
|
|
1339
1331
|
};
|
|
1340
|
-
/**
|
|
1341
|
-
* Gets the next power of two greater than or equal to a value.
|
|
1342
|
-
* @param {number} value - The input value.
|
|
1343
|
-
* @returns {number} The next power of two.
|
|
1344
|
-
*/
|
|
1332
|
+
/** Gets the next power of two greater than or equal to a value. */
|
|
1345
1333
|
const getNextPowerOfTwo = (value) => {
|
|
1346
1334
|
if (value > 0 && (value & value - 1) === 0) return value;
|
|
1347
1335
|
let result = 1;
|
|
1348
1336
|
while (result < value) result <<= 1;
|
|
1349
1337
|
return result;
|
|
1350
1338
|
};
|
|
1351
|
-
/**
|
|
1352
|
-
* Checks if both width and height are powers of two.
|
|
1353
|
-
* @param {number} width - The width to check.
|
|
1354
|
-
* @param {number} height - The height to check.
|
|
1355
|
-
* @returns {boolean} True if both width and height are powers of two, false otherwise.
|
|
1356
|
-
*/
|
|
1339
|
+
/** Checks if both width and height are powers of two. */
|
|
1357
1340
|
const isPowerOfTwo = (width, height) => {
|
|
1358
1341
|
return width > 0 && (width & width - 1) === 0 && height > 0 && (height & height - 1) === 0;
|
|
1359
1342
|
};
|
|
1360
|
-
/**
|
|
1361
|
-
* Converts degrees to radians.
|
|
1362
|
-
* @param {number} degrees - The angle in degrees.
|
|
1363
|
-
* @returns {number} The angle in radians.
|
|
1364
|
-
*/
|
|
1343
|
+
/** Converts degrees to radians. */
|
|
1365
1344
|
const degToRad = (degrees) => {
|
|
1366
1345
|
return degrees * DEG_TO_RAD;
|
|
1367
1346
|
};
|
|
1368
|
-
/**
|
|
1369
|
-
* Converts radians to degrees.
|
|
1370
|
-
* @param {number} radians - The angle in radians.
|
|
1371
|
-
* @returns {number} The angle in degrees.
|
|
1372
|
-
*/
|
|
1347
|
+
/** Converts radians to degrees. */
|
|
1373
1348
|
const radToDeg = (radians) => {
|
|
1374
1349
|
return radians * RAD_TO_DEG;
|
|
1375
1350
|
};
|
|
1376
|
-
/**
|
|
1377
|
-
* Gets a random integer between min and max (inclusive).
|
|
1378
|
-
* @param {number} min - The minimum value.
|
|
1379
|
-
* @param {number} max - The maximum value.
|
|
1380
|
-
* @returns {number} A random integer between min and max.
|
|
1381
|
-
*/
|
|
1351
|
+
/** Gets a random integer between min and max (inclusive). */
|
|
1382
1352
|
const between = (min, max) => {
|
|
1383
1353
|
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
1384
1354
|
};
|
|
1385
|
-
/**
|
|
1386
|
-
* Snaps a value to the nearest multiple of gap, starting from start.
|
|
1387
|
-
* @param {number} input - The value to snap.
|
|
1388
|
-
* @param {number} gap - The gap size to snap to.
|
|
1389
|
-
* @param {number} start - The starting offset for snapping.
|
|
1390
|
-
* @returns {number} The snapped value.
|
|
1391
|
-
*/
|
|
1355
|
+
/** Snaps a value to the nearest multiple of gap, starting from start. */
|
|
1392
1356
|
const snapToCeil = (input, gap = 0, start = 0) => {
|
|
1393
1357
|
if (gap === 0) return input;
|
|
1394
1358
|
input -= start;
|
|
1395
1359
|
input = gap * Math.ceil(input / gap);
|
|
1396
1360
|
return start + input;
|
|
1397
1361
|
};
|
|
1398
|
-
/**
|
|
1399
|
-
* Wraps a value within a range.
|
|
1400
|
-
* @param {number} value - The value to wrap.
|
|
1401
|
-
* @param {number} min - The minimum value of the range.
|
|
1402
|
-
* @param {number} max - The maximum value of the range.
|
|
1403
|
-
* @returns {number} The wrapped value.
|
|
1404
|
-
*/
|
|
1362
|
+
/** Wraps a value within a range. */
|
|
1405
1363
|
const wrap = (value, min, max) => {
|
|
1406
1364
|
const range = max - min;
|
|
1407
1365
|
if (range <= 0) return 0;
|
|
@@ -1409,31 +1367,15 @@ const wrap = (value, min, max) => {
|
|
|
1409
1367
|
if (result < 0) result += range;
|
|
1410
1368
|
return result + min;
|
|
1411
1369
|
};
|
|
1412
|
-
/**
|
|
1413
|
-
* Performs linear interpolation between two values.
|
|
1414
|
-
* @param {number} p0 - The first point.
|
|
1415
|
-
* @param {number} p1 - The second point.
|
|
1416
|
-
* @param {number} t - The interpolation factor (0 to 1).
|
|
1417
|
-
* @returns {number} The interpolated value.
|
|
1418
|
-
*/
|
|
1370
|
+
/** Performs linear interpolation between two values. */
|
|
1419
1371
|
const linear = (p0, p1, t) => {
|
|
1420
1372
|
return (p1 - p0) * t + p0;
|
|
1421
1373
|
};
|
|
1422
|
-
/**
|
|
1423
|
-
* Calculates the absolute difference between two numbers.
|
|
1424
|
-
* @param {number} a - The first number.
|
|
1425
|
-
* @param {number} b - The second number.
|
|
1426
|
-
* @returns {number} The absolute difference between a and b.
|
|
1427
|
-
*/
|
|
1374
|
+
/** Calculates the absolute difference between two numbers. */
|
|
1428
1375
|
const difference = (a, b) => {
|
|
1429
1376
|
return Math.abs(a - b);
|
|
1430
1377
|
};
|
|
1431
|
-
/**
|
|
1432
|
-
* Performs linear interpolation on an array of values.
|
|
1433
|
-
* @param {number[]} v - The array of values.
|
|
1434
|
-
* @param {number} k - The interpolation factor (0 to 1).
|
|
1435
|
-
* @returns {number} The interpolated value.
|
|
1436
|
-
*/
|
|
1378
|
+
/** Performs linear interpolation on an array of values. */
|
|
1437
1379
|
const linearInterpolation = (v, k) => {
|
|
1438
1380
|
const m = v.length - 1;
|
|
1439
1381
|
const f = m * k;
|
|
@@ -1442,57 +1384,27 @@ const linearInterpolation = (v, k) => {
|
|
|
1442
1384
|
if (k > 1) return linear(v[m], v[m - 1], m - f);
|
|
1443
1385
|
return linear(v[i], v[i + 1 > m ? m : i + 1], f - i);
|
|
1444
1386
|
};
|
|
1445
|
-
/**
|
|
1446
|
-
* Calculates the distance between two points.
|
|
1447
|
-
* @param {number} x1 - The x-coordinate of the first point.
|
|
1448
|
-
* @param {number} y1 - The y-coordinate of the first point.
|
|
1449
|
-
* @param {number} x2 - The x-coordinate of the second point.
|
|
1450
|
-
* @param {number} y2 - The y-coordinate of the second point.
|
|
1451
|
-
* @returns {number} The distance between the two points.
|
|
1452
|
-
*/
|
|
1387
|
+
/** Calculates the distance between two points. */
|
|
1453
1388
|
const distance = (x1, y1, x2, y2) => {
|
|
1454
1389
|
const dx = x1 - x2;
|
|
1455
1390
|
const dy = y1 - y2;
|
|
1456
1391
|
return Math.sqrt(dx * dx + dy * dy);
|
|
1457
1392
|
};
|
|
1458
|
-
/**
|
|
1459
|
-
* Checks if two numbers are within a tolerance of each other.
|
|
1460
|
-
* @param {number} a - The first number.
|
|
1461
|
-
* @param {number} b - The second number.
|
|
1462
|
-
* @param {number} tolerance - The tolerance value.
|
|
1463
|
-
* @returns {boolean} True if the numbers are within tolerance, false otherwise.
|
|
1464
|
-
*/
|
|
1393
|
+
/** Checks if two numbers are within a tolerance of each other. */
|
|
1465
1394
|
const within = (a, b, tolerance) => {
|
|
1466
1395
|
return Math.abs(a - b) <= tolerance;
|
|
1467
1396
|
};
|
|
1468
|
-
/**
|
|
1469
|
-
* Creates a 32-bit color value from alpha, red, green, and blue components.
|
|
1470
|
-
* @param {number} a - The alpha component (0-255).
|
|
1471
|
-
* @param {number} r - The red component (0-255).
|
|
1472
|
-
* @param {number} g - The green component (0-255).
|
|
1473
|
-
* @param {number} b - The blue component (0-255).
|
|
1474
|
-
* @returns {number} The 32-bit color value.
|
|
1475
|
-
*/
|
|
1397
|
+
/** Creates a 32-bit color value from alpha, red, green, and blue components. */
|
|
1476
1398
|
const getColor32 = (a, r, g, b) => {
|
|
1477
1399
|
return a << 24 | r << 16 | g << 8 | b;
|
|
1478
1400
|
};
|
|
1479
|
-
/**
|
|
1480
|
-
* Creates a 24-bit color value from red, green, and blue components.
|
|
1481
|
-
* @param {number} r - The red component (0-255).
|
|
1482
|
-
* @param {number} g - The green component (0-255).
|
|
1483
|
-
* @param {number} b - The blue component (0-255).
|
|
1484
|
-
* @returns {number} The 24-bit color value.
|
|
1485
|
-
*/
|
|
1401
|
+
/** Creates a 24-bit color value from red, green, and blue components. */
|
|
1486
1402
|
const getColor = (r, g, b) => {
|
|
1487
1403
|
return r << 16 | g << 8 | b;
|
|
1488
1404
|
};
|
|
1489
|
-
/**
|
|
1490
|
-
* Converts a hex color string to RGB components.
|
|
1491
|
-
* @param {string} value - The hex color string (e.g. "#FF0000").
|
|
1492
|
-
* @param {{r?: number, g?: number, b?: number}} out - The object to store the result in.
|
|
1493
|
-
*/
|
|
1405
|
+
/** Converts a hex color string to RGB components. */
|
|
1494
1406
|
const hexToColor = (value, out) => {
|
|
1495
|
-
value = value.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i, (
|
|
1407
|
+
value = value.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i, (_m, r, g, b) => r + r + g + g + b + b);
|
|
1496
1408
|
const result = /^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(value);
|
|
1497
1409
|
if (result) {
|
|
1498
1410
|
out.r = Number.parseInt(result[1], 16);
|
|
@@ -1500,11 +1412,7 @@ const hexToColor = (value, out) => {
|
|
|
1500
1412
|
out.b = Number.parseInt(result[3], 16);
|
|
1501
1413
|
}
|
|
1502
1414
|
};
|
|
1503
|
-
/**
|
|
1504
|
-
* Converts a web color string (e.g. "rgb(255, 0, 0)") to RGB components with alpha.
|
|
1505
|
-
* @param {string} value - The web color string (e.g. "rgba(255, 0, 0, 0.5)").
|
|
1506
|
-
* @param {{r?: number, g?: number, b?: number, a?: number}} out - The object to store the result in.
|
|
1507
|
-
*/
|
|
1415
|
+
/** Converts a web color string (e.g. "rgb(255, 0, 0)") to RGB components with alpha. */
|
|
1508
1416
|
const webToColor = (value, out) => {
|
|
1509
1417
|
const result = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(value);
|
|
1510
1418
|
if (result) {
|
|
@@ -1514,11 +1422,7 @@ const webToColor = (value, out) => {
|
|
|
1514
1422
|
out.a = result[4] !== void 0 ? Number.parseFloat(result[4]) : 1;
|
|
1515
1423
|
}
|
|
1516
1424
|
};
|
|
1517
|
-
/**
|
|
1518
|
-
* Extracts RGB components from a 32-bit color value.
|
|
1519
|
-
* @param {number} color - The 32-bit color value.
|
|
1520
|
-
* @returns {{ alpha: number, red: number, green: number, blue: number, a: number, r: number, g: number, b: number}} An object containing the color components.
|
|
1521
|
-
*/
|
|
1425
|
+
/** Extracts RGB components from a 32-bit color value. */
|
|
1522
1426
|
const getRGB = (color) => {
|
|
1523
1427
|
if (color > 16777215) return {
|
|
1524
1428
|
alpha: color >>> 24,
|
|
@@ -1541,12 +1445,7 @@ const getRGB = (color) => {
|
|
|
1541
1445
|
b: color & 255
|
|
1542
1446
|
};
|
|
1543
1447
|
};
|
|
1544
|
-
/**
|
|
1545
|
-
* Converts a color value (string or number) to an object with various color formats.
|
|
1546
|
-
* @param {string|number} value - The color value (e.g. "#FF0000" or 0xFF0000).
|
|
1547
|
-
* @param {{a?: number, r?: number, g?: number, b?: number, rgba?: string, color?: number, color32?: number}} out - The object to store the result in.
|
|
1548
|
-
* @returns {{a?: number, r?: number, g?: number, b?: number, rgba?: string, color?: number, color32?: number}} The updated out object.
|
|
1549
|
-
*/
|
|
1448
|
+
/** Converts a color value (string or number) to an object with various color formats. */
|
|
1550
1449
|
const valueToColor = (value, out) => {
|
|
1551
1450
|
if (typeof value === "string") if (value.indexOf("rgb") === 0) webToColor(value, out);
|
|
1552
1451
|
else {
|
|
@@ -1984,6 +1883,62 @@ const renderCanvas = (target, renderSession, matrix = null) => {
|
|
|
1984
1883
|
//#endregion
|
|
1985
1884
|
//#region src/phaser/display/display_object.ts
|
|
1986
1885
|
var DisplayObject = class {
|
|
1886
|
+
/** @type {boolean} */
|
|
1887
|
+
exists = true;
|
|
1888
|
+
/** @type {boolean} */
|
|
1889
|
+
renderable = false;
|
|
1890
|
+
/** @type {boolean} */
|
|
1891
|
+
visible = true;
|
|
1892
|
+
position;
|
|
1893
|
+
scale;
|
|
1894
|
+
pivot;
|
|
1895
|
+
anchor;
|
|
1896
|
+
/** @type {number} */
|
|
1897
|
+
rotation = 0;
|
|
1898
|
+
/** @type {number} */
|
|
1899
|
+
alpha = 1;
|
|
1900
|
+
/** @type {Rectangle} */
|
|
1901
|
+
hitArea = null;
|
|
1902
|
+
/** @type {DisplayObject} */
|
|
1903
|
+
parent = null;
|
|
1904
|
+
/** @type {number} */
|
|
1905
|
+
worldAlpha = 1;
|
|
1906
|
+
worldTransform;
|
|
1907
|
+
worldScale;
|
|
1908
|
+
/** @type {Rectangle} */
|
|
1909
|
+
filterArea = null;
|
|
1910
|
+
/** @type {number} */
|
|
1911
|
+
_sr = 0;
|
|
1912
|
+
/** @type {number} */
|
|
1913
|
+
_cr = 1;
|
|
1914
|
+
cachedBounds;
|
|
1915
|
+
/** @type {Rectangle} */
|
|
1916
|
+
currentBounds = null;
|
|
1917
|
+
/** @type {import('./graphics.js').Graphics} */
|
|
1918
|
+
_mask = null;
|
|
1919
|
+
/** @type {object[]} */
|
|
1920
|
+
_filters = null;
|
|
1921
|
+
/** @type {object} */
|
|
1922
|
+
_filterBlock = null;
|
|
1923
|
+
children;
|
|
1924
|
+
/** @type {boolean} */
|
|
1925
|
+
ignoreChildInput = false;
|
|
1926
|
+
/** @type {string | null} */
|
|
1927
|
+
name = null;
|
|
1928
|
+
/** @type {object | null} */
|
|
1929
|
+
data = null;
|
|
1930
|
+
game;
|
|
1931
|
+
type;
|
|
1932
|
+
_cachedSprite;
|
|
1933
|
+
rotationCache;
|
|
1934
|
+
worldRotation;
|
|
1935
|
+
transformCallback;
|
|
1936
|
+
transformCallbackContext;
|
|
1937
|
+
_width;
|
|
1938
|
+
_height;
|
|
1939
|
+
z;
|
|
1940
|
+
events;
|
|
1941
|
+
renderOrderID;
|
|
1987
1942
|
/**
|
|
1988
1943
|
* Creates a new DisplayObject instance.
|
|
1989
1944
|
* @param {import('../core/game.js').Game} game - The game instance this display object belongs to.
|
|
@@ -2288,13 +2243,13 @@ var DisplayObject = class {
|
|
|
2288
2243
|
const w1 = bounds.width + bounds.x;
|
|
2289
2244
|
const h0 = bounds.y;
|
|
2290
2245
|
const h1 = bounds.height + bounds.y;
|
|
2291
|
-
const worldTransform = this
|
|
2292
|
-
const a = worldTransform
|
|
2293
|
-
const b = worldTransform
|
|
2294
|
-
const c = worldTransform
|
|
2295
|
-
const d = worldTransform
|
|
2296
|
-
const tx = worldTransform
|
|
2297
|
-
const ty = worldTransform
|
|
2246
|
+
const { worldTransform } = this;
|
|
2247
|
+
const { a } = worldTransform;
|
|
2248
|
+
const { b } = worldTransform;
|
|
2249
|
+
const { c } = worldTransform;
|
|
2250
|
+
const { d } = worldTransform;
|
|
2251
|
+
const { tx } = worldTransform;
|
|
2252
|
+
const { ty } = worldTransform;
|
|
2298
2253
|
const x1 = a * w1 + c * h1 + tx;
|
|
2299
2254
|
const y1 = d * h1 + b * w1 + ty;
|
|
2300
2255
|
const x2 = a * w0 + c * h1 + tx;
|
|
@@ -2459,7 +2414,7 @@ var DisplayObject = class {
|
|
|
2459
2414
|
* @param {number} value - The new width in pixels.
|
|
2460
2415
|
*/
|
|
2461
2416
|
set width(value) {
|
|
2462
|
-
const width = this.getLocalBounds()
|
|
2417
|
+
const { width } = this.getLocalBounds();
|
|
2463
2418
|
if (width !== 0) this.scale.x = value / width;
|
|
2464
2419
|
else this.scale.x = 1;
|
|
2465
2420
|
this._width = value;
|
|
@@ -2476,7 +2431,7 @@ var DisplayObject = class {
|
|
|
2476
2431
|
* @param {number} value - The new height in pixels.
|
|
2477
2432
|
*/
|
|
2478
2433
|
set height(value) {
|
|
2479
|
-
const height = this.getLocalBounds()
|
|
2434
|
+
const { height } = this.getLocalBounds();
|
|
2480
2435
|
if (height !== 0) this.scale.y = value / height;
|
|
2481
2436
|
else this.scale.y = 1;
|
|
2482
2437
|
this._height = value;
|
|
@@ -2963,6 +2918,29 @@ var Signal = class {
|
|
|
2963
2918
|
//#endregion
|
|
2964
2919
|
//#region src/phaser/core/animation.ts
|
|
2965
2920
|
var Animation = class {
|
|
2921
|
+
game;
|
|
2922
|
+
_parent;
|
|
2923
|
+
_frameData;
|
|
2924
|
+
name;
|
|
2925
|
+
_frames;
|
|
2926
|
+
delay;
|
|
2927
|
+
loop;
|
|
2928
|
+
loopCount;
|
|
2929
|
+
isFinished;
|
|
2930
|
+
isPlaying;
|
|
2931
|
+
isPaused;
|
|
2932
|
+
_pauseStartTime;
|
|
2933
|
+
_frameIndex;
|
|
2934
|
+
_frameDiff;
|
|
2935
|
+
_frameSkip;
|
|
2936
|
+
currentFrame;
|
|
2937
|
+
onStart;
|
|
2938
|
+
onUpdate;
|
|
2939
|
+
onComplete;
|
|
2940
|
+
onLoop;
|
|
2941
|
+
isReversed;
|
|
2942
|
+
_timeLastFrame;
|
|
2943
|
+
_timeNextFrame;
|
|
2966
2944
|
/**
|
|
2967
2945
|
* Creates a new Animation instance.
|
|
2968
2946
|
* @param {import('./game.js').Game} game - The game instance this animation belongs to.
|
|
@@ -3071,7 +3049,8 @@ var Animation = class {
|
|
|
3071
3049
|
*/
|
|
3072
3050
|
reverseOnce() {
|
|
3073
3051
|
this.onComplete.addOnce(this.reverse, this);
|
|
3074
|
-
|
|
3052
|
+
this.reverse();
|
|
3053
|
+
return this;
|
|
3075
3054
|
}
|
|
3076
3055
|
/**
|
|
3077
3056
|
* Sets the current frame of this animation.
|
|
@@ -3150,7 +3129,7 @@ var Animation = class {
|
|
|
3150
3129
|
this.onLoop.dispatch(this._parent, this);
|
|
3151
3130
|
if (this.onUpdate) {
|
|
3152
3131
|
this.onUpdate.dispatch(this, this.currentFrame);
|
|
3153
|
-
return
|
|
3132
|
+
return Boolean(this._frameData);
|
|
3154
3133
|
}
|
|
3155
3134
|
return true;
|
|
3156
3135
|
}
|
|
@@ -3174,7 +3153,7 @@ var Animation = class {
|
|
|
3174
3153
|
if (this.currentFrame && (fromPlay || !fromPlay && idx !== this.currentFrame.index)) this._parent.setFrame(this.currentFrame);
|
|
3175
3154
|
if (this.onUpdate && signalUpdate) {
|
|
3176
3155
|
this.onUpdate.dispatch(this, this.currentFrame);
|
|
3177
|
-
return
|
|
3156
|
+
return Boolean(this._frameData);
|
|
3178
3157
|
}
|
|
3179
3158
|
return true;
|
|
3180
3159
|
}
|
|
@@ -3335,6 +3314,16 @@ var Animation = class {
|
|
|
3335
3314
|
//#endregion
|
|
3336
3315
|
//#region src/phaser/core/animation_manager.ts
|
|
3337
3316
|
var AnimationManager = class {
|
|
3317
|
+
sprite;
|
|
3318
|
+
game;
|
|
3319
|
+
currentFrame;
|
|
3320
|
+
currentAnim;
|
|
3321
|
+
updateIfVisible;
|
|
3322
|
+
isLoaded;
|
|
3323
|
+
_frameData;
|
|
3324
|
+
_anims;
|
|
3325
|
+
_outputFrames;
|
|
3326
|
+
_frameIndex;
|
|
3338
3327
|
/**
|
|
3339
3328
|
* Creates a new AnimationManager instance.
|
|
3340
3329
|
* @param {import('../display/image.js').Image} sprite - Reference to the parent Sprite.
|
|
@@ -3599,10 +3588,22 @@ var AnimationManager = class {
|
|
|
3599
3588
|
//#endregion
|
|
3600
3589
|
//#region src/phaser/core/event_manager.ts
|
|
3601
3590
|
var EventManager = class {
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3591
|
+
parent;
|
|
3592
|
+
_onAddedToGroup;
|
|
3593
|
+
_onRemovedFromGroup;
|
|
3594
|
+
_onDestroy;
|
|
3595
|
+
_onOutOfBounds;
|
|
3596
|
+
_onEnterBounds;
|
|
3597
|
+
_onInputOver;
|
|
3598
|
+
_onInputOut;
|
|
3599
|
+
_onInputDown;
|
|
3600
|
+
_onInputUp;
|
|
3601
|
+
_onDragStart;
|
|
3602
|
+
_onDragUpdate;
|
|
3603
|
+
_onDragStop;
|
|
3604
|
+
_onAnimationStart;
|
|
3605
|
+
_onAnimationComplete;
|
|
3606
|
+
_onAnimationLoop;
|
|
3606
3607
|
constructor(sprite) {
|
|
3607
3608
|
this.parent = sprite;
|
|
3608
3609
|
this._onAddedToGroup = null;
|
|
@@ -3621,11 +3622,8 @@ var EventManager = class {
|
|
|
3621
3622
|
this._onAnimationComplete = null;
|
|
3622
3623
|
this._onAnimationLoop = null;
|
|
3623
3624
|
}
|
|
3624
|
-
/**
|
|
3625
|
-
* Destroys the EventManager and cleans up resources.
|
|
3626
|
-
*/
|
|
3627
3625
|
destroy() {
|
|
3628
|
-
this.
|
|
3626
|
+
this.parent = null;
|
|
3629
3627
|
if (this._onDestroy) this._onDestroy.dispose();
|
|
3630
3628
|
if (this._onAddedToGroup) this._onAddedToGroup.dispose();
|
|
3631
3629
|
if (this._onRemovedFromGroup) this._onRemovedFromGroup.dispose();
|
|
@@ -3642,228 +3640,108 @@ var EventManager = class {
|
|
|
3642
3640
|
if (this._onAnimationComplete) this._onAnimationComplete.dispose();
|
|
3643
3641
|
if (this._onAnimationLoop) this._onAnimationLoop.dispose();
|
|
3644
3642
|
}
|
|
3645
|
-
/**
|
|
3646
|
-
* Gets the onAddedToGroup signal.
|
|
3647
|
-
* @returns {Signal} The Signal object for the onAddedToGroup event.
|
|
3648
|
-
*/
|
|
3649
3643
|
get onAddedToGroup() {
|
|
3650
3644
|
if (!this._onAddedToGroup) this._onAddedToGroup = new Signal();
|
|
3651
3645
|
return this._onAddedToGroup;
|
|
3652
3646
|
}
|
|
3653
|
-
/**
|
|
3654
|
-
* Dispatches the onAddedToGroup event.
|
|
3655
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3656
|
-
*/
|
|
3657
3647
|
onAddedToGroup$dispatch(...args) {
|
|
3658
3648
|
if (this._onAddedToGroup) this._onAddedToGroup.dispatch(...args);
|
|
3659
3649
|
}
|
|
3660
|
-
/**
|
|
3661
|
-
* Gets the onRemovedFromGroup signal.
|
|
3662
|
-
* @returns {Signal} The Signal object for the onRemovedFromGroup event.
|
|
3663
|
-
*/
|
|
3664
3650
|
get onRemovedFromGroup() {
|
|
3665
3651
|
if (!this._onRemovedFromGroup) this._onRemovedFromGroup = new Signal();
|
|
3666
3652
|
return this._onRemovedFromGroup;
|
|
3667
3653
|
}
|
|
3668
|
-
/**
|
|
3669
|
-
* Dispatches the onRemovedFromGroup event.
|
|
3670
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3671
|
-
*/
|
|
3672
3654
|
onRemovedFromGroup$dispatch(...args) {
|
|
3673
3655
|
if (this._onRemovedFromGroup) this._onRemovedFromGroup.dispatch(...args);
|
|
3674
3656
|
}
|
|
3675
|
-
/**
|
|
3676
|
-
* Gets the onDestroy signal.
|
|
3677
|
-
* @returns {Signal} The Signal object for the onDestroy event.
|
|
3678
|
-
*/
|
|
3679
3657
|
get onDestroy() {
|
|
3680
3658
|
if (!this._onDestroy) this._onDestroy = new Signal();
|
|
3681
3659
|
return this._onDestroy;
|
|
3682
3660
|
}
|
|
3683
|
-
/**
|
|
3684
|
-
* Dispatches the onDestroy event.
|
|
3685
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3686
|
-
*/
|
|
3687
3661
|
onDestroy$dispatch(...args) {
|
|
3688
3662
|
if (this._onDestroy) this._onDestroy.dispatch(...args);
|
|
3689
3663
|
}
|
|
3690
|
-
/**
|
|
3691
|
-
* Gets the onOutOfBounds signal.
|
|
3692
|
-
* @returns {Signal} The Signal object for the onOutOfBounds event.
|
|
3693
|
-
*/
|
|
3694
3664
|
get onOutOfBounds() {
|
|
3695
3665
|
if (!this._onOutOfBounds) this._onOutOfBounds = new Signal();
|
|
3696
3666
|
return this._onOutOfBounds;
|
|
3697
3667
|
}
|
|
3698
|
-
/**
|
|
3699
|
-
* Dispatches the onOutOfBounds event.
|
|
3700
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3701
|
-
*/
|
|
3702
3668
|
onOutOfBounds$dispatch(...args) {
|
|
3703
3669
|
if (this._onOutOfBounds) this._onOutOfBounds.dispatch(...args);
|
|
3704
3670
|
}
|
|
3705
|
-
/**
|
|
3706
|
-
* Gets the onEnterBounds signal.
|
|
3707
|
-
* @returns {Signal} The Signal object for the onEnterBounds event.
|
|
3708
|
-
*/
|
|
3709
3671
|
get onEnterBounds() {
|
|
3710
3672
|
if (!this._onEnterBounds) this._onEnterBounds = new Signal();
|
|
3711
3673
|
return this._onEnterBounds;
|
|
3712
3674
|
}
|
|
3713
|
-
/**
|
|
3714
|
-
* Dispatches the onEnterBounds event.
|
|
3715
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3716
|
-
*/
|
|
3717
3675
|
onEnterBounds$dispatch(...args) {
|
|
3718
3676
|
if (this._onEnterBounds) this._onEnterBounds.dispatch(...args);
|
|
3719
3677
|
}
|
|
3720
|
-
/**
|
|
3721
|
-
* Gets the onInputOver signal.
|
|
3722
|
-
* @returns {Signal} The Signal object for the onInputOver event.
|
|
3723
|
-
*/
|
|
3724
3678
|
get onInputOver() {
|
|
3725
3679
|
if (!this._onInputOver) this._onInputOver = new Signal();
|
|
3726
3680
|
return this._onInputOver;
|
|
3727
3681
|
}
|
|
3728
|
-
/**
|
|
3729
|
-
* Dispatches the onInputOver event.
|
|
3730
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3731
|
-
*/
|
|
3732
3682
|
onInputOver$dispatch(...args) {
|
|
3733
3683
|
if (this._onInputOver) this._onInputOver.dispatch(...args);
|
|
3734
3684
|
}
|
|
3735
|
-
/**
|
|
3736
|
-
* Gets the onInputOut signal.
|
|
3737
|
-
* @returns {Signal} The Signal object for the onInputOut event.
|
|
3738
|
-
*/
|
|
3739
3685
|
get onInputOut() {
|
|
3740
3686
|
if (!this._onInputOut) this._onInputOut = new Signal();
|
|
3741
3687
|
return this._onInputOut;
|
|
3742
3688
|
}
|
|
3743
|
-
/**
|
|
3744
|
-
* Dispatches the onInputOut event.
|
|
3745
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3746
|
-
*/
|
|
3747
3689
|
onInputOut$dispatch(...args) {
|
|
3748
3690
|
if (this._onInputOut) this._onInputOut.dispatch(...args);
|
|
3749
3691
|
}
|
|
3750
|
-
/**
|
|
3751
|
-
* Gets the onInputDown signal.
|
|
3752
|
-
* @returns {Signal} The Signal object for the onInputDown event.
|
|
3753
|
-
*/
|
|
3754
3692
|
get onInputDown() {
|
|
3755
3693
|
if (!this._onInputDown) this._onInputDown = new Signal();
|
|
3756
3694
|
return this._onInputDown;
|
|
3757
3695
|
}
|
|
3758
|
-
/**
|
|
3759
|
-
* Dispatches the onInputDown event.
|
|
3760
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3761
|
-
*/
|
|
3762
3696
|
onInputDown$dispatch(...args) {
|
|
3763
3697
|
if (this._onInputDown) this._onInputDown.dispatch(...args);
|
|
3764
3698
|
}
|
|
3765
|
-
/**
|
|
3766
|
-
* Gets the onInputUp signal.
|
|
3767
|
-
* @returns {Signal} The Signal object for the onInputUp event.
|
|
3768
|
-
*/
|
|
3769
3699
|
get onInputUp() {
|
|
3770
3700
|
if (!this._onInputUp) this._onInputUp = new Signal();
|
|
3771
3701
|
return this._onInputUp;
|
|
3772
3702
|
}
|
|
3773
|
-
/**
|
|
3774
|
-
* Dispatches the onInputUp event.
|
|
3775
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3776
|
-
*/
|
|
3777
3703
|
onInputUp$dispatch(...args) {
|
|
3778
3704
|
if (this._onInputUp) this._onInputUp.dispatch(...args);
|
|
3779
3705
|
}
|
|
3780
|
-
/**
|
|
3781
|
-
* Gets the onDragStart signal.
|
|
3782
|
-
* @returns {Signal} The Signal object for the onDragStart event.
|
|
3783
|
-
*/
|
|
3784
3706
|
get onDragStart() {
|
|
3785
3707
|
if (!this._onDragStart) this._onDragStart = new Signal();
|
|
3786
3708
|
return this._onDragStart;
|
|
3787
3709
|
}
|
|
3788
|
-
/**
|
|
3789
|
-
* Dispatches the onDragStart event.
|
|
3790
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3791
|
-
*/
|
|
3792
3710
|
onDragStart$dispatch(...args) {
|
|
3793
3711
|
if (this._onDragStart) this._onDragStart.dispatch(...args);
|
|
3794
3712
|
}
|
|
3795
|
-
/**
|
|
3796
|
-
* Gets the onDragUpdate signal.
|
|
3797
|
-
* @returns {Signal} The Signal object for the onDragUpdate event.
|
|
3798
|
-
*/
|
|
3799
3713
|
get onDragUpdate() {
|
|
3800
3714
|
if (!this._onDragUpdate) this._onDragUpdate = new Signal();
|
|
3801
3715
|
return this._onDragUpdate;
|
|
3802
3716
|
}
|
|
3803
|
-
/**
|
|
3804
|
-
* Dispatches the onDragUpdate event.
|
|
3805
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3806
|
-
*/
|
|
3807
3717
|
onDragUpdate$dispatch(...args) {
|
|
3808
3718
|
if (this._onDragUpdate) this._onDragUpdate.dispatch(...args);
|
|
3809
3719
|
}
|
|
3810
|
-
/**
|
|
3811
|
-
* Gets the onDragStop signal.
|
|
3812
|
-
* @returns {Signal} The Signal object for the onDragStop event.
|
|
3813
|
-
*/
|
|
3814
3720
|
get onDragStop() {
|
|
3815
3721
|
if (!this._onDragStop) this._onDragStop = new Signal();
|
|
3816
3722
|
return this._onDragStop;
|
|
3817
3723
|
}
|
|
3818
|
-
/**
|
|
3819
|
-
* Dispatches the onDragStop event.
|
|
3820
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3821
|
-
*/
|
|
3822
3724
|
onDragStop$dispatch(...args) {
|
|
3823
3725
|
if (this._onDragStop) this._onDragStop.dispatch(...args);
|
|
3824
3726
|
}
|
|
3825
|
-
/**
|
|
3826
|
-
* Gets the onAnimationStart signal.
|
|
3827
|
-
* @returns {Signal} The Signal object for the onAnimationStart event.
|
|
3828
|
-
*/
|
|
3829
3727
|
get onAnimationStart() {
|
|
3830
3728
|
if (!this._onAnimationStart) this._onAnimationStart = new Signal();
|
|
3831
3729
|
return this._onAnimationStart;
|
|
3832
3730
|
}
|
|
3833
|
-
/**
|
|
3834
|
-
* Dispatches the onAnimationStart event.
|
|
3835
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3836
|
-
*/
|
|
3837
3731
|
onAnimationStart$dispatch(...args) {
|
|
3838
3732
|
if (this._onAnimationStart) this._onAnimationStart.dispatch(...args);
|
|
3839
3733
|
}
|
|
3840
|
-
/**
|
|
3841
|
-
* Gets the onAnimationComplete signal.
|
|
3842
|
-
* @returns {Signal} The Signal object for the onAnimationComplete event.
|
|
3843
|
-
*/
|
|
3844
3734
|
get onAnimationComplete() {
|
|
3845
3735
|
if (!this._onAnimationComplete) this._onAnimationComplete = new Signal();
|
|
3846
3736
|
return this._onAnimationComplete;
|
|
3847
3737
|
}
|
|
3848
|
-
/**
|
|
3849
|
-
* Dispatches the onAnimationComplete event.
|
|
3850
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3851
|
-
*/
|
|
3852
3738
|
onAnimationComplete$dispatch(...args) {
|
|
3853
3739
|
if (this._onAnimationComplete) this._onAnimationComplete.dispatch(...args);
|
|
3854
3740
|
}
|
|
3855
|
-
/**
|
|
3856
|
-
* Gets the onAnimationLoop signal.
|
|
3857
|
-
* @returns {Signal} The Signal object for the onAnimationLoop event.
|
|
3858
|
-
*/
|
|
3859
3741
|
get onAnimationLoop() {
|
|
3860
3742
|
if (!this._onAnimationLoop) this._onAnimationLoop = new Signal();
|
|
3861
3743
|
return this._onAnimationLoop;
|
|
3862
3744
|
}
|
|
3863
|
-
/**
|
|
3864
|
-
* Dispatches the onAnimationLoop event.
|
|
3865
|
-
* @param {...any} args - Arguments to pass to the signal.
|
|
3866
|
-
*/
|
|
3867
3745
|
onAnimationLoop$dispatch(...args) {
|
|
3868
3746
|
if (this._onAnimationLoop) this._onAnimationLoop.dispatch(...args);
|
|
3869
3747
|
}
|
|
@@ -3871,6 +3749,26 @@ var EventManager = class {
|
|
|
3871
3749
|
//#endregion
|
|
3872
3750
|
//#region src/phaser/display/webgl/texture.ts
|
|
3873
3751
|
var TextureUvs = class {
|
|
3752
|
+
noFrame;
|
|
3753
|
+
baseTexture;
|
|
3754
|
+
frame;
|
|
3755
|
+
trim;
|
|
3756
|
+
valid;
|
|
3757
|
+
isTiling;
|
|
3758
|
+
requiresUpdate;
|
|
3759
|
+
requiresReTint;
|
|
3760
|
+
_uvs;
|
|
3761
|
+
width;
|
|
3762
|
+
height;
|
|
3763
|
+
crop;
|
|
3764
|
+
x0;
|
|
3765
|
+
y0;
|
|
3766
|
+
x1;
|
|
3767
|
+
y1;
|
|
3768
|
+
x2;
|
|
3769
|
+
y2;
|
|
3770
|
+
x3;
|
|
3771
|
+
y3;
|
|
3874
3772
|
/**
|
|
3875
3773
|
* Creates a new Texture instance.
|
|
3876
3774
|
*/
|
|
@@ -3886,6 +3784,18 @@ var TextureUvs = class {
|
|
|
3886
3784
|
}
|
|
3887
3785
|
};
|
|
3888
3786
|
var Texture = class Texture {
|
|
3787
|
+
noFrame;
|
|
3788
|
+
baseTexture;
|
|
3789
|
+
frame;
|
|
3790
|
+
trim;
|
|
3791
|
+
valid;
|
|
3792
|
+
isTiling;
|
|
3793
|
+
requiresUpdate;
|
|
3794
|
+
requiresReTint;
|
|
3795
|
+
_uvs;
|
|
3796
|
+
width;
|
|
3797
|
+
height;
|
|
3798
|
+
crop;
|
|
3889
3799
|
/**
|
|
3890
3800
|
* Creates a new Texture instance.
|
|
3891
3801
|
* @param {import('./base_texture.js').BaseTexture} baseTexture - The base texture to use.
|
|
@@ -3989,6 +3899,21 @@ var Texture = class Texture {
|
|
|
3989
3899
|
//#endregion
|
|
3990
3900
|
//#region src/phaser/display/image.ts
|
|
3991
3901
|
var Image$1 = class extends DisplayObject {
|
|
3902
|
+
key;
|
|
3903
|
+
texture;
|
|
3904
|
+
tint;
|
|
3905
|
+
cachedTint;
|
|
3906
|
+
tilingTexture;
|
|
3907
|
+
tintedTexture;
|
|
3908
|
+
blendMode;
|
|
3909
|
+
shader;
|
|
3910
|
+
_frame;
|
|
3911
|
+
pendingDestroy;
|
|
3912
|
+
animations;
|
|
3913
|
+
customRender;
|
|
3914
|
+
cropRect;
|
|
3915
|
+
_crop;
|
|
3916
|
+
refreshTexture;
|
|
3992
3917
|
/**
|
|
3993
3918
|
* Creates a new Image instance.
|
|
3994
3919
|
* @param {import('../core/game.js').Game} game - The game instance this image belongs to.
|
|
@@ -4085,7 +4010,7 @@ var Image$1 = class extends DisplayObject {
|
|
|
4085
4010
|
if (stopAnimation) this.animations.stop();
|
|
4086
4011
|
this.key = key;
|
|
4087
4012
|
this.customRender = false;
|
|
4088
|
-
const cache = this.game
|
|
4013
|
+
const { cache } = this.game;
|
|
4089
4014
|
const smoothed = !this.texture.baseTexture.scaleMode;
|
|
4090
4015
|
let setFrame = true;
|
|
4091
4016
|
if (key instanceof Texture) this.setTexture(key);
|
|
@@ -4306,6 +4231,19 @@ var Image$1 = class extends DisplayObject {
|
|
|
4306
4231
|
//#endregion
|
|
4307
4232
|
//#region src/phaser/display/bitmap_text.ts
|
|
4308
4233
|
var BitmapText = class extends DisplayObject {
|
|
4234
|
+
pendingDestroy;
|
|
4235
|
+
textWidth;
|
|
4236
|
+
textHeight;
|
|
4237
|
+
_prevAnchor;
|
|
4238
|
+
_glyphs;
|
|
4239
|
+
_maxWidth;
|
|
4240
|
+
_text;
|
|
4241
|
+
_data;
|
|
4242
|
+
_font;
|
|
4243
|
+
_fontSize;
|
|
4244
|
+
_align;
|
|
4245
|
+
_tint;
|
|
4246
|
+
dirty;
|
|
4309
4247
|
/**
|
|
4310
4248
|
* Creates a new BitmapText instance.
|
|
4311
4249
|
* @param {import('../core/game.js').Game} game - The game instance this bitmap text belongs to.
|
|
@@ -4533,6 +4471,7 @@ var BitmapText = class extends DisplayObject {
|
|
|
4533
4471
|
this._prevAnchor.copyFrom(this.anchor);
|
|
4534
4472
|
}
|
|
4535
4473
|
super.updateTransform();
|
|
4474
|
+
return this;
|
|
4536
4475
|
}
|
|
4537
4476
|
/**
|
|
4538
4477
|
* Adds a color to a specific position in the text.
|
|
@@ -4692,6 +4631,50 @@ var BitmapText = class extends DisplayObject {
|
|
|
4692
4631
|
//#endregion
|
|
4693
4632
|
//#region src/phaser/core/input_handler.ts
|
|
4694
4633
|
var InputHandler = class {
|
|
4634
|
+
sprite;
|
|
4635
|
+
game;
|
|
4636
|
+
enabled;
|
|
4637
|
+
checked;
|
|
4638
|
+
priorityID;
|
|
4639
|
+
useHandCursor;
|
|
4640
|
+
_setHandCursor;
|
|
4641
|
+
isDragged;
|
|
4642
|
+
allowHorizontalDrag;
|
|
4643
|
+
allowVerticalDrag;
|
|
4644
|
+
bringToTop;
|
|
4645
|
+
snapOffset;
|
|
4646
|
+
snapOnDrag;
|
|
4647
|
+
snapOnRelease;
|
|
4648
|
+
snapX;
|
|
4649
|
+
snapY;
|
|
4650
|
+
snapOffsetX;
|
|
4651
|
+
snapOffsetY;
|
|
4652
|
+
pixelPerfectOver;
|
|
4653
|
+
pixelPerfectClick;
|
|
4654
|
+
pixelPerfectAlpha;
|
|
4655
|
+
draggable;
|
|
4656
|
+
boundsRect;
|
|
4657
|
+
boundsSprite;
|
|
4658
|
+
scaleLayer;
|
|
4659
|
+
dragOffset;
|
|
4660
|
+
dragFromCenter;
|
|
4661
|
+
dragStopBlocksInputUp;
|
|
4662
|
+
dragStartPoint;
|
|
4663
|
+
dragDistanceThreshold;
|
|
4664
|
+
dragTimeThreshold;
|
|
4665
|
+
downPoint;
|
|
4666
|
+
snapPoint;
|
|
4667
|
+
_dragPoint;
|
|
4668
|
+
_dragPhase;
|
|
4669
|
+
_pendingDrag;
|
|
4670
|
+
_dragTimePass;
|
|
4671
|
+
_dragDistancePass;
|
|
4672
|
+
_wasEnabled;
|
|
4673
|
+
_tempPoint;
|
|
4674
|
+
_pointerData;
|
|
4675
|
+
_dx;
|
|
4676
|
+
_dy;
|
|
4677
|
+
_draggedPointerID;
|
|
4695
4678
|
/**
|
|
4696
4679
|
* TBD.
|
|
4697
4680
|
* @param {import('../display/image.js').Image} sprite - TBD.
|
|
@@ -5412,6 +5395,20 @@ const STATE_DOWN = "Down";
|
|
|
5412
5395
|
const STATE_UP = "Up";
|
|
5413
5396
|
const STATE_DISABLED = "Disabled";
|
|
5414
5397
|
var Button = class extends Image$1 {
|
|
5398
|
+
_onOverFrame;
|
|
5399
|
+
_onOutFrame;
|
|
5400
|
+
_onDownFrame;
|
|
5401
|
+
_onUpFrame;
|
|
5402
|
+
_onDisabledFrame;
|
|
5403
|
+
onInputOver;
|
|
5404
|
+
onInputOut;
|
|
5405
|
+
onInputDown;
|
|
5406
|
+
onInputUp;
|
|
5407
|
+
onOverMouseOnly;
|
|
5408
|
+
justReleasedPreventsOver;
|
|
5409
|
+
freezeFrames;
|
|
5410
|
+
forceOut;
|
|
5411
|
+
input;
|
|
5415
5412
|
/**
|
|
5416
5413
|
* Creates a new Button instance.
|
|
5417
5414
|
* @param {import('../core/game.js').Game} game - The game instance this button belongs to.
|
|
@@ -6259,6 +6256,10 @@ var RoundedRectangle = class {
|
|
|
6259
6256
|
//#endregion
|
|
6260
6257
|
//#region src/phaser/display/canvas/buffer.ts
|
|
6261
6258
|
var CanvasBuffer = class {
|
|
6259
|
+
width;
|
|
6260
|
+
height;
|
|
6261
|
+
canvas;
|
|
6262
|
+
context;
|
|
6262
6263
|
/**
|
|
6263
6264
|
* Creates a new CanvasBuffer instance.
|
|
6264
6265
|
* @param {number} width - The width of the canvas buffer.
|
|
@@ -6514,6 +6515,16 @@ const clone$1 = (source) => {
|
|
|
6514
6515
|
//#endregion
|
|
6515
6516
|
//#region src/phaser/display/graphics_data.ts
|
|
6516
6517
|
var GraphicsData$1 = class {
|
|
6518
|
+
lineWidth;
|
|
6519
|
+
lineColor;
|
|
6520
|
+
lineAlpha;
|
|
6521
|
+
_lineTint;
|
|
6522
|
+
fillColor;
|
|
6523
|
+
fillAlpha;
|
|
6524
|
+
_fillTint;
|
|
6525
|
+
fill;
|
|
6526
|
+
shape;
|
|
6527
|
+
type;
|
|
6517
6528
|
/**
|
|
6518
6529
|
* Creates a new GraphicsData object.
|
|
6519
6530
|
* @param {number} lineWidth - The line width.
|
|
@@ -7154,6 +7165,15 @@ function triangulate(data, holeIndices, dim) {
|
|
|
7154
7165
|
//#endregion
|
|
7155
7166
|
//#region src/phaser/display/webgl/graphics_data.ts
|
|
7156
7167
|
var GraphicsData = class {
|
|
7168
|
+
gl;
|
|
7169
|
+
color;
|
|
7170
|
+
points;
|
|
7171
|
+
indices;
|
|
7172
|
+
buffer;
|
|
7173
|
+
indexBuffer;
|
|
7174
|
+
mode;
|
|
7175
|
+
alpha;
|
|
7176
|
+
dirty;
|
|
7157
7177
|
/**
|
|
7158
7178
|
* Creates a new GraphicsData instance.
|
|
7159
7179
|
* @param {WebGLRenderingContext} gl - The WebGL rendering context.
|
|
@@ -7724,6 +7744,18 @@ const renderGraphics = (graphics, renderSession) => {
|
|
|
7724
7744
|
//#endregion
|
|
7725
7745
|
//#region src/phaser/display/webgl/base_texture.ts
|
|
7726
7746
|
var BaseTexture = class {
|
|
7747
|
+
resolution;
|
|
7748
|
+
width;
|
|
7749
|
+
height;
|
|
7750
|
+
scaleMode;
|
|
7751
|
+
hasLoaded;
|
|
7752
|
+
source;
|
|
7753
|
+
premultipliedAlpha;
|
|
7754
|
+
_glTextures;
|
|
7755
|
+
mipmap;
|
|
7756
|
+
skipRender;
|
|
7757
|
+
_powerOf2;
|
|
7758
|
+
_dirty;
|
|
7727
7759
|
/**
|
|
7728
7760
|
* Updates the base texture with a new source.
|
|
7729
7761
|
* @param {HTMLCanvasElement} source - The new canvas element to use as the texture source.
|
|
@@ -7820,6 +7852,26 @@ const textureFromCanvas = (canvas, scaleMode) => {
|
|
|
7820
7852
|
//#endregion
|
|
7821
7853
|
//#region src/phaser/display/graphics.ts
|
|
7822
7854
|
var Graphics = class extends DisplayObject {
|
|
7855
|
+
fillAlpha;
|
|
7856
|
+
lineWidth;
|
|
7857
|
+
lineColor;
|
|
7858
|
+
lineAlpha;
|
|
7859
|
+
graphicsData;
|
|
7860
|
+
blendMode;
|
|
7861
|
+
currentPath;
|
|
7862
|
+
_webGL;
|
|
7863
|
+
isMask;
|
|
7864
|
+
boundsPadding;
|
|
7865
|
+
_localBounds;
|
|
7866
|
+
dirty;
|
|
7867
|
+
clearDirty;
|
|
7868
|
+
_boundsDirty;
|
|
7869
|
+
_cacheAsBitmap;
|
|
7870
|
+
webGLDirty;
|
|
7871
|
+
cachedSpriteDirty;
|
|
7872
|
+
filling;
|
|
7873
|
+
fillColor;
|
|
7874
|
+
_prevTint;
|
|
7823
7875
|
/**
|
|
7824
7876
|
* Creates a new Graphics object.
|
|
7825
7877
|
* @param {import('../core/game.js').Game} game - The game instance.
|
|
@@ -8559,6 +8611,19 @@ var Graphics = class extends DisplayObject {
|
|
|
8559
8611
|
//#endregion
|
|
8560
8612
|
//#region src/phaser/display/group.ts
|
|
8561
8613
|
var Group = class extends DisplayObject {
|
|
8614
|
+
ignoreDestroy;
|
|
8615
|
+
pendingDestroy;
|
|
8616
|
+
classType;
|
|
8617
|
+
cursor;
|
|
8618
|
+
inputEnableChildren;
|
|
8619
|
+
onChildInputDown;
|
|
8620
|
+
onChildInputUp;
|
|
8621
|
+
onChildInputOver;
|
|
8622
|
+
onChildInputOut;
|
|
8623
|
+
onDestroy;
|
|
8624
|
+
cursorIndex;
|
|
8625
|
+
_sortProperty;
|
|
8626
|
+
filters;
|
|
8562
8627
|
/**
|
|
8563
8628
|
* Creates a new Group object.
|
|
8564
8629
|
* @param {import('../core/game.js').Game} game - The game instance this group belongs to.
|
|
@@ -8811,6 +8876,23 @@ var Group = class extends DisplayObject {
|
|
|
8811
8876
|
//#endregion
|
|
8812
8877
|
//#region src/phaser/display/text.ts
|
|
8813
8878
|
var Text = class extends Image$1 {
|
|
8879
|
+
canvas;
|
|
8880
|
+
context;
|
|
8881
|
+
padding;
|
|
8882
|
+
textBounds;
|
|
8883
|
+
style;
|
|
8884
|
+
colors;
|
|
8885
|
+
strokeColors;
|
|
8886
|
+
fontStyles;
|
|
8887
|
+
fontWeights;
|
|
8888
|
+
autoRound;
|
|
8889
|
+
useAdvancedWrap;
|
|
8890
|
+
_res;
|
|
8891
|
+
_text;
|
|
8892
|
+
_fontComponents;
|
|
8893
|
+
_lineSpacing;
|
|
8894
|
+
_charCount;
|
|
8895
|
+
dirty;
|
|
8814
8896
|
/**
|
|
8815
8897
|
* Creates a new Text object.
|
|
8816
8898
|
* @param {import('../core/game.js').Game} game - The game instance this text belongs to.
|
|
@@ -9640,7 +9722,7 @@ var Text = class extends Image$1 {
|
|
|
9640
9722
|
*/
|
|
9641
9723
|
set fontSize(value) {
|
|
9642
9724
|
let mutatedValue = value || "0";
|
|
9643
|
-
if (typeof mutatedValue === "number") mutatedValue
|
|
9725
|
+
if (typeof mutatedValue === "number") mutatedValue = `${mutatedValue}px`;
|
|
9644
9726
|
this._fontComponents.fontSize = mutatedValue;
|
|
9645
9727
|
this.updateFont(this._fontComponents);
|
|
9646
9728
|
}
|
|
@@ -10021,6 +10103,7 @@ var Text = class extends Image$1 {
|
|
|
10021
10103
|
//#endregion
|
|
10022
10104
|
//#region src/phaser/core/factory.ts
|
|
10023
10105
|
var GameObjectFactory = class {
|
|
10106
|
+
game;
|
|
10024
10107
|
/**
|
|
10025
10108
|
* Creates a new GameObjectFactory instance.
|
|
10026
10109
|
* @param {import('./game.js').Game} game - The game instance this factory belongs to.
|
|
@@ -10232,6 +10315,19 @@ const getSmoothingPrefix = (context) => {
|
|
|
10232
10315
|
//#endregion
|
|
10233
10316
|
//#region src/phaser/display/canvas/renderer.ts
|
|
10234
10317
|
var CanvasRenderer = class {
|
|
10318
|
+
type;
|
|
10319
|
+
resolution;
|
|
10320
|
+
clearBeforeRender;
|
|
10321
|
+
transparent;
|
|
10322
|
+
autoResize;
|
|
10323
|
+
contextLost;
|
|
10324
|
+
width;
|
|
10325
|
+
height;
|
|
10326
|
+
view;
|
|
10327
|
+
context;
|
|
10328
|
+
refresh;
|
|
10329
|
+
count;
|
|
10330
|
+
renderSession;
|
|
10235
10331
|
/**
|
|
10236
10332
|
* Creates a new CanvasRenderer instance.
|
|
10237
10333
|
* @param {import('../../core/game.js').Game} game - The game instance.
|
|
@@ -10359,6 +10455,8 @@ var CanvasRenderer = class {
|
|
|
10359
10455
|
//#endregion
|
|
10360
10456
|
//#region src/phaser/display/webgl/blend_manager.ts
|
|
10361
10457
|
var WebGLBlendModeManager = class {
|
|
10458
|
+
gl;
|
|
10459
|
+
currentBlendMode;
|
|
10362
10460
|
/**
|
|
10363
10461
|
* Creates a new BlendModeManager instance.
|
|
10364
10462
|
*/
|
|
@@ -10395,6 +10493,9 @@ var WebGLBlendModeManager = class {
|
|
|
10395
10493
|
//#endregion
|
|
10396
10494
|
//#region src/phaser/display/webgl/filter_manager.ts
|
|
10397
10495
|
var WebGLFilterManager = class {
|
|
10496
|
+
filterStack;
|
|
10497
|
+
offsetX;
|
|
10498
|
+
offsetY;
|
|
10398
10499
|
/**
|
|
10399
10500
|
* Creates a new FilterManager instance.
|
|
10400
10501
|
*/
|
|
@@ -10555,6 +10656,11 @@ const compileProgram = (gl, vertexSrc, fragmentSrc) => {
|
|
|
10555
10656
|
//#endregion
|
|
10556
10657
|
//#region src/phaser/display/webgl/shader/complex.ts
|
|
10557
10658
|
var ComplexPrimitiveShader = class {
|
|
10659
|
+
gl;
|
|
10660
|
+
_UID;
|
|
10661
|
+
program;
|
|
10662
|
+
fragmentSrc;
|
|
10663
|
+
vertexSrc;
|
|
10558
10664
|
/**
|
|
10559
10665
|
* Creates a new ComplexShader instance.
|
|
10560
10666
|
* @param {WebGLRenderingContext} gl - The WebGL rendering context.
|
|
@@ -10621,6 +10727,12 @@ var ComplexPrimitiveShader = class {
|
|
|
10621
10727
|
//#endregion
|
|
10622
10728
|
//#region src/phaser/display/webgl/shader/fast.ts
|
|
10623
10729
|
var FastShader = class {
|
|
10730
|
+
gl;
|
|
10731
|
+
_UID;
|
|
10732
|
+
program;
|
|
10733
|
+
textureCount;
|
|
10734
|
+
fragmentSrc;
|
|
10735
|
+
vertexSrc;
|
|
10624
10736
|
/**
|
|
10625
10737
|
* Creates a new FastShader instance.
|
|
10626
10738
|
* @param {WebGLRenderingContext} gl - The WebGL rendering context.
|
|
@@ -10723,6 +10835,16 @@ const defaultVertexSrc = [
|
|
|
10723
10835
|
"}"
|
|
10724
10836
|
];
|
|
10725
10837
|
var NormalShader = class {
|
|
10838
|
+
gl;
|
|
10839
|
+
_UID;
|
|
10840
|
+
program;
|
|
10841
|
+
fragmentSrc;
|
|
10842
|
+
vertexSrc;
|
|
10843
|
+
textureCount;
|
|
10844
|
+
firstRun;
|
|
10845
|
+
dirty;
|
|
10846
|
+
uniforms;
|
|
10847
|
+
attributes;
|
|
10726
10848
|
/**
|
|
10727
10849
|
* Creates a new NormalShader instance.
|
|
10728
10850
|
* @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context.
|
|
@@ -10879,6 +11001,11 @@ var NormalShader = class {
|
|
|
10879
11001
|
//#endregion
|
|
10880
11002
|
//#region src/phaser/display/webgl/shader/primitive.ts
|
|
10881
11003
|
var PrimitiveShader = class {
|
|
11004
|
+
gl;
|
|
11005
|
+
_UID;
|
|
11006
|
+
program;
|
|
11007
|
+
fragmentSrc;
|
|
11008
|
+
vertexSrc;
|
|
10882
11009
|
/**
|
|
10883
11010
|
* Creates a new PrimitiveShader instance.
|
|
10884
11011
|
* @param {WebGLRenderingContext} gl - The WebGL rendering context.
|
|
@@ -10945,6 +11072,11 @@ var PrimitiveShader = class {
|
|
|
10945
11072
|
//#endregion
|
|
10946
11073
|
//#region src/phaser/display/webgl/shader/strip.ts
|
|
10947
11074
|
var StripShader = class {
|
|
11075
|
+
gl;
|
|
11076
|
+
_UID;
|
|
11077
|
+
program;
|
|
11078
|
+
fragmentSrc;
|
|
11079
|
+
vertexSrc;
|
|
10948
11080
|
/**
|
|
10949
11081
|
* Creates a new StripShader instance.
|
|
10950
11082
|
* @param {WebGLRenderingContext} gl - The WebGL rendering context.
|
|
@@ -11010,6 +11142,16 @@ var StripShader = class {
|
|
|
11010
11142
|
//#endregion
|
|
11011
11143
|
//#region src/phaser/display/webgl/shader_manager.ts
|
|
11012
11144
|
var WebGLShaderManager = class {
|
|
11145
|
+
gl;
|
|
11146
|
+
primitiveShader;
|
|
11147
|
+
complexPrimitiveShader;
|
|
11148
|
+
defaultShader;
|
|
11149
|
+
fastShader;
|
|
11150
|
+
stripShader;
|
|
11151
|
+
maxAttibs;
|
|
11152
|
+
attribState;
|
|
11153
|
+
tempAttribState;
|
|
11154
|
+
stack;
|
|
11013
11155
|
/**
|
|
11014
11156
|
* Initializes the shader manager with a WebGL context.
|
|
11015
11157
|
*/
|
|
@@ -11089,6 +11231,12 @@ var WebGLShaderManager = class {
|
|
|
11089
11231
|
//#endregion
|
|
11090
11232
|
//#region src/phaser/display/webgl/abstract_filter.ts
|
|
11091
11233
|
var AbstractFilter = class {
|
|
11234
|
+
passes;
|
|
11235
|
+
shaders;
|
|
11236
|
+
dirty;
|
|
11237
|
+
padding;
|
|
11238
|
+
uniforms;
|
|
11239
|
+
fragmentSrc;
|
|
11092
11240
|
/**
|
|
11093
11241
|
* Creates a new AbstractFilter instance.
|
|
11094
11242
|
* @param {string[]} fragmentSrc - The fragment shader source.
|
|
@@ -11112,6 +11260,22 @@ var AbstractFilter = class {
|
|
|
11112
11260
|
//#endregion
|
|
11113
11261
|
//#region src/phaser/display/webgl/sprite_batch.ts
|
|
11114
11262
|
var WebGLSpriteBatch = class {
|
|
11263
|
+
vertSize;
|
|
11264
|
+
size;
|
|
11265
|
+
vertices;
|
|
11266
|
+
positions;
|
|
11267
|
+
colors;
|
|
11268
|
+
indices;
|
|
11269
|
+
lastIndexCount;
|
|
11270
|
+
drawing;
|
|
11271
|
+
currentBatchSize;
|
|
11272
|
+
currentBaseTexture;
|
|
11273
|
+
dirty;
|
|
11274
|
+
textures;
|
|
11275
|
+
blendModes;
|
|
11276
|
+
shaders;
|
|
11277
|
+
sprites;
|
|
11278
|
+
defaultShader;
|
|
11115
11279
|
/**
|
|
11116
11280
|
* Creates a new SpriteBatch instance.
|
|
11117
11281
|
*/
|
|
@@ -11388,6 +11552,9 @@ var WebGLSpriteBatch = class {
|
|
|
11388
11552
|
//#endregion
|
|
11389
11553
|
//#region src/phaser/display/webgl/stencil_manager.ts
|
|
11390
11554
|
var WebGLStencilManager = class {
|
|
11555
|
+
stencilStack;
|
|
11556
|
+
reverse;
|
|
11557
|
+
count;
|
|
11391
11558
|
/**
|
|
11392
11559
|
* Initializes the stencil manager.
|
|
11393
11560
|
*/
|
|
@@ -11548,6 +11715,23 @@ var WebGLStencilManager = class {
|
|
|
11548
11715
|
//#endregion
|
|
11549
11716
|
//#region src/phaser/display/webgl/renderer.ts
|
|
11550
11717
|
var WebGLRenderer = class {
|
|
11718
|
+
type;
|
|
11719
|
+
resolution;
|
|
11720
|
+
autoResize;
|
|
11721
|
+
contextLost;
|
|
11722
|
+
clearBeforeRender;
|
|
11723
|
+
width;
|
|
11724
|
+
height;
|
|
11725
|
+
view;
|
|
11726
|
+
_contextOptions;
|
|
11727
|
+
projection;
|
|
11728
|
+
offset;
|
|
11729
|
+
shaderManager;
|
|
11730
|
+
spriteBatch;
|
|
11731
|
+
filterManager;
|
|
11732
|
+
stencilManager;
|
|
11733
|
+
blendModeManager;
|
|
11734
|
+
renderSession;
|
|
11551
11735
|
/**
|
|
11552
11736
|
* Creates a new WebGLRenderer instance.
|
|
11553
11737
|
* @param {import('../../core/game.js').Game} game - The game instance.
|
|
@@ -11771,127 +11955,66 @@ var WebGLRenderer = class {
|
|
|
11771
11955
|
//#endregion
|
|
11772
11956
|
//#region src/phaser/core/frame_data.ts
|
|
11773
11957
|
var FrameData = class {
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
* This class holds data about frames in a texture atlas or sprite sheet.
|
|
11777
|
-
*/
|
|
11958
|
+
_frames;
|
|
11959
|
+
_frameNames;
|
|
11778
11960
|
constructor() {
|
|
11779
|
-
/**
|
|
11780
|
-
* @type {import('./frame.js').Frame[]}
|
|
11781
|
-
*/
|
|
11782
11961
|
this._frames = [];
|
|
11783
|
-
|
|
11784
|
-
* @type {string[]}
|
|
11785
|
-
*/
|
|
11786
|
-
this._frameNames = [];
|
|
11962
|
+
this._frameNames = {};
|
|
11787
11963
|
}
|
|
11788
|
-
/**
|
|
11789
|
-
* Add a frame to the frame data collection.
|
|
11790
|
-
* @param {import('./frame.js').Frame} frame - The frame to add.
|
|
11791
|
-
* @returns {import('./frame.js').Frame} The added frame.
|
|
11792
|
-
*/
|
|
11793
11964
|
addFrame(frame) {
|
|
11794
11965
|
frame.index = this._frames.length;
|
|
11795
11966
|
this._frames.push(frame);
|
|
11796
11967
|
if (frame.name !== "") this._frameNames[frame.name] = frame.index;
|
|
11797
11968
|
return frame;
|
|
11798
11969
|
}
|
|
11799
|
-
/**
|
|
11800
|
-
* Get a frame by its index.
|
|
11801
|
-
* @param {number} index - The index of the frame to get.
|
|
11802
|
-
* @returns {import('./frame.js').Frame} The frame at the specified index, or the first frame if index is out of bounds.
|
|
11803
|
-
*/
|
|
11804
11970
|
getFrame(index = 0) {
|
|
11805
11971
|
if (index >= this._frames.length) index = 0;
|
|
11806
11972
|
return this._frames[index];
|
|
11807
11973
|
}
|
|
11808
|
-
/**
|
|
11809
|
-
* Get a frame by its name.
|
|
11810
|
-
* @param {string} name - The name of the frame to get.
|
|
11811
|
-
* @returns {import('./frame.js').Frame} The frame with the specified name, or null if not found.
|
|
11812
|
-
*/
|
|
11813
11974
|
getFrameByName(name) {
|
|
11814
11975
|
if (typeof this._frameNames[name] === "number") return this._frames[this._frameNames[name]];
|
|
11815
11976
|
return null;
|
|
11816
11977
|
}
|
|
11817
|
-
/**
|
|
11818
|
-
* Check if a frame with the given name exists.
|
|
11819
|
-
* @param {string} name - The name of the frame to check.
|
|
11820
|
-
* @returns {boolean} True if a frame with this name exists, false otherwise.
|
|
11821
|
-
*/
|
|
11822
11978
|
checkFrameName(name) {
|
|
11823
11979
|
if (this._frameNames[name] == null) return false;
|
|
11824
11980
|
return true;
|
|
11825
11981
|
}
|
|
11826
|
-
/**
|
|
11827
|
-
* Create a clone of this FrameData instance.
|
|
11828
|
-
* @returns {FrameData} A new FrameData instance with cloned frames.
|
|
11829
|
-
*/
|
|
11830
11982
|
clone() {
|
|
11831
11983
|
return cloneFrameData(this);
|
|
11832
11984
|
}
|
|
11833
|
-
/**
|
|
11834
|
-
* Get a range of frames by index.
|
|
11835
|
-
* @param {number} start - The starting index of the frame range.
|
|
11836
|
-
* @param {number} end - The ending index of the frame range.
|
|
11837
|
-
* @param {import('./frame.js').Frame[]} output - Optional array to populate with frames.
|
|
11838
|
-
* @returns {import('./frame.js').Frame[]} An array of frames in the specified range.
|
|
11839
|
-
*/
|
|
11840
11985
|
getFrameRange(start, end, output = null) {
|
|
11841
11986
|
const result = output || [];
|
|
11842
11987
|
for (let i = start; i <= end; i += 1) result.push(this._frames[i]);
|
|
11843
11988
|
return result;
|
|
11844
11989
|
}
|
|
11845
|
-
/**
|
|
11846
|
-
* Get frame indexes from an array of frame names or indices.
|
|
11847
|
-
* @param {number[]|string[]} frames - An array of frame names or indices.
|
|
11848
|
-
* @param {boolean} useNumericIndex - Whether to treat numeric values as frame indices.
|
|
11849
|
-
* @param {number[]} output - Optional array to populate with frame indexes.
|
|
11850
|
-
* @returns {number[]} An array of frame indexes.
|
|
11851
|
-
*/
|
|
11852
11990
|
getFrameIndexes(frames, useNumericIndex = true, output = null) {
|
|
11853
11991
|
const result = output || [];
|
|
11854
|
-
if (frames && frames.length > 0) {
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
|
|
11992
|
+
if (frames && frames.length > 0) for (let i = 0; i < frames.length; i += 1) {
|
|
11993
|
+
const f = frames[i];
|
|
11994
|
+
if (useNumericIndex && this._frames[f]) result.push(this._frames[f].index);
|
|
11995
|
+
else {
|
|
11996
|
+
const found = this.getFrameByName(f);
|
|
11997
|
+
if (found) result.push(found.index);
|
|
11998
|
+
}
|
|
11999
|
+
}
|
|
12000
|
+
else for (let i = 0; i < this._frames.length; i += 1) result.push(this._frames[i].index);
|
|
11858
12001
|
return result;
|
|
11859
12002
|
}
|
|
11860
|
-
/**
|
|
11861
|
-
* Destroy this FrameData instance and clean up resources.
|
|
11862
|
-
* This method clears internal arrays and releases references to frames.
|
|
11863
|
-
*/
|
|
11864
12003
|
destroy() {
|
|
11865
12004
|
this._frames = null;
|
|
11866
12005
|
this._frameNames = null;
|
|
11867
12006
|
}
|
|
11868
|
-
/**
|
|
11869
|
-
* Get the total number of frames in this FrameData instance.
|
|
11870
|
-
* @returns {number} The total number of frames.
|
|
11871
|
-
*/
|
|
11872
12007
|
get total() {
|
|
11873
12008
|
return this._frames.length;
|
|
11874
12009
|
}
|
|
11875
12010
|
};
|
|
11876
12011
|
//#endregion
|
|
11877
12012
|
//#region src/phaser/core/frame_util.ts
|
|
11878
|
-
/**
|
|
11879
|
-
* Clone a Frame object.
|
|
11880
|
-
* @param {Frame} frame - The frame to clone.
|
|
11881
|
-
* @param {Frame} output - Optional output frame to populate.
|
|
11882
|
-
* @returns {Frame} The cloned frame or the provided output frame.
|
|
11883
|
-
*/
|
|
11884
12013
|
const cloneFrame = (frame, output = null) => {
|
|
11885
12014
|
const result = output || new Frame(frame.index, frame.x, frame.y, frame.width, frame.height);
|
|
11886
12015
|
result.initialize(frame.index, frame.x, frame.y, frame.width, frame.height);
|
|
11887
12016
|
return result;
|
|
11888
12017
|
};
|
|
11889
|
-
/**
|
|
11890
|
-
* Clone a FrameData object.
|
|
11891
|
-
* @param {FrameData} frameData - The frame data to clone.
|
|
11892
|
-
* @param {FrameData} output - Optional output frame data to populate.
|
|
11893
|
-
* @returns {FrameData} The cloned frame data or the provided output frame data.
|
|
11894
|
-
*/
|
|
11895
12018
|
const cloneFrameData = (frameData, output = null) => {
|
|
11896
12019
|
const result = output || new FrameData();
|
|
11897
12020
|
for (let i = 0; i < frameData.total; i += 1) result.addFrame(frameData.getFrame(i).clone());
|
|
@@ -11900,27 +12023,29 @@ const cloneFrameData = (frameData, output = null) => {
|
|
|
11900
12023
|
//#endregion
|
|
11901
12024
|
//#region src/phaser/core/frame.ts
|
|
11902
12025
|
var Frame = class {
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
12026
|
+
index;
|
|
12027
|
+
x;
|
|
12028
|
+
y;
|
|
12029
|
+
width;
|
|
12030
|
+
height;
|
|
12031
|
+
name;
|
|
12032
|
+
centerX;
|
|
12033
|
+
centerY;
|
|
12034
|
+
distance;
|
|
12035
|
+
rotated;
|
|
12036
|
+
rotationDirection;
|
|
12037
|
+
trimmed;
|
|
12038
|
+
sourceSizeW;
|
|
12039
|
+
sourceSizeH;
|
|
12040
|
+
spriteSourceSizeX;
|
|
12041
|
+
spriteSourceSizeY;
|
|
12042
|
+
spriteSourceSizeW;
|
|
12043
|
+
spriteSourceSizeH;
|
|
12044
|
+
right;
|
|
12045
|
+
bottom;
|
|
11912
12046
|
constructor(index, x, y, width, height, name) {
|
|
11913
12047
|
this.initialize(index, x, y, width, height, name);
|
|
11914
12048
|
}
|
|
11915
|
-
/**
|
|
11916
|
-
* Initializes this frame with the specified properties.
|
|
11917
|
-
* @param {number} index - The index of this frame in the animation.
|
|
11918
|
-
* @param {number} x - The x coordinate of this frame's position in the texture.
|
|
11919
|
-
* @param {number} y - The y coordinate of this frame's position in the texture.
|
|
11920
|
-
* @param {number} width - The width of this frame in pixels.
|
|
11921
|
-
* @param {number} height - The height of this frame in pixels.
|
|
11922
|
-
* @param {string} name - The name of this frame.
|
|
11923
|
-
*/
|
|
11924
12049
|
initialize(index, x, y, width, height, name) {
|
|
11925
12050
|
this.index = index;
|
|
11926
12051
|
this.x = x;
|
|
@@ -11943,11 +12068,6 @@ var Frame = class {
|
|
|
11943
12068
|
this.right = this.x + this.width;
|
|
11944
12069
|
this.bottom = this.y + this.height;
|
|
11945
12070
|
}
|
|
11946
|
-
/**
|
|
11947
|
-
* Resizes this frame to the specified dimensions.
|
|
11948
|
-
* @param {number} width - The new width of this frame in pixels.
|
|
11949
|
-
* @param {number} height - The new height of this frame in pixels.
|
|
11950
|
-
*/
|
|
11951
12071
|
resize(width, height) {
|
|
11952
12072
|
this.width = width;
|
|
11953
12073
|
this.height = height;
|
|
@@ -11959,16 +12079,6 @@ var Frame = class {
|
|
|
11959
12079
|
this.right = this.x + width;
|
|
11960
12080
|
this.bottom = this.y + height;
|
|
11961
12081
|
}
|
|
11962
|
-
/**
|
|
11963
|
-
* Sets the trim properties for this frame.
|
|
11964
|
-
* @param {boolean} trimmed - Whether this frame is trimmed.
|
|
11965
|
-
* @param {number} actualWidth - The actual width of the trimmed frame.
|
|
11966
|
-
* @param {number} actualHeight - The actual height of the trimmed frame.
|
|
11967
|
-
* @param {number} destX - The destination x coordinate for the trimmed frame.
|
|
11968
|
-
* @param {number} destY - The destination y coordinate for the trimmed frame.
|
|
11969
|
-
* @param {number} destWidth - The destination width of the trimmed frame.
|
|
11970
|
-
* @param {number} destHeight - The destination height of the trimmed frame.
|
|
11971
|
-
*/
|
|
11972
12082
|
setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight) {
|
|
11973
12083
|
this.trimmed = trimmed;
|
|
11974
12084
|
if (trimmed) {
|
|
@@ -11982,18 +12092,9 @@ var Frame = class {
|
|
|
11982
12092
|
this.spriteSourceSizeH = destHeight;
|
|
11983
12093
|
}
|
|
11984
12094
|
}
|
|
11985
|
-
/**
|
|
11986
|
-
* Creates a clone of this frame.
|
|
11987
|
-
* @returns {Frame} A new Frame instance with the same properties.
|
|
11988
|
-
*/
|
|
11989
12095
|
clone() {
|
|
11990
12096
|
return cloneFrame(this);
|
|
11991
12097
|
}
|
|
11992
|
-
/**
|
|
11993
|
-
* Gets the rectangle bounds of this frame.
|
|
11994
|
-
* @param {Rectangle} output - The rectangle to use for the result (optional).
|
|
11995
|
-
* @returns {Rectangle} A Rectangle object representing this frame's bounds.
|
|
11996
|
-
*/
|
|
11997
12098
|
getRect(output = null) {
|
|
11998
12099
|
const result = output || new Rectangle();
|
|
11999
12100
|
result.setTo(this.x, this.y, this.width, this.height);
|
|
@@ -12008,7 +12109,7 @@ var Frame = class {
|
|
|
12008
12109
|
* @param {object} json - TBD.
|
|
12009
12110
|
* @returns {FrameData} TBD.
|
|
12010
12111
|
*/
|
|
12011
|
-
const JSONDataHash = (game, json) => {
|
|
12112
|
+
const JSONDataHash = (game, json, _key) => {
|
|
12012
12113
|
if (!json.frames) {
|
|
12013
12114
|
game.logger.warn("JSONDataHash: Invalid Texture Atlas JSON given, missing frames object", json);
|
|
12014
12115
|
return null;
|
|
@@ -12114,6 +12215,14 @@ const jsonBitmapFont = (json, baseTexture, xSpacing, ySpacing) => {
|
|
|
12114
12215
|
return finalizeBitmapFont(baseTexture, data);
|
|
12115
12216
|
};
|
|
12116
12217
|
var Cache = class {
|
|
12218
|
+
game;
|
|
12219
|
+
autoResolveURL;
|
|
12220
|
+
_cache;
|
|
12221
|
+
_urlMap;
|
|
12222
|
+
_urlResolver;
|
|
12223
|
+
_urlTemp;
|
|
12224
|
+
onSoundUnlock;
|
|
12225
|
+
_cacheMap;
|
|
12117
12226
|
/**
|
|
12118
12227
|
* Creates a new Cache instance.
|
|
12119
12228
|
* @param {import('./game.js').Game} game - The game instance.
|
|
@@ -12730,7 +12839,7 @@ var Cache = class {
|
|
|
12730
12839
|
* @param {object} data - The data to associate with the resolved URL.
|
|
12731
12840
|
* @returns {string} The resolved URL or null if not enabled.
|
|
12732
12841
|
*/
|
|
12733
|
-
_resolveURL(url, data) {
|
|
12842
|
+
_resolveURL(url, data = null) {
|
|
12734
12843
|
if (!this.autoResolveURL) return null;
|
|
12735
12844
|
this._urlResolver.src = this.game.load.baseURL + url;
|
|
12736
12845
|
this._urlTemp = this._urlResolver.src;
|
|
@@ -12761,6 +12870,29 @@ var Cache = class {
|
|
|
12761
12870
|
//#endregion
|
|
12762
12871
|
//#region src/phaser/core/device.ts
|
|
12763
12872
|
var Device = class {
|
|
12873
|
+
desktop;
|
|
12874
|
+
iOS;
|
|
12875
|
+
android;
|
|
12876
|
+
chromeOS;
|
|
12877
|
+
linux;
|
|
12878
|
+
macOS;
|
|
12879
|
+
windows;
|
|
12880
|
+
windowsPhone;
|
|
12881
|
+
canvas;
|
|
12882
|
+
touch;
|
|
12883
|
+
mspointer;
|
|
12884
|
+
wheelEvent;
|
|
12885
|
+
chrome;
|
|
12886
|
+
firefox;
|
|
12887
|
+
edge;
|
|
12888
|
+
safari;
|
|
12889
|
+
fullscreen;
|
|
12890
|
+
requestFullscreen;
|
|
12891
|
+
cancelFullscreen;
|
|
12892
|
+
fullscreenKeyboard;
|
|
12893
|
+
noAudioFormat;
|
|
12894
|
+
supportedAudioFormats;
|
|
12895
|
+
supportedImageFormats;
|
|
12764
12896
|
/**
|
|
12765
12897
|
* Creates a new Device instance.
|
|
12766
12898
|
* This class provides information about the current device and browser capabilities.
|
|
@@ -13191,6 +13323,31 @@ var ArraySet = class {
|
|
|
13191
13323
|
//#endregion
|
|
13192
13324
|
//#region src/phaser/core/input_mouse.ts
|
|
13193
13325
|
var Mouse = class {
|
|
13326
|
+
game;
|
|
13327
|
+
input;
|
|
13328
|
+
callbackContext;
|
|
13329
|
+
mouseDownCallback;
|
|
13330
|
+
mouseUpCallback;
|
|
13331
|
+
mouseOutCallback;
|
|
13332
|
+
mouseOverCallback;
|
|
13333
|
+
mouseWheelCallback;
|
|
13334
|
+
mouseMoveCallback;
|
|
13335
|
+
capture;
|
|
13336
|
+
button;
|
|
13337
|
+
wheelDelta;
|
|
13338
|
+
enabled;
|
|
13339
|
+
locked;
|
|
13340
|
+
stopOnGameOut;
|
|
13341
|
+
event;
|
|
13342
|
+
_onMouseDown;
|
|
13343
|
+
_onMouseMove;
|
|
13344
|
+
_onMouseUp;
|
|
13345
|
+
_onMouseOut;
|
|
13346
|
+
_onMouseOver;
|
|
13347
|
+
_onMouseWheel;
|
|
13348
|
+
_onMouseUpGlobal;
|
|
13349
|
+
_onMouseOutGlobal;
|
|
13350
|
+
_wheelEvent;
|
|
13194
13351
|
/**
|
|
13195
13352
|
* TBD.
|
|
13196
13353
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -13368,6 +13525,22 @@ var Mouse = class {
|
|
|
13368
13525
|
//#endregion
|
|
13369
13526
|
//#region src/phaser/core/input_mspointer.ts
|
|
13370
13527
|
var MSPointer = class {
|
|
13528
|
+
game;
|
|
13529
|
+
input;
|
|
13530
|
+
callbackContext;
|
|
13531
|
+
pointerDownCallback;
|
|
13532
|
+
pointerMoveCallback;
|
|
13533
|
+
pointerUpCallback;
|
|
13534
|
+
capture;
|
|
13535
|
+
button;
|
|
13536
|
+
event;
|
|
13537
|
+
enabled;
|
|
13538
|
+
_onMSPointerDown;
|
|
13539
|
+
_onMSPointerMove;
|
|
13540
|
+
_onMSPointerUp;
|
|
13541
|
+
_onMSPointerUpGlobal;
|
|
13542
|
+
_onMSPointerOut;
|
|
13543
|
+
_onMSPointerOver;
|
|
13371
13544
|
/**
|
|
13372
13545
|
* TBD.
|
|
13373
13546
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -13535,6 +13708,50 @@ var MSPointer = class {
|
|
|
13535
13708
|
//#endregion
|
|
13536
13709
|
//#region src/phaser/core/input_pointer.ts
|
|
13537
13710
|
var Pointer = class {
|
|
13711
|
+
game;
|
|
13712
|
+
id;
|
|
13713
|
+
type;
|
|
13714
|
+
exists;
|
|
13715
|
+
identifier;
|
|
13716
|
+
pointerId;
|
|
13717
|
+
pointerMode;
|
|
13718
|
+
target;
|
|
13719
|
+
button;
|
|
13720
|
+
_holdSent;
|
|
13721
|
+
_history;
|
|
13722
|
+
_nextDrop;
|
|
13723
|
+
_stateReset;
|
|
13724
|
+
withinGame;
|
|
13725
|
+
clientX;
|
|
13726
|
+
clientY;
|
|
13727
|
+
pageX;
|
|
13728
|
+
pageY;
|
|
13729
|
+
screenX;
|
|
13730
|
+
screenY;
|
|
13731
|
+
rawMovementX;
|
|
13732
|
+
rawMovementY;
|
|
13733
|
+
movementX;
|
|
13734
|
+
movementY;
|
|
13735
|
+
x;
|
|
13736
|
+
y;
|
|
13737
|
+
isMouse;
|
|
13738
|
+
isDown;
|
|
13739
|
+
isUp;
|
|
13740
|
+
timeDown;
|
|
13741
|
+
timeUp;
|
|
13742
|
+
previousTapTime;
|
|
13743
|
+
totalTouches;
|
|
13744
|
+
msSinceLastClick;
|
|
13745
|
+
targetObject;
|
|
13746
|
+
interactiveCandidates;
|
|
13747
|
+
active;
|
|
13748
|
+
dirty;
|
|
13749
|
+
position;
|
|
13750
|
+
positionDown;
|
|
13751
|
+
positionUp;
|
|
13752
|
+
circle;
|
|
13753
|
+
_clickTrampolines;
|
|
13754
|
+
_trampolineTargetObject;
|
|
13538
13755
|
/**
|
|
13539
13756
|
* TBD.
|
|
13540
13757
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -13943,6 +14160,24 @@ var Pointer = class {
|
|
|
13943
14160
|
//#endregion
|
|
13944
14161
|
//#region src/phaser/core/input_touch.ts
|
|
13945
14162
|
var Touch = class {
|
|
14163
|
+
game;
|
|
14164
|
+
enabled;
|
|
14165
|
+
callbackContext;
|
|
14166
|
+
touchStartCallback;
|
|
14167
|
+
touchMoveCallback;
|
|
14168
|
+
touchEndCallback;
|
|
14169
|
+
touchEnterCallback;
|
|
14170
|
+
touchLeaveCallback;
|
|
14171
|
+
touchCancelCallback;
|
|
14172
|
+
preventDefault;
|
|
14173
|
+
event;
|
|
14174
|
+
_onTouchStart;
|
|
14175
|
+
_onTouchMove;
|
|
14176
|
+
_onTouchEnd;
|
|
14177
|
+
_onTouchEnter;
|
|
14178
|
+
_onTouchLeave;
|
|
14179
|
+
_onTouchCancel;
|
|
14180
|
+
_documentTouchMove;
|
|
13946
14181
|
/**
|
|
13947
14182
|
* TBD.
|
|
13948
14183
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -14082,6 +14317,58 @@ var Touch = class {
|
|
|
14082
14317
|
//#region src/phaser/core/input.ts
|
|
14083
14318
|
const MAX_POINTERS = 10;
|
|
14084
14319
|
var Input = class {
|
|
14320
|
+
game;
|
|
14321
|
+
hitCanvas;
|
|
14322
|
+
hitContext;
|
|
14323
|
+
moveCallbacks;
|
|
14324
|
+
lockCallbacks;
|
|
14325
|
+
customCandidateHandler;
|
|
14326
|
+
customCandidateHandlerContext;
|
|
14327
|
+
pollRate;
|
|
14328
|
+
enabled;
|
|
14329
|
+
multiInputOverride;
|
|
14330
|
+
position;
|
|
14331
|
+
speed;
|
|
14332
|
+
circle;
|
|
14333
|
+
scale;
|
|
14334
|
+
maxPointers;
|
|
14335
|
+
tapRate;
|
|
14336
|
+
doubleTapRate;
|
|
14337
|
+
holdRate;
|
|
14338
|
+
justPressedRate;
|
|
14339
|
+
justReleasedRate;
|
|
14340
|
+
recordPointerHistory;
|
|
14341
|
+
recordRate;
|
|
14342
|
+
recordLimit;
|
|
14343
|
+
pointer1;
|
|
14344
|
+
pointer2;
|
|
14345
|
+
pointer3;
|
|
14346
|
+
pointer4;
|
|
14347
|
+
pointer5;
|
|
14348
|
+
pointer6;
|
|
14349
|
+
pointer7;
|
|
14350
|
+
pointer8;
|
|
14351
|
+
pointer9;
|
|
14352
|
+
pointer10;
|
|
14353
|
+
pointers;
|
|
14354
|
+
activePointer;
|
|
14355
|
+
mousePointer;
|
|
14356
|
+
mouse;
|
|
14357
|
+
touch;
|
|
14358
|
+
mspointer;
|
|
14359
|
+
resetLocked;
|
|
14360
|
+
onDown;
|
|
14361
|
+
onUp;
|
|
14362
|
+
onTap;
|
|
14363
|
+
onHold;
|
|
14364
|
+
minPriorityID;
|
|
14365
|
+
interactiveItems;
|
|
14366
|
+
_localPoint;
|
|
14367
|
+
_pollCounter;
|
|
14368
|
+
_oldPosition;
|
|
14369
|
+
_onClickTrampoline;
|
|
14370
|
+
_x;
|
|
14371
|
+
_y;
|
|
14085
14372
|
/**
|
|
14086
14373
|
* TBD.
|
|
14087
14374
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -14477,6 +14764,34 @@ var Input = class {
|
|
|
14477
14764
|
//#region src/phaser/core/loader.ts
|
|
14478
14765
|
const TEXTURE_ATLAS_JSON_HASH = 1;
|
|
14479
14766
|
var Loader = class {
|
|
14767
|
+
game;
|
|
14768
|
+
cache;
|
|
14769
|
+
isLoading;
|
|
14770
|
+
isUseLog;
|
|
14771
|
+
isUseRetry;
|
|
14772
|
+
maxRetry;
|
|
14773
|
+
hasLoaded;
|
|
14774
|
+
preloadSprite;
|
|
14775
|
+
crossOrigin;
|
|
14776
|
+
baseURL;
|
|
14777
|
+
path;
|
|
14778
|
+
headers;
|
|
14779
|
+
onLoadStart;
|
|
14780
|
+
onLoadComplete;
|
|
14781
|
+
onPackComplete;
|
|
14782
|
+
onFileStart;
|
|
14783
|
+
onFileComplete;
|
|
14784
|
+
onFileError;
|
|
14785
|
+
maxParallelDownloads;
|
|
14786
|
+
_withSyncPointDepth;
|
|
14787
|
+
_fileList;
|
|
14788
|
+
_flightQueue;
|
|
14789
|
+
_processingHead;
|
|
14790
|
+
_fileLoadStarted;
|
|
14791
|
+
_totalPackCount;
|
|
14792
|
+
_totalFileCount;
|
|
14793
|
+
_loadedPackCount;
|
|
14794
|
+
_loadedFileCount;
|
|
14480
14795
|
/**
|
|
14481
14796
|
* Creates a new Loader instance.
|
|
14482
14797
|
* @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
|
|
@@ -14903,7 +15218,7 @@ var Loader = class {
|
|
|
14903
15218
|
removeFile(type, key) {
|
|
14904
15219
|
const asset = this.getAsset(type, key);
|
|
14905
15220
|
if (asset) {
|
|
14906
|
-
if (!asset.loaded && !asset.loading) this._fileList.splice(asset.index, 1);
|
|
15221
|
+
if (!asset.file.loaded && !asset.file.loading) this._fileList.splice(asset.index, 1);
|
|
14907
15222
|
}
|
|
14908
15223
|
}
|
|
14909
15224
|
/**
|
|
@@ -15172,7 +15487,7 @@ var Loader = class {
|
|
|
15172
15487
|
return onload.call(scope, file, xhr);
|
|
15173
15488
|
} catch (error) {
|
|
15174
15489
|
const typedError = error instanceof Error ? error : new Error(String(error));
|
|
15175
|
-
if (!scope.hasLoaded) scope.asyncComplete(file,
|
|
15490
|
+
if (!scope.hasLoaded) scope.asyncComplete(file, typedError.message || "Exception");
|
|
15176
15491
|
else scope.game.logger.exception("Loader", typedError);
|
|
15177
15492
|
}
|
|
15178
15493
|
return null;
|
|
@@ -15186,7 +15501,7 @@ var Loader = class {
|
|
|
15186
15501
|
return onerror.call(scope, file, xhr);
|
|
15187
15502
|
} catch (error) {
|
|
15188
15503
|
const typedError = error instanceof Error ? error : new Error(String(error));
|
|
15189
|
-
if (!scope.hasLoaded) scope.asyncComplete(file,
|
|
15504
|
+
if (!scope.hasLoaded) scope.asyncComplete(file, typedError.message || "Exception");
|
|
15190
15505
|
else scope.game.logger.exception("Loader", typedError);
|
|
15191
15506
|
}
|
|
15192
15507
|
return null;
|
|
@@ -15730,6 +16045,65 @@ var DOM = class {
|
|
|
15730
16045
|
//#endregion
|
|
15731
16046
|
//#region src/phaser/core/scale_manager.ts
|
|
15732
16047
|
var ScaleManager = class {
|
|
16048
|
+
game;
|
|
16049
|
+
dom;
|
|
16050
|
+
width;
|
|
16051
|
+
height;
|
|
16052
|
+
minWidth;
|
|
16053
|
+
maxWidth;
|
|
16054
|
+
minHeight;
|
|
16055
|
+
maxHeight;
|
|
16056
|
+
offset;
|
|
16057
|
+
forceLandscape;
|
|
16058
|
+
forcePortrait;
|
|
16059
|
+
incorrectOrientation;
|
|
16060
|
+
_pageAlignHorizontally;
|
|
16061
|
+
_pageAlignVertically;
|
|
16062
|
+
onOrientationChange;
|
|
16063
|
+
enterIncorrectOrientation;
|
|
16064
|
+
leaveIncorrectOrientation;
|
|
16065
|
+
hasPhaserSetFullScreen;
|
|
16066
|
+
fullScreenTarget;
|
|
16067
|
+
_createdFullScreenTarget;
|
|
16068
|
+
onFullScreenInit;
|
|
16069
|
+
onFullScreenChange;
|
|
16070
|
+
onFullScreenError;
|
|
16071
|
+
screenOrientation;
|
|
16072
|
+
scaleFactor;
|
|
16073
|
+
scaleFactorInversed;
|
|
16074
|
+
margin;
|
|
16075
|
+
bounds;
|
|
16076
|
+
aspectRatio;
|
|
16077
|
+
sourceAspectRatio;
|
|
16078
|
+
event;
|
|
16079
|
+
windowConstraints;
|
|
16080
|
+
compatibility;
|
|
16081
|
+
_scaleMode;
|
|
16082
|
+
_fullScreenScaleMode;
|
|
16083
|
+
parentIsWindow;
|
|
16084
|
+
parentNode;
|
|
16085
|
+
parentScaleFactor;
|
|
16086
|
+
trackParentInterval;
|
|
16087
|
+
onSizeChange;
|
|
16088
|
+
onResize;
|
|
16089
|
+
onResizeContext;
|
|
16090
|
+
_pendingScaleMode;
|
|
16091
|
+
_fullScreenRestore;
|
|
16092
|
+
_gameSize;
|
|
16093
|
+
_userScaleFactor;
|
|
16094
|
+
_userScaleTrim;
|
|
16095
|
+
_lastUpdate;
|
|
16096
|
+
_updateThrottle;
|
|
16097
|
+
_updateThrottleReset;
|
|
16098
|
+
_parentBounds;
|
|
16099
|
+
_tempBounds;
|
|
16100
|
+
_lastReportedCanvasSize;
|
|
16101
|
+
_lastReportedGameSize;
|
|
16102
|
+
_booted;
|
|
16103
|
+
_orientationChange;
|
|
16104
|
+
_windowResize;
|
|
16105
|
+
_fullScreenChange;
|
|
16106
|
+
_fullScreenError;
|
|
15733
16107
|
/**
|
|
15734
16108
|
* TBD.
|
|
15735
16109
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -16301,7 +16675,7 @@ var ScaleManager = class {
|
|
|
16301
16675
|
if (!this.compatibility.supportsFullScreen) {
|
|
16302
16676
|
const scope = this;
|
|
16303
16677
|
setTimeout(() => {
|
|
16304
|
-
scope.fullScreenError();
|
|
16678
|
+
scope.fullScreenError({});
|
|
16305
16679
|
}, 10);
|
|
16306
16680
|
return false;
|
|
16307
16681
|
}
|
|
@@ -16530,6 +16904,8 @@ var ScaleManager = class {
|
|
|
16530
16904
|
//#endregion
|
|
16531
16905
|
//#region src/phaser/core/scene.ts
|
|
16532
16906
|
var Scene = class {
|
|
16907
|
+
game;
|
|
16908
|
+
key;
|
|
16533
16909
|
/**
|
|
16534
16910
|
* Creates a new Scene instance.
|
|
16535
16911
|
*/
|
|
@@ -16577,6 +16953,22 @@ var Scene = class {
|
|
|
16577
16953
|
//#endregion
|
|
16578
16954
|
//#region src/phaser/core/scene_manager.ts
|
|
16579
16955
|
var SceneManager = class {
|
|
16956
|
+
game;
|
|
16957
|
+
states;
|
|
16958
|
+
_pendingState;
|
|
16959
|
+
_clearWorld;
|
|
16960
|
+
_clearCache;
|
|
16961
|
+
_created;
|
|
16962
|
+
_args;
|
|
16963
|
+
current;
|
|
16964
|
+
onInitCallback;
|
|
16965
|
+
onPreloadCallback;
|
|
16966
|
+
onCreateCallback;
|
|
16967
|
+
onUpdateCallback;
|
|
16968
|
+
onResizeCallback;
|
|
16969
|
+
onPauseUpdateCallback;
|
|
16970
|
+
onShutDownCallback;
|
|
16971
|
+
callbackContext;
|
|
16580
16972
|
/**
|
|
16581
16973
|
* Creates a new SceneManager instance.
|
|
16582
16974
|
* @param {import('./game.js').Game} game - The game instance this manager belongs to.
|
|
@@ -16829,6 +17221,53 @@ var SceneManager = class {
|
|
|
16829
17221
|
//#endregion
|
|
16830
17222
|
//#region src/phaser/core/sound.ts
|
|
16831
17223
|
var Sound = class {
|
|
17224
|
+
_paused;
|
|
17225
|
+
game;
|
|
17226
|
+
name;
|
|
17227
|
+
key;
|
|
17228
|
+
loop;
|
|
17229
|
+
markers;
|
|
17230
|
+
context;
|
|
17231
|
+
autoplay;
|
|
17232
|
+
totalDuration;
|
|
17233
|
+
startTime;
|
|
17234
|
+
currentTime;
|
|
17235
|
+
duration;
|
|
17236
|
+
durationMS;
|
|
17237
|
+
position;
|
|
17238
|
+
stopTime;
|
|
17239
|
+
paused;
|
|
17240
|
+
pausedPosition;
|
|
17241
|
+
pausedTime;
|
|
17242
|
+
isPlaying;
|
|
17243
|
+
currentMarker;
|
|
17244
|
+
fadeTween;
|
|
17245
|
+
pendingPlayback;
|
|
17246
|
+
override;
|
|
17247
|
+
allowMultiple;
|
|
17248
|
+
externalNode;
|
|
17249
|
+
masterGainNode;
|
|
17250
|
+
gainNode;
|
|
17251
|
+
_sound;
|
|
17252
|
+
_markedToDelete;
|
|
17253
|
+
_removeFromSoundManager;
|
|
17254
|
+
onPlay;
|
|
17255
|
+
onPause;
|
|
17256
|
+
onResume;
|
|
17257
|
+
onLoop;
|
|
17258
|
+
onStop;
|
|
17259
|
+
onMute;
|
|
17260
|
+
onMarkerComplete;
|
|
17261
|
+
onFadeComplete;
|
|
17262
|
+
_volume;
|
|
17263
|
+
_buffer;
|
|
17264
|
+
_muted;
|
|
17265
|
+
_tempMarker;
|
|
17266
|
+
_tempPosition;
|
|
17267
|
+
_tempVolume;
|
|
17268
|
+
_tempPause;
|
|
17269
|
+
_muteVolume;
|
|
17270
|
+
_tempLoop;
|
|
16832
17271
|
/**
|
|
16833
17272
|
* Creates a new Sound instance.
|
|
16834
17273
|
* @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
|
|
@@ -17007,7 +17446,7 @@ var Sound = class {
|
|
|
17007
17446
|
* @param {boolean} forceRestart - Whether to force restarting the sound even if it's already playing.
|
|
17008
17447
|
* @returns {Sound} This Sound instance for chaining.
|
|
17009
17448
|
*/
|
|
17010
|
-
play(marker, position, volume, loop, forceRestart = true) {
|
|
17449
|
+
play(marker = "", position = 0, volume = 1, loop = false, forceRestart = true) {
|
|
17011
17450
|
if (marker === void 0 || marker === false || marker === null) marker = "";
|
|
17012
17451
|
if (forceRestart === void 0) forceRestart = true;
|
|
17013
17452
|
if (this.isPlaying && !this.allowMultiple && !forceRestart && !this.override) return this;
|
|
@@ -17026,8 +17465,8 @@ var Sound = class {
|
|
|
17026
17465
|
this.loop = this.markers[marker].loop;
|
|
17027
17466
|
this.duration = this.markers[marker].duration;
|
|
17028
17467
|
this.durationMS = this.markers[marker].durationMS;
|
|
17029
|
-
if (
|
|
17030
|
-
if (
|
|
17468
|
+
if (volume !== void 0) this.volume = volume;
|
|
17469
|
+
if (loop !== void 0) this.loop = loop;
|
|
17031
17470
|
this._tempMarker = marker;
|
|
17032
17471
|
this._tempPosition = this.position;
|
|
17033
17472
|
this._tempVolume = this.volume;
|
|
@@ -17039,7 +17478,7 @@ var Sound = class {
|
|
|
17039
17478
|
else {
|
|
17040
17479
|
position = position || 0;
|
|
17041
17480
|
if (volume === void 0) volume = this._volume;
|
|
17042
|
-
if (loop === void 0) loop = this
|
|
17481
|
+
if (loop === void 0) ({loop} = this);
|
|
17043
17482
|
this.position = Math.max(0, position);
|
|
17044
17483
|
this.volume = volume;
|
|
17045
17484
|
this.loop = loop;
|
|
@@ -17246,6 +17685,12 @@ var Sound = class {
|
|
|
17246
17685
|
//#endregion
|
|
17247
17686
|
//#region src/phaser/core/sound_sprite.ts
|
|
17248
17687
|
var SoundSprite = class {
|
|
17688
|
+
game;
|
|
17689
|
+
key;
|
|
17690
|
+
config;
|
|
17691
|
+
autoplayKey;
|
|
17692
|
+
autoplay;
|
|
17693
|
+
sounds;
|
|
17249
17694
|
/**
|
|
17250
17695
|
* TBD.
|
|
17251
17696
|
* @param {import('./game.js').Game} game - TBD.
|
|
@@ -17300,6 +17745,25 @@ var SoundSprite = class {
|
|
|
17300
17745
|
//#endregion
|
|
17301
17746
|
//#region src/phaser/core/sound_manager.ts
|
|
17302
17747
|
var SoundManager = class {
|
|
17748
|
+
game;
|
|
17749
|
+
onChange;
|
|
17750
|
+
context;
|
|
17751
|
+
baseLatency;
|
|
17752
|
+
noAudio;
|
|
17753
|
+
type;
|
|
17754
|
+
connectToMaster;
|
|
17755
|
+
isLocked;
|
|
17756
|
+
_codeMuted;
|
|
17757
|
+
_muted;
|
|
17758
|
+
_unlockSource;
|
|
17759
|
+
_volume;
|
|
17760
|
+
_sounds;
|
|
17761
|
+
_watchList;
|
|
17762
|
+
_watching;
|
|
17763
|
+
_watchCallback;
|
|
17764
|
+
_watchContext;
|
|
17765
|
+
masterGain;
|
|
17766
|
+
_muteVolume;
|
|
17303
17767
|
/**
|
|
17304
17768
|
* Creates a new SoundManager instance.
|
|
17305
17769
|
* @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
|
|
@@ -17694,6 +18158,8 @@ var SoundManager = class {
|
|
|
17694
18158
|
//#endregion
|
|
17695
18159
|
//#region src/phaser/core/stage.ts
|
|
17696
18160
|
var Stage = class extends DisplayObject {
|
|
18161
|
+
currentRenderOrderID;
|
|
18162
|
+
_bgColor;
|
|
17697
18163
|
/**
|
|
17698
18164
|
* Creates a new Stage instance.
|
|
17699
18165
|
* @param {import('./game.js').Game} game - The game instance.
|
|
@@ -17763,6 +18229,7 @@ var Stage = class extends DisplayObject {
|
|
|
17763
18229
|
updateTransform() {
|
|
17764
18230
|
this.worldAlpha = 1;
|
|
17765
18231
|
for (let i = 0; i < this.children.length; i += 1) this.children[i].updateTransform();
|
|
18232
|
+
return this;
|
|
17766
18233
|
}
|
|
17767
18234
|
/**
|
|
17768
18235
|
* Destroys the stage and cleans up resources.
|
|
@@ -17803,17 +18270,15 @@ var Stage = class extends DisplayObject {
|
|
|
17803
18270
|
//#endregion
|
|
17804
18271
|
//#region src/phaser/core/timer_event.ts
|
|
17805
18272
|
var TimerEvent = class {
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
* @param {...any} args - Arguments to pass to the callback function.
|
|
17816
|
-
*/
|
|
18273
|
+
timer;
|
|
18274
|
+
delay;
|
|
18275
|
+
tick;
|
|
18276
|
+
repeatCount;
|
|
18277
|
+
loop;
|
|
18278
|
+
callback;
|
|
18279
|
+
callbackContext;
|
|
18280
|
+
args;
|
|
18281
|
+
pendingDelete;
|
|
17817
18282
|
constructor(timer, delay, tick, repeatCount, loop, callback, callbackContext, args) {
|
|
17818
18283
|
this.timer = timer;
|
|
17819
18284
|
this.delay = delay;
|
|
@@ -17829,6 +18294,26 @@ var TimerEvent = class {
|
|
|
17829
18294
|
//#endregion
|
|
17830
18295
|
//#region src/phaser/core/timer.ts
|
|
17831
18296
|
var Timer = class {
|
|
18297
|
+
game;
|
|
18298
|
+
running;
|
|
18299
|
+
autoDestroy;
|
|
18300
|
+
expired;
|
|
18301
|
+
elapsed;
|
|
18302
|
+
events;
|
|
18303
|
+
onComplete;
|
|
18304
|
+
nextTick;
|
|
18305
|
+
timeCap;
|
|
18306
|
+
paused;
|
|
18307
|
+
_codePaused;
|
|
18308
|
+
_started;
|
|
18309
|
+
_pauseStarted;
|
|
18310
|
+
_pauseTotal;
|
|
18311
|
+
_now;
|
|
18312
|
+
_len;
|
|
18313
|
+
_marked;
|
|
18314
|
+
_i;
|
|
18315
|
+
_diff;
|
|
18316
|
+
_newTick;
|
|
17832
18317
|
/**
|
|
17833
18318
|
* Creates a new Timer instance.
|
|
17834
18319
|
* @param {import('./game.js').Game} game - The game instance.
|
|
@@ -17885,7 +18370,7 @@ var Timer = class {
|
|
|
17885
18370
|
* @param {...any} args - Arguments to pass to the callback function.
|
|
17886
18371
|
* @returns {TimerEvent} The created TimerEvent.
|
|
17887
18372
|
*/
|
|
17888
|
-
create(delay, loop, repeatCount, callback, callbackContext = null, args) {
|
|
18373
|
+
create(delay, loop, repeatCount, callback, callbackContext = null, args = []) {
|
|
17889
18374
|
const roundedDelay = Math.round(delay);
|
|
17890
18375
|
let tick = roundedDelay;
|
|
17891
18376
|
if (this._now === 0) tick += this.game.time.time;
|
|
@@ -18157,6 +18642,33 @@ var Timer = class {
|
|
|
18157
18642
|
//#endregion
|
|
18158
18643
|
//#region src/phaser/core/time.ts
|
|
18159
18644
|
var Time = class {
|
|
18645
|
+
game;
|
|
18646
|
+
time;
|
|
18647
|
+
prevTime;
|
|
18648
|
+
now;
|
|
18649
|
+
elapsed;
|
|
18650
|
+
elapsedMS;
|
|
18651
|
+
desiredFpsMult;
|
|
18652
|
+
_desiredFps;
|
|
18653
|
+
suggestedFps;
|
|
18654
|
+
advancedTiming;
|
|
18655
|
+
frames;
|
|
18656
|
+
fps;
|
|
18657
|
+
fpsMin;
|
|
18658
|
+
fpsMax;
|
|
18659
|
+
msMin;
|
|
18660
|
+
msMax;
|
|
18661
|
+
pauseDuration;
|
|
18662
|
+
timeToCall;
|
|
18663
|
+
timeExpected;
|
|
18664
|
+
events;
|
|
18665
|
+
_frameCount;
|
|
18666
|
+
_elapsedAccumulator;
|
|
18667
|
+
_started;
|
|
18668
|
+
_timeLastSecond;
|
|
18669
|
+
_pauseStarted;
|
|
18670
|
+
_justResumed;
|
|
18671
|
+
_timers;
|
|
18160
18672
|
/**
|
|
18161
18673
|
* Creates a new Time instance.
|
|
18162
18674
|
* @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
|
|
@@ -18389,6 +18901,31 @@ var Time = class {
|
|
|
18389
18901
|
//#endregion
|
|
18390
18902
|
//#region src/phaser/core/tween_data.ts
|
|
18391
18903
|
var TweenData = class {
|
|
18904
|
+
parent;
|
|
18905
|
+
game;
|
|
18906
|
+
vStart;
|
|
18907
|
+
vStartCache;
|
|
18908
|
+
vEnd;
|
|
18909
|
+
vEndCache;
|
|
18910
|
+
duration;
|
|
18911
|
+
percent;
|
|
18912
|
+
value;
|
|
18913
|
+
repeatCounter;
|
|
18914
|
+
repeatDelay;
|
|
18915
|
+
repeatTotal;
|
|
18916
|
+
interpolate;
|
|
18917
|
+
yoyo;
|
|
18918
|
+
yoyoDelay;
|
|
18919
|
+
inReverse;
|
|
18920
|
+
delay;
|
|
18921
|
+
dt;
|
|
18922
|
+
startTime;
|
|
18923
|
+
easingFunction;
|
|
18924
|
+
interpolationFunction;
|
|
18925
|
+
interpolationContext;
|
|
18926
|
+
isRunning;
|
|
18927
|
+
isFrom;
|
|
18928
|
+
yoyoCounter;
|
|
18392
18929
|
/**
|
|
18393
18930
|
* Creates a new TweenData instance.
|
|
18394
18931
|
* @param {import('./tween.js').Tween} parent - The parent Tween instance.
|
|
@@ -18619,6 +19156,29 @@ var TweenData = class {
|
|
|
18619
19156
|
//#endregion
|
|
18620
19157
|
//#region src/phaser/core/tween.ts
|
|
18621
19158
|
var Tween = class {
|
|
19159
|
+
game;
|
|
19160
|
+
target;
|
|
19161
|
+
manager;
|
|
19162
|
+
timeline;
|
|
19163
|
+
reverse;
|
|
19164
|
+
timeScale;
|
|
19165
|
+
repeatCounter;
|
|
19166
|
+
pendingDelete;
|
|
19167
|
+
onStart;
|
|
19168
|
+
onLoop;
|
|
19169
|
+
onRepeat;
|
|
19170
|
+
onChildComplete;
|
|
19171
|
+
onComplete;
|
|
19172
|
+
isRunning;
|
|
19173
|
+
current;
|
|
19174
|
+
properties;
|
|
19175
|
+
chainedTween;
|
|
19176
|
+
isPaused;
|
|
19177
|
+
_onUpdateCallback;
|
|
19178
|
+
_onUpdateCallbackContext;
|
|
19179
|
+
_pausedTime;
|
|
19180
|
+
_codePaused;
|
|
19181
|
+
_hasStarted;
|
|
18622
19182
|
/**
|
|
18623
19183
|
* Creates a new Tween instance.
|
|
18624
19184
|
* @param {import('../display/display_object.js').DisplayObject} target - The object to tween.
|
|
@@ -19297,6 +19857,10 @@ const BounceInOut = (k) => {
|
|
|
19297
19857
|
//#endregion
|
|
19298
19858
|
//#region src/phaser/core/tween_manager.ts
|
|
19299
19859
|
var TweenManager = class {
|
|
19860
|
+
game;
|
|
19861
|
+
_tweens;
|
|
19862
|
+
_add;
|
|
19863
|
+
easeMap;
|
|
19300
19864
|
/**
|
|
19301
19865
|
* Creates a new TweenManager instance.
|
|
19302
19866
|
* @param {import('./game.js').Game} game - The game instance this manager belongs to.
|
|
@@ -19490,6 +20054,36 @@ var World = class extends Group {
|
|
|
19490
20054
|
//#endregion
|
|
19491
20055
|
//#region src/phaser/core/game.ts
|
|
19492
20056
|
var Game = class {
|
|
20057
|
+
config;
|
|
20058
|
+
id;
|
|
20059
|
+
parent;
|
|
20060
|
+
width;
|
|
20061
|
+
height;
|
|
20062
|
+
renderer;
|
|
20063
|
+
state;
|
|
20064
|
+
isBooted;
|
|
20065
|
+
paused;
|
|
20066
|
+
raf;
|
|
20067
|
+
add;
|
|
20068
|
+
cache;
|
|
20069
|
+
input;
|
|
20070
|
+
load;
|
|
20071
|
+
scale;
|
|
20072
|
+
sound;
|
|
20073
|
+
stage;
|
|
20074
|
+
time;
|
|
20075
|
+
tweens;
|
|
20076
|
+
world;
|
|
20077
|
+
device;
|
|
20078
|
+
logger;
|
|
20079
|
+
canvas;
|
|
20080
|
+
context;
|
|
20081
|
+
onPause;
|
|
20082
|
+
onResume;
|
|
20083
|
+
onBoot;
|
|
20084
|
+
isPaused;
|
|
20085
|
+
contextLostBinded;
|
|
20086
|
+
contextRestoredBinded;
|
|
19493
20087
|
/**
|
|
19494
20088
|
* Creates a new Game instance.
|
|
19495
20089
|
* @param {object} gameConfig - The configuration object for the game.
|
|
@@ -19653,7 +20247,7 @@ var Game = class {
|
|
|
19653
20247
|
this.parseConfigElement(config, "height", 600);
|
|
19654
20248
|
this.parseConfigElement(config, "backgroundColor", 0);
|
|
19655
20249
|
this.parseConfigElement(config, "canvasID", "");
|
|
19656
|
-
this.parseConfigElement(config, "canvasStyle"
|
|
20250
|
+
this.parseConfigElement(config, "canvasStyle");
|
|
19657
20251
|
this.parseConfigElement(config, "resolution", 1);
|
|
19658
20252
|
this.parseConfigElement(config, "transparent", false);
|
|
19659
20253
|
this.parseConfigElement(config, "antialias", false);
|
|
@@ -19665,7 +20259,7 @@ var Game = class {
|
|
|
19665
20259
|
this.parseConfigElement(config, "maxParallelDownloads", 16);
|
|
19666
20260
|
if (config.parent) this.parent = config.parent;
|
|
19667
20261
|
let state = null;
|
|
19668
|
-
if (config.state) state = config
|
|
20262
|
+
if (config.state) ({state} = config);
|
|
19669
20263
|
this.state = new SceneManager(this, state);
|
|
19670
20264
|
}
|
|
19671
20265
|
/**
|