@vpmedia/phaser 1.94.0 → 1.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/package.json +11 -11
- package/src/phaser/core/animation.js +79 -56
- package/src/phaser/core/animation_manager.js +55 -55
- package/src/phaser/core/animation_parser.js +2 -2
- package/src/phaser/core/cache.js +154 -154
- package/src/phaser/core/device.js +2 -1
- package/src/phaser/core/device_util.js +27 -27
- package/src/phaser/core/dom.js +43 -43
- package/src/phaser/core/event_manager.js +63 -63
- package/src/phaser/core/factory.js +47 -47
- package/src/phaser/core/frame.js +30 -30
- package/src/phaser/core/frame_data.js +30 -28
- package/src/phaser/core/frame_util.js +8 -8
- package/src/phaser/core/game.js +35 -19
- package/src/phaser/core/input_pointer.js +18 -0
- package/src/phaser/core/loader.js +171 -171
- package/src/phaser/core/loader_parser.js +22 -22
- package/src/phaser/core/raf.js +1 -1
- package/src/phaser/core/scale_manager.js +3 -2
- package/src/phaser/core/scene.js +16 -10
- package/src/phaser/core/scene_manager.js +51 -43
- package/src/phaser/core/signal.js +56 -52
- package/src/phaser/core/sound.js +54 -54
- package/src/phaser/core/sound_manager.js +49 -49
- package/src/phaser/core/stage.js +16 -16
- package/src/phaser/core/time.js +54 -30
- package/src/phaser/core/timer.js +82 -64
- package/src/phaser/core/timer_event.js +9 -9
- package/src/phaser/core/tween.js +106 -90
- package/src/phaser/core/tween_data.js +30 -30
- package/src/phaser/core/tween_manager.js +32 -24
- package/src/phaser/core/world.js +4 -3
- package/src/phaser/display/bitmap_text.js +72 -54
- package/src/phaser/display/button.js +48 -47
- package/src/phaser/display/canvas/buffer.js +8 -8
- package/src/phaser/display/canvas/graphics.js +8 -8
- package/src/phaser/display/canvas/masker.js +5 -5
- package/src/phaser/display/canvas/pool.js +18 -18
- package/src/phaser/display/canvas/renderer.js +17 -16
- package/src/phaser/display/canvas/tinter.js +22 -22
- package/src/phaser/display/canvas/util.js +42 -42
- package/src/phaser/display/display_object.js +119 -108
- package/src/phaser/display/graphics.js +129 -112
- package/src/phaser/display/graphics_data.js +10 -10
- package/src/phaser/display/graphics_data_util.js +3 -3
- package/src/phaser/display/group.js +63 -50
- package/src/phaser/display/image.js +68 -50
- package/src/phaser/display/sprite_batch.js +2 -2
- package/src/phaser/display/sprite_util.js +19 -19
- package/src/phaser/display/text.js +217 -187
- package/src/phaser/display/webgl/abstract_filter.js +4 -4
- package/src/phaser/display/webgl/base_texture.js +9 -9
- package/src/phaser/display/webgl/blend_manager.js +7 -7
- package/src/phaser/display/webgl/earcut.js +95 -95
- package/src/phaser/display/webgl/earcut_node.js +4 -4
- package/src/phaser/display/webgl/fast_sprite_batch.js +15 -15
- package/src/phaser/display/webgl/filter_manager.js +9 -9
- package/src/phaser/display/webgl/filter_texture.js +10 -10
- package/src/phaser/display/webgl/graphics.js +37 -37
- package/src/phaser/display/webgl/graphics_data.js +4 -4
- package/src/phaser/display/webgl/mask_manager.js +6 -6
- package/src/phaser/display/webgl/render_texture.js +16 -16
- package/src/phaser/display/webgl/renderer.js +21 -20
- package/src/phaser/display/webgl/shader/complex.js +4 -4
- package/src/phaser/display/webgl/shader/fast.js +4 -4
- package/src/phaser/display/webgl/shader/normal.js +8 -8
- package/src/phaser/display/webgl/shader/primitive.js +4 -4
- package/src/phaser/display/webgl/shader/strip.js +4 -4
- package/src/phaser/display/webgl/shader_manager.js +9 -9
- package/src/phaser/display/webgl/sprite_batch.js +18 -18
- package/src/phaser/display/webgl/stencil_manager.js +16 -16
- package/src/phaser/display/webgl/texture.js +13 -13
- package/src/phaser/display/webgl/texture_util.js +8 -8
- package/src/phaser/display/webgl/util.js +25 -25
- package/src/phaser/geom/circle.js +74 -69
- package/src/phaser/geom/ellipse.js +33 -28
- package/src/phaser/geom/line.js +96 -93
- package/src/phaser/geom/matrix.js +61 -54
- package/src/phaser/geom/point.js +99 -96
- package/src/phaser/geom/polygon.js +27 -22
- package/src/phaser/geom/rectangle.js +137 -132
- package/src/phaser/geom/rounded_rectangle.js +12 -12
- package/src/phaser/geom/util/circle.js +33 -33
- package/src/phaser/geom/util/ellipse.js +5 -5
- package/src/phaser/geom/util/line.js +26 -26
- package/src/phaser/geom/util/matrix.js +8 -8
- package/src/phaser/geom/util/point.js +97 -97
- package/src/phaser/geom/util/polygon.js +4 -4
- package/src/phaser/geom/util/rectangle.js +74 -74
- package/src/phaser/geom/util/rounded_rectangle.js +4 -4
- package/src/phaser/util/math.js +81 -81
- package/types/phaser/core/animation.d.ts +79 -56
- package/types/phaser/core/animation.d.ts.map +1 -1
- package/types/phaser/core/animation_manager.d.ts +55 -55
- package/types/phaser/core/animation_parser.d.ts +3 -2
- package/types/phaser/core/animation_parser.d.ts.map +1 -1
- package/types/phaser/core/cache.d.ts +154 -154
- package/types/phaser/core/device.d.ts.map +1 -1
- package/types/phaser/core/dom.d.ts +51 -44
- package/types/phaser/core/dom.d.ts.map +1 -1
- package/types/phaser/core/event_manager.d.ts +63 -63
- package/types/phaser/core/factory.d.ts +47 -47
- package/types/phaser/core/frame.d.ts +30 -30
- package/types/phaser/core/frame_data.d.ts +28 -27
- package/types/phaser/core/frame_data.d.ts.map +1 -1
- package/types/phaser/core/game.d.ts +54 -21
- package/types/phaser/core/game.d.ts.map +1 -1
- package/types/phaser/core/input_pointer.d.ts +18 -0
- package/types/phaser/core/input_pointer.d.ts.map +1 -1
- package/types/phaser/core/loader.d.ts +175 -172
- package/types/phaser/core/loader.d.ts.map +1 -1
- package/types/phaser/core/loader_parser.d.ts.map +1 -1
- package/types/phaser/core/raf.d.ts +1 -1
- package/types/phaser/core/scale_manager.d.ts +6 -5
- package/types/phaser/core/scale_manager.d.ts.map +1 -1
- package/types/phaser/core/scene.d.ts +15 -9
- package/types/phaser/core/scene.d.ts.map +1 -1
- package/types/phaser/core/scene_manager.d.ts +51 -43
- package/types/phaser/core/scene_manager.d.ts.map +1 -1
- package/types/phaser/core/signal.d.ts +54 -51
- package/types/phaser/core/signal.d.ts.map +1 -1
- package/types/phaser/core/sound.d.ts +54 -54
- package/types/phaser/core/sound_manager.d.ts +49 -49
- package/types/phaser/core/stage.d.ts +10 -10
- package/types/phaser/core/time.d.ts +54 -30
- package/types/phaser/core/time.d.ts.map +1 -1
- package/types/phaser/core/timer.d.ts +82 -64
- package/types/phaser/core/timer.d.ts.map +1 -1
- package/types/phaser/core/timer_event.d.ts +9 -9
- package/types/phaser/core/tween.d.ts +106 -90
- package/types/phaser/core/tween.d.ts.map +1 -1
- package/types/phaser/core/tween_data.d.ts +30 -30
- package/types/phaser/core/tween_manager.d.ts +35 -67
- package/types/phaser/core/tween_manager.d.ts.map +1 -1
- package/types/phaser/core/world.d.ts +4 -3
- package/types/phaser/core/world.d.ts.map +1 -1
- package/types/phaser/display/bitmap_text.d.ts +76 -53
- package/types/phaser/display/bitmap_text.d.ts.map +1 -1
- package/types/phaser/display/button.d.ts +47 -46
- package/types/phaser/display/button.d.ts.map +1 -1
- package/types/phaser/display/canvas/buffer.d.ts +8 -8
- package/types/phaser/display/canvas/graphics.d.ts +3 -3
- package/types/phaser/display/canvas/graphics.d.ts.map +1 -1
- package/types/phaser/display/canvas/pool.d.ts +6 -3
- package/types/phaser/display/canvas/pool.d.ts.map +1 -1
- package/types/phaser/display/canvas/renderer.d.ts +18 -17
- package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
- package/types/phaser/display/canvas/util.d.ts +6 -6
- package/types/phaser/display/canvas/util.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +119 -108
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/graphics.d.ts +118 -102
- package/types/phaser/display/graphics.d.ts.map +1 -1
- package/types/phaser/display/graphics_data.d.ts +10 -10
- package/types/phaser/display/group.d.ts +59 -47
- package/types/phaser/display/group.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +58 -45
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/text.d.ts +237 -188
- package/types/phaser/display/text.d.ts.map +1 -1
- package/types/phaser/display/webgl/abstract_filter.d.ts +4 -4
- package/types/phaser/display/webgl/base_texture.d.ts +10 -10
- package/types/phaser/display/webgl/base_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/blend_manager.d.ts +6 -6
- package/types/phaser/display/webgl/earcut.d.ts +95 -95
- package/types/phaser/display/webgl/earcut_node.d.ts +4 -4
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts +15 -15
- package/types/phaser/display/webgl/filter_manager.d.ts +8 -8
- package/types/phaser/display/webgl/filter_texture.d.ts +10 -10
- package/types/phaser/display/webgl/graphics.d.ts +2 -2
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics_data.d.ts +4 -4
- package/types/phaser/display/webgl/render_texture.d.ts +16 -16
- package/types/phaser/display/webgl/renderer.d.ts +21 -20
- package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/complex.d.ts +4 -4
- package/types/phaser/display/webgl/shader/fast.d.ts +4 -4
- package/types/phaser/display/webgl/shader/normal.d.ts +8 -8
- package/types/phaser/display/webgl/shader/primitive.d.ts +4 -4
- package/types/phaser/display/webgl/shader/strip.d.ts +4 -4
- package/types/phaser/display/webgl/shader_manager.d.ts +8 -8
- package/types/phaser/display/webgl/sprite_batch.d.ts +17 -17
- package/types/phaser/display/webgl/stencil_manager.d.ts +15 -15
- package/types/phaser/display/webgl/texture.d.ts +12 -12
- package/types/phaser/display/webgl/texture_util.d.ts +4 -2
- package/types/phaser/display/webgl/texture_util.d.ts.map +1 -1
- package/types/phaser/geom/circle.d.ts +74 -69
- package/types/phaser/geom/circle.d.ts.map +1 -1
- package/types/phaser/geom/ellipse.d.ts +33 -28
- package/types/phaser/geom/ellipse.d.ts.map +1 -1
- package/types/phaser/geom/line.d.ts +96 -93
- package/types/phaser/geom/line.d.ts.map +1 -1
- package/types/phaser/geom/matrix.d.ts +61 -54
- package/types/phaser/geom/matrix.d.ts.map +1 -1
- package/types/phaser/geom/point.d.ts +99 -96
- package/types/phaser/geom/point.d.ts.map +1 -1
- package/types/phaser/geom/polygon.d.ts +29 -23
- package/types/phaser/geom/polygon.d.ts.map +1 -1
- package/types/phaser/geom/rectangle.d.ts +137 -132
- package/types/phaser/geom/rectangle.d.ts.map +1 -1
- package/types/phaser/geom/rounded_rectangle.d.ts +12 -12
- package/types/phaser/geom/util/point.d.ts +1 -1
- package/types/phaser/geom/util/point.d.ts.map +1 -1
- package/pnpm-workspace.yaml +0 -4
|
@@ -8,8 +8,10 @@ export class Pointer {
|
|
|
8
8
|
constructor(game: import("./game.js").Game, id: number, pointerMode: number);
|
|
9
9
|
game: import("./game.js").Game;
|
|
10
10
|
id: number;
|
|
11
|
+
/** @type {number} */
|
|
11
12
|
type: number;
|
|
12
13
|
exists: boolean;
|
|
14
|
+
/** @type {number} */
|
|
13
15
|
identifier: number;
|
|
14
16
|
pointerId: number;
|
|
15
17
|
pointerMode: number;
|
|
@@ -17,27 +19,43 @@ export class Pointer {
|
|
|
17
19
|
button: any;
|
|
18
20
|
_holdSent: boolean;
|
|
19
21
|
_history: any[];
|
|
22
|
+
/** @type {number} */
|
|
20
23
|
_nextDrop: number;
|
|
21
24
|
_stateReset: boolean;
|
|
22
25
|
withinGame: boolean;
|
|
23
26
|
clientX: number;
|
|
27
|
+
/** @type {number} */
|
|
24
28
|
clientY: number;
|
|
29
|
+
/** @type {number} */
|
|
25
30
|
pageX: number;
|
|
31
|
+
/** @type {number} */
|
|
26
32
|
pageY: number;
|
|
33
|
+
/** @type {number} */
|
|
27
34
|
screenX: number;
|
|
35
|
+
/** @type {number} */
|
|
28
36
|
screenY: number;
|
|
37
|
+
/** @type {number} */
|
|
29
38
|
rawMovementX: number;
|
|
39
|
+
/** @type {number} */
|
|
30
40
|
rawMovementY: number;
|
|
41
|
+
/** @type {number} */
|
|
31
42
|
movementX: number;
|
|
43
|
+
/** @type {number} */
|
|
32
44
|
movementY: number;
|
|
45
|
+
/** @type {number} */
|
|
33
46
|
x: number;
|
|
47
|
+
/** @type {number} */
|
|
34
48
|
y: number;
|
|
35
49
|
isMouse: boolean;
|
|
36
50
|
isDown: boolean;
|
|
37
51
|
isUp: boolean;
|
|
52
|
+
/** @type {number} */
|
|
38
53
|
timeDown: number;
|
|
54
|
+
/** @type {number} */
|
|
39
55
|
timeUp: number;
|
|
56
|
+
/** @type {number} */
|
|
40
57
|
previousTapTime: number;
|
|
58
|
+
/** @type {number} */
|
|
41
59
|
totalTouches: number;
|
|
42
60
|
msSinceLastClick: number;
|
|
43
61
|
targetObject: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input_pointer.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/input_pointer.js"],"names":[],"mappings":"AAWA;IACE;;;;;OAKG;IACH,kBAJW,OAAO,WAAW,EAAE,IAAI,MACxB,MAAM,eACN,MAAM,
|
|
1
|
+
{"version":3,"file":"input_pointer.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/input_pointer.js"],"names":[],"mappings":"AAWA;IACE;;;;;OAKG;IACH,kBAJW,OAAO,WAAW,EAAE,IAAI,MACxB,MAAM,eACN,MAAM,EAiEhB;IA9DC,+BAAgB;IAChB,WAAY;IACZ,qBAAqB;IACrB,MADW,MAAM,CACE;IACnB,gBAAkB;IAClB,qBAAqB;IACrB,YADW,MAAM,CACE;IACnB,kBAAqB;IACrB,oBAAkE;IAClE,oBAAkB;IAClB,YAAkB;IAClB,mBAAsB;IACtB,gBAAkB;IAClB,qBAAqB;IACrB,WADW,MAAM,CACC;IAClB,qBAAwB;IACxB,oBAAuB;IACvB,gBAAiB;IACjB,qBAAqB;IACrB,SADW,MAAM,CACA;IACjB,qBAAqB;IACrB,OADW,MAAM,CACF;IACf,qBAAqB;IACrB,OADW,MAAM,CACF;IACf,qBAAqB;IACrB,SADW,MAAM,CACA;IACjB,qBAAqB;IACrB,SADW,MAAM,CACA;IACjB,qBAAqB;IACrB,cADW,MAAM,CACI;IACr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BAGC;IAED;;;OAGG;IACH,gBAFa,MAAM,CAOlB;IAED;;;OAGG;IACH,cAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,cAFa,MAAM,CAIlB;CACF;sBAxhBqB,kBAAkB;uBADjB,mBAAmB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class Loader {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {import('./game.js').Game} game -
|
|
3
|
+
* Creates a new Loader instance.
|
|
4
|
+
* @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
|
|
5
5
|
*/
|
|
6
6
|
constructor(game: import("./game.js").Game);
|
|
7
7
|
game: import("./game.js").Game;
|
|
@@ -43,251 +43,254 @@ export class Loader {
|
|
|
43
43
|
_loadedPackCount: number;
|
|
44
44
|
_loadedFileCount: number;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {import('../display/image.js').Image} sprite -
|
|
48
|
-
* @param {number} direction -
|
|
46
|
+
* Sets the preload sprite for displaying loading progress.
|
|
47
|
+
* @param {import('../display/image.js').Image} sprite - The image to use as the preload sprite.
|
|
48
|
+
* @param {number} direction - The direction of the progress (0 = horizontal, 1 = vertical).
|
|
49
49
|
*/
|
|
50
50
|
setPreloadSprite(sprite: import("../display/image.js").Image, direction?: number): void;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Resizes the preload sprite when the window is resized.
|
|
53
53
|
*/
|
|
54
54
|
resize(): void;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {string} type -
|
|
58
|
-
* @param {string} key -
|
|
59
|
-
* @returns {boolean}
|
|
56
|
+
* Checks if a file with the given type and key already exists in the file list.
|
|
57
|
+
* @param {string} type - The type of file to check for.
|
|
58
|
+
* @param {string} key - The key of the file to check for.
|
|
59
|
+
* @returns {boolean} True if the file exists, false otherwise.
|
|
60
60
|
*/
|
|
61
61
|
checkKeyExists(type: string, key: string): boolean;
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
64
|
-
* @param {string} type -
|
|
65
|
-
* @param {string} key -
|
|
66
|
-
* @returns {number}
|
|
63
|
+
* Gets the index of a file in the file list by type and key.
|
|
64
|
+
* @param {string} type - The type of file to find.
|
|
65
|
+
* @param {string} key - The key of the file to find.
|
|
66
|
+
* @returns {number} The index of the file in the list, or -1 if not found.
|
|
67
67
|
*/
|
|
68
68
|
getAssetIndex(type: string, key: string): number;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @param {string} type -
|
|
72
|
-
* @param {string} key -
|
|
73
|
-
* @returns {object}
|
|
70
|
+
* Gets a file from the file list by type and key.
|
|
71
|
+
* @param {string} type - The type of file to get.
|
|
72
|
+
* @param {string} key - The key of the file to get.
|
|
73
|
+
* @returns {{index: number, file: object} | null} The file and its index, or null if not found.
|
|
74
74
|
*/
|
|
75
|
-
getAsset(type: string, key: string):
|
|
75
|
+
getAsset(type: string, key: string): {
|
|
76
|
+
index: number;
|
|
77
|
+
file: object;
|
|
78
|
+
} | null;
|
|
76
79
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @param {boolean} hard -
|
|
79
|
-
* @param {boolean} clearEvents -
|
|
80
|
+
* Resets the loader state, optionally clearing event listeners.
|
|
81
|
+
* @param {boolean} hard - Whether to perform a hard reset (clears preload sprite).
|
|
82
|
+
* @param {boolean} clearEvents - Whether to clear event listeners.
|
|
80
83
|
*/
|
|
81
84
|
reset(hard?: boolean, clearEvents?: boolean): void;
|
|
82
85
|
/**
|
|
83
|
-
*
|
|
84
|
-
* @param {string} type -
|
|
85
|
-
* @param {string} key -
|
|
86
|
-
* @param {string} url -
|
|
87
|
-
* @param {object} properties -
|
|
88
|
-
* @param {boolean} overwrite -
|
|
89
|
-
* @param {string} extension -
|
|
90
|
-
* @returns {Loader}
|
|
86
|
+
* Adds a file to the file list for loading.
|
|
87
|
+
* @param {string} type - The type of file to add.
|
|
88
|
+
* @param {string} key - The key to identify the file.
|
|
89
|
+
* @param {string} url - The URL of the file to load.
|
|
90
|
+
* @param {object} properties - Additional properties for the file.
|
|
91
|
+
* @param {boolean} overwrite - Whether to overwrite an existing file with the same key.
|
|
92
|
+
* @param {string} extension - The file extension to use if URL is not provided.
|
|
93
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
91
94
|
*/
|
|
92
95
|
addToFileList(type: string, key?: string, url?: string, properties?: object, overwrite?: boolean, extension?: string): Loader;
|
|
93
96
|
/**
|
|
94
|
-
*
|
|
95
|
-
* @param {string} type -
|
|
96
|
-
* @param {string} key -
|
|
97
|
-
* @param {string} url -
|
|
98
|
-
* @param {object} properties -
|
|
99
|
-
* @returns {Loader}
|
|
97
|
+
* Replaces a file in the file list with new properties.
|
|
98
|
+
* @param {string} type - The type of file to replace.
|
|
99
|
+
* @param {string} key - The key of the file to replace.
|
|
100
|
+
* @param {string} url - The new URL for the file.
|
|
101
|
+
* @param {object} properties - The new properties for the file.
|
|
102
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
100
103
|
*/
|
|
101
104
|
replaceInFileList(type: string, key: string, url: string, properties: object): Loader;
|
|
102
105
|
/**
|
|
103
|
-
*
|
|
104
|
-
* @param {string} key -
|
|
105
|
-
* @param {string} url -
|
|
106
|
-
* @param {object} data -
|
|
107
|
-
* @param {object} callbackContext -
|
|
108
|
-
* @returns {Loader}
|
|
106
|
+
* Adds a pack file to the file list.
|
|
107
|
+
* @param {string} key - The key to identify the pack file.
|
|
108
|
+
* @param {string} url - The URL of the pack file to load.
|
|
109
|
+
* @param {object} data - The parsed pack data.
|
|
110
|
+
* @param {object} callbackContext - The context in which to call the callback.
|
|
111
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
109
112
|
*/
|
|
110
113
|
pack(key: string, url: string, data: object, callbackContext: object): Loader;
|
|
111
114
|
/**
|
|
112
|
-
*
|
|
113
|
-
* @param {string} key -
|
|
114
|
-
* @param {string} url -
|
|
115
|
-
* @param {boolean} overwrite -
|
|
116
|
-
* @returns {Loader}
|
|
115
|
+
* Adds an image file to the file list.
|
|
116
|
+
* @param {string} key - The key to identify the image file.
|
|
117
|
+
* @param {string} url - The URL of the image file to load.
|
|
118
|
+
* @param {boolean} overwrite - Whether to overwrite an existing file with the same key.
|
|
119
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
117
120
|
*/
|
|
118
121
|
image(key: string, url: string, overwrite?: boolean): Loader;
|
|
119
122
|
/**
|
|
120
|
-
*
|
|
121
|
-
* @param {string[]} keys -
|
|
122
|
-
* @param {string[]} urls -
|
|
123
|
-
* @returns {Loader}
|
|
123
|
+
* Adds multiple image files to the file list.
|
|
124
|
+
* @param {string[]} keys - The keys to identify the image files.
|
|
125
|
+
* @param {string[]} urls - The URLs of the image files to load.
|
|
126
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
124
127
|
*/
|
|
125
128
|
images(keys: string[], urls: string[]): Loader;
|
|
126
129
|
/**
|
|
127
|
-
*
|
|
128
|
-
* @param {string} key -
|
|
129
|
-
* @param {string} url -
|
|
130
|
-
* @param {boolean} overwrite -
|
|
131
|
-
* @returns {Loader}
|
|
130
|
+
* Adds a text file to the file list.
|
|
131
|
+
* @param {string} key - The key to identify the text file.
|
|
132
|
+
* @param {string} url - The URL of the text file to load.
|
|
133
|
+
* @param {boolean} overwrite - Whether to overwrite an existing file with the same key.
|
|
134
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
132
135
|
*/
|
|
133
136
|
text(key: string, url: string, overwrite?: boolean): Loader;
|
|
134
137
|
/**
|
|
135
|
-
*
|
|
136
|
-
* @param {string} key -
|
|
137
|
-
* @param {string} url -
|
|
138
|
-
* @param {boolean} overwrite -
|
|
139
|
-
* @returns {Loader}
|
|
138
|
+
* Adds a JSON file to the file list.
|
|
139
|
+
* @param {string} key - The key to identify the JSON file.
|
|
140
|
+
* @param {string} url - The URL of the JSON file to load.
|
|
141
|
+
* @param {boolean} overwrite - Whether to overwrite an existing file with the same key.
|
|
142
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
140
143
|
*/
|
|
141
144
|
json(key: string, url: string, overwrite?: boolean): Loader;
|
|
142
145
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @param {string} key -
|
|
145
|
-
* @param {string} url -
|
|
146
|
-
* @param {boolean} overwrite -
|
|
147
|
-
* @returns {Loader}
|
|
146
|
+
* Adds an XML file to the file list.
|
|
147
|
+
* @param {string} key - The key to identify the XML file.
|
|
148
|
+
* @param {string} url - The URL of the XML file to load.
|
|
149
|
+
* @param {boolean} overwrite - Whether to overwrite an existing file with the same key.
|
|
150
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
148
151
|
*/
|
|
149
152
|
xml(key: string, url: string, overwrite?: boolean): Loader;
|
|
150
153
|
/**
|
|
151
|
-
*
|
|
152
|
-
* @param {string} key -
|
|
153
|
-
* @param {string} url -
|
|
154
|
-
* @param {number} frameWidth -
|
|
155
|
-
* @param {number} frameHeight -
|
|
156
|
-
* @param {number} frameMax -
|
|
157
|
-
* @param {number} margin -
|
|
158
|
-
* @param {number} spacing -
|
|
159
|
-
* @returns {Loader}
|
|
154
|
+
* Adds a spritesheet file to the file list.
|
|
155
|
+
* @param {string} key - The key to identify the spritesheet file.
|
|
156
|
+
* @param {string} url - The URL of the spritesheet file to load.
|
|
157
|
+
* @param {number} frameWidth - The width of each frame in the spritesheet.
|
|
158
|
+
* @param {number} frameHeight - The height of each frame in the spritesheet.
|
|
159
|
+
* @param {number} frameMax - The maximum number of frames to load (-1 for all).
|
|
160
|
+
* @param {number} margin - The margin around each frame in pixels.
|
|
161
|
+
* @param {number} spacing - The spacing between frames in pixels.
|
|
162
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
160
163
|
*/
|
|
161
164
|
spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Loader;
|
|
162
165
|
/**
|
|
163
|
-
*
|
|
164
|
-
* @param {string} key -
|
|
165
|
-
* @param {string[]} urls -
|
|
166
|
-
* @param {boolean} autoDecode -
|
|
167
|
-
* @returns {Loader}
|
|
166
|
+
* Adds an audio file to the file list.
|
|
167
|
+
* @param {string} key - The key to identify the audio file.
|
|
168
|
+
* @param {string[]} urls - The URLs of the audio files to load.
|
|
169
|
+
* @param {boolean} autoDecode - Whether to automatically decode the audio file.
|
|
170
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
168
171
|
*/
|
|
169
172
|
audio(key: string, urls: string[], autoDecode?: boolean): Loader;
|
|
170
173
|
/**
|
|
171
|
-
*
|
|
172
|
-
* @param {string} key -
|
|
173
|
-
* @param {string} urls -
|
|
174
|
-
* @param {string} jsonURL -
|
|
175
|
-
* @param {object} jsonData -
|
|
176
|
-
* @param {boolean} autoDecode -
|
|
177
|
-
* @returns {Loader}
|
|
174
|
+
* Adds an audio sprite file to the file list.
|
|
175
|
+
* @param {string} key - The key to identify the audio sprite file.
|
|
176
|
+
* @param {string} urls - The URLs of the audio files to load.
|
|
177
|
+
* @param {string} jsonURL - The URL of the JSON file containing audio sprite data.
|
|
178
|
+
* @param {object} jsonData - The parsed JSON data containing audio sprite data.
|
|
179
|
+
* @param {boolean} autoDecode - Whether to automatically decode the audio file.
|
|
180
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
178
181
|
*/
|
|
179
182
|
audioSprite(key: string, urls: string, jsonURL: string, jsonData: object, autoDecode?: boolean): Loader;
|
|
180
183
|
/**
|
|
181
|
-
*
|
|
182
|
-
* @param {string} key -
|
|
183
|
-
* @param {string} textureURL -
|
|
184
|
-
* @param {string} atlasURL -
|
|
185
|
-
* @param {object} atlasData -
|
|
186
|
-
* @param {number} xSpacing -
|
|
187
|
-
* @param {number} ySpacing -
|
|
188
|
-
* @returns {Loader}
|
|
189
|
-
* @throws {Error}
|
|
184
|
+
* Adds a bitmap font file to the file list.
|
|
185
|
+
* @param {string} key - The key to identify the bitmap font file.
|
|
186
|
+
* @param {string} textureURL - The URL of the font texture image.
|
|
187
|
+
* @param {string} atlasURL - The URL of the XML or JSON file containing font data.
|
|
188
|
+
* @param {object} atlasData - The parsed data containing font information.
|
|
189
|
+
* @param {number} xSpacing - The horizontal spacing between characters in pixels.
|
|
190
|
+
* @param {number} ySpacing - The vertical spacing between characters in pixels.
|
|
191
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
192
|
+
* @throws {Error} If the bitmap font atlas data is invalid.
|
|
190
193
|
*/
|
|
191
194
|
bitmapFont(key: string, textureURL?: string, atlasURL?: string, atlasData?: object, xSpacing?: number, ySpacing?: number): Loader;
|
|
192
195
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @param {string} key -
|
|
195
|
-
* @param {string} textureURL -
|
|
196
|
-
* @param {string} atlasURL -
|
|
197
|
-
* @param {object} atlasData -
|
|
198
|
-
* @param {number} format -
|
|
199
|
-
* @returns {Loader}
|
|
196
|
+
* Adds a texture atlas file to the file list.
|
|
197
|
+
* @param {string} key - The key to identify the texture atlas file.
|
|
198
|
+
* @param {string} textureURL - The URL of the texture image file.
|
|
199
|
+
* @param {string} atlasURL - The URL of the JSON or XML file containing atlas data.
|
|
200
|
+
* @param {object} atlasData - The parsed data containing atlas information.
|
|
201
|
+
* @param {number} format - The format of the atlas file (JSON or XML).
|
|
202
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
200
203
|
*/
|
|
201
204
|
atlas(key: string, textureURL: string, atlasURL?: string, atlasData?: object, format?: number): Loader;
|
|
202
205
|
/**
|
|
203
|
-
*
|
|
204
|
-
* @param {Function} callback -
|
|
205
|
-
* @param {object} callbackContext -
|
|
206
|
-
* @returns {Loader}
|
|
206
|
+
* Creates a sync point for loading files, ensuring all files in the block are loaded before continuing.
|
|
207
|
+
* @param {Function} callback - The callback function to execute within the sync point.
|
|
208
|
+
* @param {object} callbackContext - The context in which to call the callback.
|
|
209
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
207
210
|
*/
|
|
208
211
|
withSyncPoint(callback: Function, callbackContext: object): Loader;
|
|
209
212
|
/**
|
|
210
|
-
*
|
|
211
|
-
* @param {string} type -
|
|
212
|
-
* @param {string} key -
|
|
213
|
-
* @returns {Loader}
|
|
213
|
+
* Adds a sync point to a specific file, preventing other files from loading until this one is processed.
|
|
214
|
+
* @param {string} type - The type of file to add a sync point to.
|
|
215
|
+
* @param {string} key - The key of the file to add a sync point to.
|
|
216
|
+
* @returns {Loader} This Loader instance for chaining.
|
|
214
217
|
*/
|
|
215
218
|
addSyncPoint(type: string, key: string): Loader;
|
|
216
219
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @param {string} type -
|
|
219
|
-
* @param {string} key -
|
|
220
|
+
* Removes a file from the file list if it's not currently loading or loaded.
|
|
221
|
+
* @param {string} type - The type of file to remove.
|
|
222
|
+
* @param {string} key - The key of the file to remove.
|
|
220
223
|
*/
|
|
221
224
|
removeFile(type: string, key: string): void;
|
|
222
225
|
/**
|
|
223
|
-
*
|
|
226
|
+
* Removes all files from the file list.
|
|
224
227
|
*/
|
|
225
228
|
removeAll(): void;
|
|
226
229
|
/**
|
|
227
|
-
*
|
|
230
|
+
* Starts the loading process for all queued files.
|
|
228
231
|
*/
|
|
229
232
|
start(): void;
|
|
230
233
|
/**
|
|
231
|
-
*
|
|
234
|
+
* Processes the loading queue, loading files as appropriate.
|
|
232
235
|
*/
|
|
233
236
|
processLoadQueue(): void;
|
|
234
237
|
/**
|
|
235
|
-
*
|
|
236
|
-
* @param {boolean} abnormal -
|
|
238
|
+
* Finishes the loading process, optionally reporting an abnormal termination.
|
|
239
|
+
* @param {boolean} abnormal - Whether the loading was terminated abnormally.
|
|
237
240
|
*/
|
|
238
|
-
finishedLoading(abnormal
|
|
241
|
+
finishedLoading(abnormal?: boolean): void;
|
|
239
242
|
/**
|
|
240
|
-
*
|
|
241
|
-
* @param {object} file -
|
|
242
|
-
* @param {string} errorMessage -
|
|
243
|
+
* Marks a file as complete or failed, updating the loading state.
|
|
244
|
+
* @param {object} file - The file to complete or mark as failed.
|
|
245
|
+
* @param {string} errorMessage - An error message if the file failed to load.
|
|
243
246
|
*/
|
|
244
247
|
asyncComplete(file: object, errorMessage?: string): void;
|
|
245
248
|
/**
|
|
246
|
-
*
|
|
247
|
-
* @param {object} pack -
|
|
249
|
+
* Processes a pack file, adding its contained files to the loader.
|
|
250
|
+
* @param {object} pack - The pack file object to process.
|
|
248
251
|
*/
|
|
249
252
|
processPack(pack: object): void;
|
|
250
253
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @param {string} url -
|
|
253
|
-
* @param {object} file -
|
|
254
|
-
* @returns {string}
|
|
254
|
+
* Transforms a URL by adding the base URL and path prefix if needed.
|
|
255
|
+
* @param {string} url - The original URL to transform.
|
|
256
|
+
* @param {object} file - The file object containing path information.
|
|
257
|
+
* @returns {string} The transformed URL.
|
|
255
258
|
*/
|
|
256
259
|
transformUrl(url: string, file: object): string;
|
|
257
260
|
/**
|
|
258
|
-
*
|
|
259
|
-
* @param {object} file -
|
|
261
|
+
* Loads a file using XMLHttpRequest, handling image files specially.
|
|
262
|
+
* @param {object} file - The file object to load.
|
|
260
263
|
*/
|
|
261
264
|
loadFile(file: object): void;
|
|
262
265
|
/**
|
|
263
|
-
*
|
|
264
|
-
* @param {object} file -
|
|
266
|
+
* Loads an image file using the Image DOM element.
|
|
267
|
+
* @param {object} file - The file object to load.
|
|
265
268
|
*/
|
|
266
269
|
loadImageTag(file: object): void;
|
|
267
270
|
/**
|
|
268
|
-
*
|
|
269
|
-
* @param {object} file -
|
|
270
|
-
* @param {string} url -
|
|
271
|
-
* @param {string} type -
|
|
272
|
-
* @param {Function} onload -
|
|
273
|
-
* @param {Function} onerror -
|
|
271
|
+
* Loads a file using XMLHttpRequest with the specified parameters.
|
|
272
|
+
* @param {object} file - The file object to load.
|
|
273
|
+
* @param {string} url - The URL of the file to load.
|
|
274
|
+
* @param {string} type - The expected response type (e.g., 'text', 'arraybuffer').
|
|
275
|
+
* @param {Function} onload - The function to call when the file loads successfully.
|
|
276
|
+
* @param {Function} onerror - The function to call if the file fails to load.
|
|
274
277
|
*/
|
|
275
278
|
xhrLoad(file: object, url: string, type: string, onload: Function, onerror?: Function): void;
|
|
276
279
|
/**
|
|
277
|
-
*
|
|
280
|
+
* Placeholder for XDomainRequest loading (not implemented).
|
|
278
281
|
*/
|
|
279
282
|
xhrLoadWithXDR(): void;
|
|
280
283
|
/**
|
|
281
|
-
*
|
|
282
|
-
* @param {object[]} urls -
|
|
283
|
-
* @returns {string}
|
|
284
|
+
* Gets the first supported audio URL from a list of URLs.
|
|
285
|
+
* @param {object[]} urls - The array of URLs to check for supported audio formats.
|
|
286
|
+
* @returns {string} The first URL with a supported audio format, or null if none found.
|
|
284
287
|
*/
|
|
285
288
|
getAudioURL(urls: object[]): string;
|
|
286
289
|
/**
|
|
287
|
-
*
|
|
288
|
-
* @param {object} file -
|
|
289
|
-
* @param {XMLHttpRequest} xhr -
|
|
290
|
-
* @param {number | string} reason -
|
|
290
|
+
* Handles file loading errors, optionally retrying or marking the file as failed.
|
|
291
|
+
* @param {object} file - The file object that failed to load.
|
|
292
|
+
* @param {XMLHttpRequest} xhr - The XMLHttpRequest object that failed.
|
|
293
|
+
* @param {number | string} reason - The error code or message explaining the failure.
|
|
291
294
|
*/
|
|
292
295
|
fileError(file: object, xhr?: XMLHttpRequest, reason?: number | string): void;
|
|
293
296
|
/**
|
|
@@ -298,9 +301,9 @@ export class Loader {
|
|
|
298
301
|
*/
|
|
299
302
|
fileComplete(file: object, xhr: XMLHttpRequest): void;
|
|
300
303
|
/**
|
|
301
|
-
*
|
|
302
|
-
* @param {object} file -
|
|
303
|
-
* @param {XMLHttpRequest} xhr -
|
|
304
|
+
* Handles successful file loading, processing the file content appropriately.
|
|
305
|
+
* @param {object} file - The file object that was loaded successfully.
|
|
306
|
+
* @param {XMLHttpRequest} xhr - The XMLHttpRequest object containing the file data.
|
|
304
307
|
*/
|
|
305
308
|
jsonLoadComplete(file: object, xhr: XMLHttpRequest): void;
|
|
306
309
|
/**
|
|
@@ -308,55 +311,55 @@ export class Loader {
|
|
|
308
311
|
*/
|
|
309
312
|
csvLoadComplete(): void;
|
|
310
313
|
/**
|
|
311
|
-
*
|
|
312
|
-
* @param {object} file -
|
|
313
|
-
* @param {XMLHttpRequest} xhr -
|
|
314
|
+
* Processes JSON file data after loading.
|
|
315
|
+
* @param {object} file - The file object containing the JSON data.
|
|
316
|
+
* @param {XMLHttpRequest} xhr - The XMLHttpRequest object containing the file data.
|
|
314
317
|
*/
|
|
315
318
|
xmlLoadComplete(file: object, xhr: XMLHttpRequest): void;
|
|
316
319
|
/**
|
|
317
|
-
*
|
|
318
|
-
* @param {object} data -
|
|
319
|
-
* @returns {Document}
|
|
320
|
+
* Parses XML string data into a DOM Document object.
|
|
321
|
+
* @param {object} data - The XML string data to parse.
|
|
322
|
+
* @returns {Document} The parsed DOM Document, or null if parsing failed.
|
|
320
323
|
*/
|
|
321
324
|
parseXml(data: object): Document;
|
|
322
325
|
/**
|
|
323
|
-
*
|
|
326
|
+
* Updates the preload sprite's progress indicator.
|
|
324
327
|
*/
|
|
325
328
|
updateProgress(): void;
|
|
326
329
|
/**
|
|
327
|
-
*
|
|
328
|
-
* @param {string} message -
|
|
329
|
-
* @param {string|object} data -
|
|
330
|
+
* Logs a message to the console if logging is enabled.
|
|
331
|
+
* @param {string} message - The message to log.
|
|
332
|
+
* @param {string|object} data - Additional data to log with the message.
|
|
330
333
|
*/
|
|
331
334
|
log(message: string, data?: string | object): void;
|
|
332
335
|
/**
|
|
333
|
-
*
|
|
334
|
-
* @returns {number}
|
|
336
|
+
* Gets the number of files that have been loaded.
|
|
337
|
+
* @returns {number} The total number of loaded files.
|
|
335
338
|
*/
|
|
336
339
|
totalLoadedFiles(): number;
|
|
337
340
|
/**
|
|
338
|
-
*
|
|
339
|
-
* @returns {number}
|
|
341
|
+
* Gets the number of files that are still queued for loading.
|
|
342
|
+
* @returns {number} The total number of queued files.
|
|
340
343
|
*/
|
|
341
344
|
totalQueuedFiles(): number;
|
|
342
345
|
/**
|
|
343
|
-
*
|
|
344
|
-
* @returns {number}
|
|
346
|
+
* Gets the number of pack files that have been loaded.
|
|
347
|
+
* @returns {number} The total number of loaded pack files.
|
|
345
348
|
*/
|
|
346
349
|
totalLoadedPacks(): number;
|
|
347
350
|
/**
|
|
348
|
-
*
|
|
349
|
-
* @returns {number}
|
|
351
|
+
* Gets the number of pack files that are still queued for loading.
|
|
352
|
+
* @returns {number} The total number of queued pack files.
|
|
350
353
|
*/
|
|
351
354
|
totalQueuedPacks(): number;
|
|
352
355
|
/**
|
|
353
|
-
*
|
|
354
|
-
* @returns {number}
|
|
356
|
+
* Gets the loading progress as a percentage (0-100).
|
|
357
|
+
* @returns {number} The current loading progress as a percentage.
|
|
355
358
|
*/
|
|
356
359
|
get progressFloat(): number;
|
|
357
360
|
/**
|
|
358
|
-
*
|
|
359
|
-
* @returns {number}
|
|
361
|
+
* Gets the loading progress as a rounded percentage (0-100).
|
|
362
|
+
* @returns {number} The current loading progress as a rounded percentage.
|
|
360
363
|
*/
|
|
361
364
|
get progress(): number;
|
|
362
365
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/loader.js"],"names":[],"mappings":"AAOA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAmClC;IAhCC,+BAAgB;IAChB,kCAAuB;IACvB,mBAAsB;IACtB,kBAAqB;IACrB,oBAAsB;IACtB,iBAAiB;IACjB,mBAAsB;IACtB;;;;;;MAAyB;IACzB,qBAAwB;IACxB,gBAAiB;IACjB,aAAc;IACd;;;;MAIC;IACD,oBAA+B;IAC/B,uBAAkC;IAClC,uBAAkC;IAClC,oBAA+B;IAC/B,uBAAkC;IAClC,oBAA+B;IAC/B,0BAAuE;IACvE,4BAA4B;IAC5B,iBAAmB;IACnB,oBAAsB;IACtB,wBAAwB;IACxB,0BAA6B;IAC7B,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,yBAAyB;IAG3B;;;;OAIG;IACH,yBAHW,OAAO,qBAAqB,EAAE,KAAK,cACnC,MAAM,QAmBhB;IAED;;OAEG;IACH,eAIC;IAED;;;;;OAKG;IACH,qBAJW,MAAM,OACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAgBlB;IAED;;;;;OAKG;IACH,eAJW,MAAM,OACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/loader.js"],"names":[],"mappings":"AAOA;IACE;;;OAGG;IACH,kBAFW,OAAO,WAAW,EAAE,IAAI,EAmClC;IAhCC,+BAAgB;IAChB,kCAAuB;IACvB,mBAAsB;IACtB,kBAAqB;IACrB,oBAAsB;IACtB,iBAAiB;IACjB,mBAAsB;IACtB;;;;;;MAAyB;IACzB,qBAAwB;IACxB,gBAAiB;IACjB,aAAc;IACd;;;;MAIC;IACD,oBAA+B;IAC/B,uBAAkC;IAClC,uBAAkC;IAClC,oBAA+B;IAC/B,uBAAkC;IAClC,oBAA+B;IAC/B,0BAAuE;IACvE,4BAA4B;IAC5B,iBAAmB;IACnB,oBAAsB;IACtB,wBAAwB;IACxB,0BAA6B;IAC7B,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,yBAAyB;IAG3B;;;;OAIG;IACH,yBAHW,OAAO,qBAAqB,EAAE,KAAK,cACnC,MAAM,QAmBhB;IAED;;OAEG;IACH,eAIC;IAED;;;;;OAKG;IACH,qBAJW,MAAM,OACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAgBlB;IAED;;;;;OAKG;IACH,eAJW,MAAM,OACN,MAAM,GACJ;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAQhD;IAED;;;;OAIG;IACH,aAHW,OAAO,gBACP,OAAO,QAuBjB;IAED;;;;;;;;;OASG;IACH,oBAR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-
{"version":3,"file":"loader_parser.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/loader_parser.js"],"names":[],"mappings":"AASO,
|
|
1
|
+
{"version":3,"file":"loader_parser.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/loader_parser.js"],"names":[],"mappings":"AASO,gDAJM,OAAO,kCAAkC,EAAE,WAAW,kBACtD,MAAM,GACJ,MAAM,CAQpB;AAUM,mCANM,MAAM,eACN,OAAO,kCAAkC,EAAE,WAAW,YACtD,MAAM,YACN,MAAM,GACJ,MAAM,CAgCpB;AAUM,gCANM,MAAM,eACN,OAAO,kCAAkC,EAAE,WAAW,YACtD,MAAM,YACN,MAAM,GACJ,MAAM,CAIpB;AAUM,qCANM,MAAM,eACN,OAAO,kCAAkC,EAAE,WAAW,YACtD,MAAM,YACN,MAAM,GACJ,MAAM,CA4BpB"}
|
|
@@ -16,7 +16,7 @@ export class RequestAnimationFrame {
|
|
|
16
16
|
stop: () => void;
|
|
17
17
|
/**
|
|
18
18
|
* Performs an animation frame request.
|
|
19
|
-
* @param {number} rafTime -
|
|
19
|
+
* @param {number} rafTime - The timestamp provided by the browser's animation frame.
|
|
20
20
|
*/
|
|
21
21
|
update: (rafTime: number) => void;
|
|
22
22
|
}
|
|
@@ -43,7 +43,8 @@ export class ScaleManager {
|
|
|
43
43
|
bounds: Rectangle;
|
|
44
44
|
aspectRatio: number;
|
|
45
45
|
sourceAspectRatio: number;
|
|
46
|
-
|
|
46
|
+
/** @type {Event | null | undefined} */
|
|
47
|
+
event: Event | null | undefined;
|
|
47
48
|
windowConstraints: {
|
|
48
49
|
right: string;
|
|
49
50
|
bottom: string;
|
|
@@ -288,18 +289,18 @@ export class ScaleManager {
|
|
|
288
289
|
fullScreenChange(event: Event): void;
|
|
289
290
|
/**
|
|
290
291
|
* TBD.
|
|
291
|
-
* @param {Event} event - TBD.
|
|
292
|
+
* @param {Event} [event] - TBD.
|
|
292
293
|
*/
|
|
293
|
-
fullScreenError(event
|
|
294
|
+
fullScreenError(event?: Event): void;
|
|
294
295
|
/**
|
|
295
296
|
* TBD.
|
|
296
297
|
*/
|
|
297
298
|
destroy(): void;
|
|
298
299
|
/**
|
|
299
300
|
* TBD.
|
|
300
|
-
* @returns {
|
|
301
|
+
* @returns {ParentNode | null} TBD.
|
|
301
302
|
*/
|
|
302
|
-
get boundingParent():
|
|
303
|
+
get boundingParent(): ParentNode | null;
|
|
303
304
|
/**
|
|
304
305
|
* TBD.
|
|
305
306
|
* @returns {number} TBD.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scale_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/scale_manager.js"],"names":[],"mappings":"AAMA;IACE;;;;;OAKG;IACH,kBAJW,OAAO,WAAW,EAAE,IAAI,SACxB,MAAM,UACN,MAAM,
|
|
1
|
+
{"version":3,"file":"scale_manager.d.ts","sourceRoot":"","sources":["../../../src/phaser/core/scale_manager.js"],"names":[],"mappings":"AAMA;IACE;;;;;OAKG;IACH,kBAJW,OAAO,WAAW,EAAE,IAAI,SACxB,MAAM,UACN,MAAM,EA+EhB;IA5EC,+BAAgB;IAChB,SAA+B;IAC/B,cAAc;IACd,eAAe;IACf,iBAAoB;IACpB,iBAAoB;IACpB,kBAAqB;IACrB,kBAAqB;IACrB,cAAyB;IACzB,wBAA2B;IAC3B,uBAA0B;IAC1B,8BAAiC;IACjC,gCAAmC;IACnC,8BAAiC;IACjC,4BAAuC;IACvC,kCAA6C;IAC7C,kCAA6C;IAC7C,gCAAmC;IACnC,sBAA4B;IAC5B,yCAAoC;IACpC,yBAAoC;IACpC,2BAAsC;IACtC,0BAAqC;IACrC,0BAAwD;IACxD,mBAAkC;IAClC,2BAA0C;IAC1C;;;;;;;MAOC;IACD,kBAA6B;IAC7B,oBAAoB;IACpB,0BAA0B;IAC1B,uCAAuC;IACvC,OADW,KAAK,GAAG,IAAI,GAAG,SAAS,CAClB;IACjB;;;MAGC;IACD;;;;;;MAMC;IACD,mBAA2B;IAC3B,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