@vpmedia/phaser 1.21.0 → 1.22.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/README.md +1 -1
- package/package.json +1 -1
- package/src/phaser/core/animation.js +3 -3
- package/src/phaser/core/animation_manager.js +3 -3
- package/src/phaser/core/animation_parser.js +2 -2
- package/src/phaser/core/cache.js +2 -2
- package/src/phaser/core/dom.js +1 -1
- package/src/phaser/core/event_manager.js +1 -1
- package/src/phaser/core/factory.js +1 -1
- package/src/phaser/core/frame_data.js +7 -7
- package/src/phaser/core/input.js +3 -3
- package/src/phaser/core/input_handler.js +15 -15
- package/src/phaser/core/input_mouse.js +1 -1
- package/src/phaser/core/input_mspointer.js +1 -1
- package/src/phaser/core/input_pointer.js +2 -2
- package/src/phaser/core/input_touch.js +1 -1
- package/src/phaser/core/loader.js +1 -1
- package/src/phaser/core/raf.js +1 -1
- package/src/phaser/core/scale_manager.js +1 -1
- package/src/phaser/core/scene_manager.js +1 -1
- package/src/phaser/core/signal_binding.js +2 -2
- package/src/phaser/core/sound.js +1 -1
- package/src/phaser/core/sound_manager.js +1 -1
- package/src/phaser/core/sound_sprite.js +3 -3
- package/src/phaser/core/stage.js +1 -1
- package/src/phaser/core/time.js +1 -1
- package/src/phaser/core/timer.js +1 -1
- package/src/phaser/core/timer_event.js +1 -1
- package/src/phaser/core/tween.js +3 -3
- package/src/phaser/core/tween_data.js +1 -1
- package/src/phaser/core/tween_manager.js +1 -1
- package/src/phaser/core/world.js +1 -1
- package/src/phaser/display/bitmap_text.js +1 -1
- package/src/phaser/display/button.js +1 -1
- package/src/phaser/display/canvas/renderer.js +3 -3
- package/src/phaser/display/display_object.js +1 -1
- package/src/phaser/display/graphics.js +3 -3
- package/src/phaser/display/group.js +1 -1
- package/src/phaser/display/image.js +5 -5
- package/src/phaser/display/sprite_batch.js +1 -1
- package/src/phaser/display/sprite_util.js +2 -2
- package/src/phaser/display/text.js +2 -2
- package/src/phaser/display/webgl/fast_sprite_batch.js +2 -2
- package/src/phaser/display/webgl/render_texture.js +1 -1
- package/src/phaser/display/webgl/renderer.js +5 -5
- package/src/phaser/display/webgl/sprite_batch.js +2 -2
- package/src/phaser/display/webgl/stencil_manager.js +6 -6
- package/src/phaser/display/webgl/texture.js +1 -1
- package/types/phaser/core/animation.d.ts +8 -11
- package/types/phaser/core/animation.d.ts.map +1 -1
- package/types/phaser/core/animation_manager.d.ts +10 -12
- package/types/phaser/core/animation_manager.d.ts.map +1 -1
- package/types/phaser/core/animation_parser.d.ts +4 -5
- package/types/phaser/core/animation_parser.d.ts.map +1 -1
- package/types/phaser/core/cache.d.ts +70 -48
- package/types/phaser/core/cache.d.ts.map +1 -1
- package/types/phaser/core/dom.d.ts +8 -9
- package/types/phaser/core/dom.d.ts.map +1 -1
- package/types/phaser/core/event_manager.d.ts +3 -4
- package/types/phaser/core/event_manager.d.ts.map +1 -1
- package/types/phaser/core/factory.d.ts +3 -4
- package/types/phaser/core/factory.d.ts.map +1 -1
- package/types/phaser/core/frame_data.d.ts +12 -13
- package/types/phaser/core/frame_data.d.ts.map +1 -1
- package/types/phaser/core/input.d.ts +22 -23
- package/types/phaser/core/input.d.ts.map +1 -1
- package/types/phaser/core/input_handler.d.ts +34 -37
- package/types/phaser/core/input_handler.d.ts.map +1 -1
- package/types/phaser/core/input_mouse.d.ts +5 -6
- package/types/phaser/core/input_mouse.d.ts.map +1 -1
- package/types/phaser/core/input_mspointer.d.ts +4 -5
- package/types/phaser/core/input_mspointer.d.ts.map +1 -1
- package/types/phaser/core/input_pointer.d.ts +5 -6
- package/types/phaser/core/input_pointer.d.ts.map +1 -1
- package/types/phaser/core/input_touch.d.ts +4 -5
- package/types/phaser/core/input_touch.d.ts.map +1 -1
- package/types/phaser/core/loader.d.ts +104 -105
- package/types/phaser/core/loader.d.ts.map +1 -1
- package/types/phaser/core/raf.d.ts +3 -4
- package/types/phaser/core/raf.d.ts.map +1 -1
- package/types/phaser/core/scale_manager.d.ts +3 -4
- package/types/phaser/core/scale_manager.d.ts.map +1 -1
- package/types/phaser/core/scene_manager.d.ts +5 -6
- package/types/phaser/core/scene_manager.d.ts.map +1 -1
- package/types/phaser/core/signal_binding.d.ts +22 -15
- package/types/phaser/core/signal_binding.d.ts.map +1 -1
- package/types/phaser/core/sound.d.ts +3 -4
- package/types/phaser/core/sound.d.ts.map +1 -1
- package/types/phaser/core/sound_manager.d.ts +3 -4
- package/types/phaser/core/sound_manager.d.ts.map +1 -1
- package/types/phaser/core/sound_sprite.d.ts +7 -9
- package/types/phaser/core/sound_sprite.d.ts.map +1 -1
- package/types/phaser/core/stage.d.ts +3 -4
- package/types/phaser/core/stage.d.ts.map +1 -1
- package/types/phaser/core/time.d.ts +3 -4
- package/types/phaser/core/time.d.ts.map +1 -1
- package/types/phaser/core/timer.d.ts +3 -4
- package/types/phaser/core/timer.d.ts.map +1 -1
- package/types/phaser/core/timer_event.d.ts +3 -4
- package/types/phaser/core/timer_event.d.ts.map +1 -1
- package/types/phaser/core/tween.d.ts +16 -19
- package/types/phaser/core/tween.d.ts.map +1 -1
- package/types/phaser/core/tween_data.d.ts +5 -5
- package/types/phaser/core/tween_data.d.ts.map +1 -1
- package/types/phaser/core/tween_manager.d.ts +3 -4
- package/types/phaser/core/tween_manager.d.ts.map +1 -1
- package/types/phaser/core/world.d.ts +2 -3
- package/types/phaser/core/world.d.ts.map +1 -1
- package/types/phaser/display/bitmap_text.d.ts +3 -4
- package/types/phaser/display/bitmap_text.d.ts.map +1 -1
- package/types/phaser/display/button.d.ts +2 -3
- package/types/phaser/display/button.d.ts.map +1 -1
- package/types/phaser/display/canvas/renderer.d.ts +9 -10
- package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +4 -3
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/graphics.d.ts +13 -15
- package/types/phaser/display/graphics.d.ts.map +1 -1
- package/types/phaser/display/group.d.ts +3 -4
- package/types/phaser/display/group.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +22 -22
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/sprite_batch.d.ts +3 -4
- package/types/phaser/display/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/sprite_util.d.ts +4 -5
- package/types/phaser/display/sprite_util.d.ts.map +1 -1
- package/types/phaser/display/text.d.ts +63 -53
- package/types/phaser/display/text.d.ts.map +1 -1
- package/types/phaser/display/webgl/abstract_filter.d.ts +3 -3
- package/types/phaser/display/webgl/abstract_filter.d.ts.map +1 -1
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts +6 -6
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics.d.ts +13 -12
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/types/phaser/display/webgl/render_texture.d.ts +3 -3
- package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/renderer.d.ts +12 -13
- package/types/phaser/display/webgl/renderer.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader/normal.d.ts +2 -2
- package/types/phaser/display/webgl/shader/normal.d.ts.map +1 -1
- package/types/phaser/display/webgl/shader_manager.d.ts +6 -5
- package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/sprite_batch.d.ts +5 -7
- package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/stencil_manager.d.ts +9 -9
- package/types/phaser/display/webgl/stencil_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/texture.d.ts +3 -4
- package/types/phaser/display/webgl/texture.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @vpmedia/phaser
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/js/@vpmedia%2Fphaser)
|
|
4
4
|
[](https://github.com/vpmedia/phaser/actions/workflows/node.js.yml)
|
|
5
5
|
|
|
6
6
|
@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "@vpmedia/phaser is the modern ECMAScript port of the popular Phaser game engine v2.6.2",
|
|
5
5
|
"author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -3,10 +3,10 @@ import { Signal } from './signal';
|
|
|
3
3
|
export class Animation {
|
|
4
4
|
/**
|
|
5
5
|
* TBD.
|
|
6
|
-
* @param {Game} game - TBD.
|
|
6
|
+
* @param {import('./game').Game} game - TBD.
|
|
7
7
|
* @param {Image} parent - TBD.
|
|
8
8
|
* @param {string} name - TBD.
|
|
9
|
-
* @param {FrameData} frameData - TBD.
|
|
9
|
+
* @param {import('./frame_data').FrameData} frameData - TBD.
|
|
10
10
|
* @param {string[]|number[]} frames - TBD.
|
|
11
11
|
* @param {number} frameRate - TBD.
|
|
12
12
|
* @param {boolean} loop - TBD.
|
|
@@ -308,7 +308,7 @@ export class Animation {
|
|
|
308
308
|
|
|
309
309
|
/**
|
|
310
310
|
* TBD.
|
|
311
|
-
* @param {FrameData} frameData - TBD.
|
|
311
|
+
* @param {import('./frame_data').FrameData} frameData - TBD.
|
|
312
312
|
*/
|
|
313
313
|
updateFrameData(frameData) {
|
|
314
314
|
this._frameData = frameData;
|
|
@@ -36,7 +36,7 @@ export class AnimationManager {
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* TBD.
|
|
39
|
-
* @param {FrameData} frameData - TBD.
|
|
39
|
+
* @param {import('./frame_data').FrameData} frameData - TBD.
|
|
40
40
|
* @param {number|string} frame - TBD.
|
|
41
41
|
* @returns {boolean} TBD.
|
|
42
42
|
*/
|
|
@@ -66,7 +66,7 @@ export class AnimationManager {
|
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* TBD.
|
|
69
|
-
* @param {FrameData} frameData - TBD.
|
|
69
|
+
* @param {import('./frame_data').FrameData} frameData - TBD.
|
|
70
70
|
* @param {number|string} frame - TBD.
|
|
71
71
|
* @returns {boolean} TBD.
|
|
72
72
|
*/
|
|
@@ -246,7 +246,7 @@ export class AnimationManager {
|
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* TBD.
|
|
249
|
-
* @returns {FrameData} TBD.
|
|
249
|
+
* @returns {import('./frame_data').FrameData} TBD.
|
|
250
250
|
*/
|
|
251
251
|
get frameData() {
|
|
252
252
|
return this._frameData;
|
|
@@ -3,7 +3,7 @@ import { FrameData } from './frame_data';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* TBD.
|
|
6
|
-
* @param {Game} game - TBD.
|
|
6
|
+
* @param {import('./game').Game} game - TBD.
|
|
7
7
|
* @param {string} key - TBD.
|
|
8
8
|
* @param {number} frameWidth - TBD.
|
|
9
9
|
* @param {number} frameHeight - TBD.
|
|
@@ -58,7 +58,7 @@ export function spriteSheet(game, key, frameWidth, frameHeight, frameMax, margin
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* TBD.
|
|
61
|
-
* @param {Game} game - TBD.
|
|
61
|
+
* @param {import('./game').Game} game - TBD.
|
|
62
62
|
* @param {object} json - TBD.
|
|
63
63
|
* @returns {object} TBD.
|
|
64
64
|
*/
|
package/src/phaser/core/cache.js
CHANGED
|
@@ -20,7 +20,7 @@ export const RENDER_TEXTURE = 9;
|
|
|
20
20
|
export class Cache {
|
|
21
21
|
/**
|
|
22
22
|
* TBD.
|
|
23
|
-
* @param {Game} game - TBD.
|
|
23
|
+
* @param {import('./game').Game} game - TBD.
|
|
24
24
|
*/
|
|
25
25
|
constructor(game) {
|
|
26
26
|
this.game = game;
|
|
@@ -512,7 +512,7 @@ export class Cache {
|
|
|
512
512
|
/**
|
|
513
513
|
* TBD.
|
|
514
514
|
* @param {string} key - TBD.
|
|
515
|
-
* @returns {RenderTexture} TBD.
|
|
515
|
+
* @returns {import('../display/webgl/render_texture').RenderTexture} TBD.
|
|
516
516
|
*/
|
|
517
517
|
getRenderTexture(key) {
|
|
518
518
|
return this.getItem(key, RENDER_TEXTURE, 'getRenderTexture');
|
package/src/phaser/core/dom.js
CHANGED
|
@@ -6,7 +6,7 @@ export class FrameData {
|
|
|
6
6
|
*/
|
|
7
7
|
constructor() {
|
|
8
8
|
/**
|
|
9
|
-
* @type {Frame[]}
|
|
9
|
+
* @type {import('./frame').Frame[]}
|
|
10
10
|
*/
|
|
11
11
|
this._frames = [];
|
|
12
12
|
/**
|
|
@@ -17,8 +17,8 @@ export class FrameData {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* TBD.
|
|
20
|
-
* @param {Frame} frame - TBD.
|
|
21
|
-
* @returns {Frame} TBD.
|
|
20
|
+
* @param {import('./frame').Frame} frame - TBD.
|
|
21
|
+
* @returns {import('./frame').Frame} TBD.
|
|
22
22
|
*/
|
|
23
23
|
addFrame(frame) {
|
|
24
24
|
frame.index = this._frames.length;
|
|
@@ -32,7 +32,7 @@ export class FrameData {
|
|
|
32
32
|
/**
|
|
33
33
|
* TBD.
|
|
34
34
|
* @param {number} index - TBD.
|
|
35
|
-
* @returns {Frame} TBD.
|
|
35
|
+
* @returns {import('./frame').Frame} TBD.
|
|
36
36
|
*/
|
|
37
37
|
getFrame(index = 0) {
|
|
38
38
|
if (index >= this._frames.length) {
|
|
@@ -44,7 +44,7 @@ export class FrameData {
|
|
|
44
44
|
/**
|
|
45
45
|
* TBD.
|
|
46
46
|
* @param {string} name - TBD.
|
|
47
|
-
* @returns {Frame} TBD.
|
|
47
|
+
* @returns {import('./frame').Frame} TBD.
|
|
48
48
|
*/
|
|
49
49
|
getFrameByName(name) {
|
|
50
50
|
if (typeof this._frameNames[name] === 'number') {
|
|
@@ -77,8 +77,8 @@ export class FrameData {
|
|
|
77
77
|
* TBD.
|
|
78
78
|
* @param {number} start - TBD.
|
|
79
79
|
* @param {number} end - TBD.
|
|
80
|
-
* @param {Frame[]} output - TBD.
|
|
81
|
-
* @returns {Frame[]} TBD.
|
|
80
|
+
* @param {import('./frame').Frame[]} output - TBD.
|
|
81
|
+
* @returns {import('./frame').Frame[]} TBD.
|
|
82
82
|
*/
|
|
83
83
|
getFrameRange(start, end, output = null) {
|
|
84
84
|
const result = output || [];
|
package/src/phaser/core/input.js
CHANGED
|
@@ -16,7 +16,7 @@ const MAX_POINTERS = 10;
|
|
|
16
16
|
export class Input {
|
|
17
17
|
/**
|
|
18
18
|
* TBD.
|
|
19
|
-
* @param {Game} game - TBD.
|
|
19
|
+
* @param {import('./game').Game} game - TBD.
|
|
20
20
|
*/
|
|
21
21
|
constructor(game) {
|
|
22
22
|
this.game = game;
|
|
@@ -360,7 +360,7 @@ export class Input {
|
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
362
|
* TBD.
|
|
363
|
-
* @param {DisplayObject} displayObject - TBD.
|
|
363
|
+
* @param {import('../display/display_object').DisplayObject} displayObject - TBD.
|
|
364
364
|
* @param {Pointer} pointer - TBD.
|
|
365
365
|
* @param {Point} output - TBD.
|
|
366
366
|
* @returns {Point} TBD.
|
|
@@ -377,7 +377,7 @@ export class Input {
|
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
379
|
* TBD.
|
|
380
|
-
* @param {DisplayObject} displayObject - TBD.
|
|
380
|
+
* @param {import('../display/display_object').DisplayObject} displayObject - TBD.
|
|
381
381
|
* @param {Pointer} pointer - TBD.
|
|
382
382
|
* @param {Point} localPoint - TBD.
|
|
383
383
|
* @returns {boolean} TBD.
|
|
@@ -72,7 +72,7 @@ export class InputHandler {
|
|
|
72
72
|
* TBD.
|
|
73
73
|
* @param {number} priority - TBD.
|
|
74
74
|
* @param {boolean} useHandCursor - TBD.
|
|
75
|
-
* @returns {DisplayObject} TBD.
|
|
75
|
+
* @returns {import('../display/display_object').DisplayObject} TBD.
|
|
76
76
|
*/
|
|
77
77
|
start(priority = 0, useHandCursor = false) {
|
|
78
78
|
// Turning on
|
|
@@ -343,7 +343,7 @@ export class InputHandler {
|
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
345
|
* TBD.
|
|
346
|
-
* @param {Pointer} pointer - TBD.
|
|
346
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
347
347
|
* @param {boolean} fastTest - TBD.
|
|
348
348
|
* @returns {boolean} TBD.
|
|
349
349
|
*/
|
|
@@ -372,7 +372,7 @@ export class InputHandler {
|
|
|
372
372
|
|
|
373
373
|
/**
|
|
374
374
|
* TBD.
|
|
375
|
-
* @param {Pointer} pointer - TBD.
|
|
375
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
376
376
|
* @param {boolean} fastTest - TBD.
|
|
377
377
|
* @returns {boolean} TBD.
|
|
378
378
|
*/
|
|
@@ -402,7 +402,7 @@ export class InputHandler {
|
|
|
402
402
|
* TBD.
|
|
403
403
|
* @param {number} x - TBD.
|
|
404
404
|
* @param {number} y - TBD.
|
|
405
|
-
* @param {Pointer} pointer - TBD.
|
|
405
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
406
406
|
* @returns {boolean} TBD.
|
|
407
407
|
*/
|
|
408
408
|
checkPixel(x, y, pointer) {
|
|
@@ -451,7 +451,7 @@ export class InputHandler {
|
|
|
451
451
|
|
|
452
452
|
/**
|
|
453
453
|
* TBD.
|
|
454
|
-
* @param {Pointer} pointer - TBD.
|
|
454
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
455
455
|
* @returns {boolean} TBD.
|
|
456
456
|
*/
|
|
457
457
|
update(pointer) {
|
|
@@ -488,7 +488,7 @@ export class InputHandler {
|
|
|
488
488
|
|
|
489
489
|
/**
|
|
490
490
|
* TBD.
|
|
491
|
-
* @param {Pointer} pointer - TBD.
|
|
491
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
492
492
|
* @param {boolean} silent - TBD.
|
|
493
493
|
*/
|
|
494
494
|
_pointerOverHandler(pointer, silent) {
|
|
@@ -519,7 +519,7 @@ export class InputHandler {
|
|
|
519
519
|
|
|
520
520
|
/**
|
|
521
521
|
* TBD.
|
|
522
|
-
* @param {Pointer} pointer - TBD.
|
|
522
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
523
523
|
* @param {boolean} silent - TBD.
|
|
524
524
|
*/
|
|
525
525
|
_pointerOutHandler(pointer, silent = false) {
|
|
@@ -545,7 +545,7 @@ export class InputHandler {
|
|
|
545
545
|
|
|
546
546
|
/**
|
|
547
547
|
* TBD.
|
|
548
|
-
* @param {Pointer} pointer - TBD.
|
|
548
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
549
549
|
*/
|
|
550
550
|
_touchedHandler(pointer) {
|
|
551
551
|
if (this.sprite === null) {
|
|
@@ -597,7 +597,7 @@ export class InputHandler {
|
|
|
597
597
|
|
|
598
598
|
/**
|
|
599
599
|
* TBD.
|
|
600
|
-
* @param {Pointer} pointer - TBD.
|
|
600
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
601
601
|
*/
|
|
602
602
|
dragTimeElapsed(pointer) {
|
|
603
603
|
this._dragTimePass = true;
|
|
@@ -610,7 +610,7 @@ export class InputHandler {
|
|
|
610
610
|
|
|
611
611
|
/**
|
|
612
612
|
* TBD.
|
|
613
|
-
* @param {Pointer} pointer - TBD.
|
|
613
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
614
614
|
*/
|
|
615
615
|
_releasedHandler(pointer) {
|
|
616
616
|
if (this.sprite === null) {
|
|
@@ -658,7 +658,7 @@ export class InputHandler {
|
|
|
658
658
|
|
|
659
659
|
/**
|
|
660
660
|
* TBD.
|
|
661
|
-
* @param {Pointer} pointer - TBD.
|
|
661
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
662
662
|
* @param {boolean} fromStart - TBD.
|
|
663
663
|
* @returns {boolean} TBD.
|
|
664
664
|
*/
|
|
@@ -766,8 +766,8 @@ export class InputHandler {
|
|
|
766
766
|
* @param {boolean} bringToTop - TBD.
|
|
767
767
|
* @param {boolean} pixelPerfect - TBD.
|
|
768
768
|
* @param {number} alphaThreshold - TBD.
|
|
769
|
-
* @param {Rectangle} boundsRect - TBD.
|
|
770
|
-
* @param {DisplayObject} boundsSprite - TBD.
|
|
769
|
+
* @param {import('../geom/rectangle').Rectangle} boundsRect - TBD.
|
|
770
|
+
* @param {import('../display/display_object').DisplayObject} boundsSprite - TBD.
|
|
771
771
|
*/
|
|
772
772
|
enableDrag(
|
|
773
773
|
lockCenter = false,
|
|
@@ -809,7 +809,7 @@ export class InputHandler {
|
|
|
809
809
|
|
|
810
810
|
/**
|
|
811
811
|
* TBD.
|
|
812
|
-
* @param {Pointer} pointer - TBD.
|
|
812
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
813
813
|
*/
|
|
814
814
|
startDrag(pointer) {
|
|
815
815
|
const x = this.sprite.x;
|
|
@@ -866,7 +866,7 @@ export class InputHandler {
|
|
|
866
866
|
|
|
867
867
|
/**
|
|
868
868
|
* TBD.
|
|
869
|
-
* @param {Pointer} pointer - TBD.
|
|
869
|
+
* @param {import('./input_pointer').Pointer} pointer - TBD.
|
|
870
870
|
*/
|
|
871
871
|
stopDrag(pointer) {
|
|
872
872
|
this.isDragged = false;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
export class Pointer {
|
|
13
13
|
/**
|
|
14
14
|
* TBD.
|
|
15
|
-
* @param {Game} game - TBD.
|
|
15
|
+
* @param {import('./game').Game} game - TBD.
|
|
16
16
|
* @param {number} id - TBD.
|
|
17
17
|
* @param {number} pointerMode - TBD.
|
|
18
18
|
*/
|
|
@@ -301,7 +301,7 @@ export class Pointer {
|
|
|
301
301
|
|
|
302
302
|
/**
|
|
303
303
|
* TBD.
|
|
304
|
-
* @param {InputHandler} newTarget - TBD.
|
|
304
|
+
* @param {import('./input_handler').InputHandler} newTarget - TBD.
|
|
305
305
|
* @param {boolean} silent - TBD.
|
|
306
306
|
*/
|
|
307
307
|
swapTarget(newTarget, silent = false) {
|
package/src/phaser/core/raf.js
CHANGED
|
@@ -7,7 +7,7 @@ import { SCALE_OFF, SCALE_RESIZE, SCALE_EXACT_FIT, SCALE_USER, SCALE_SHOW_ALL, R
|
|
|
7
7
|
export class ScaleManager {
|
|
8
8
|
/**
|
|
9
9
|
* TBD.
|
|
10
|
-
* @param {Game} game - TBD.
|
|
10
|
+
* @param {import('./game').Game} game - TBD.
|
|
11
11
|
* @param {number} width - TBD.
|
|
12
12
|
* @param {number} height - TBD.
|
|
13
13
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class SignalBinding {
|
|
2
2
|
/**
|
|
3
3
|
* TBD.
|
|
4
|
-
* @param {Signal} signal - TBD.
|
|
4
|
+
* @param {import('./signal').Signal} signal - TBD.
|
|
5
5
|
* @param {Function} listener - TBD.
|
|
6
6
|
* @param {boolean} isOnce - TBD.
|
|
7
7
|
* @param {object} listenerContext - TBD.
|
|
@@ -76,7 +76,7 @@ export class SignalBinding {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* TBD.
|
|
79
|
-
* @returns {Signal} TBD.
|
|
79
|
+
* @returns {import('./signal').Signal} TBD.
|
|
80
80
|
*/
|
|
81
81
|
getSignal() {
|
|
82
82
|
return this._signal;
|
package/src/phaser/core/sound.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class SoundSprite {
|
|
2
2
|
/**
|
|
3
3
|
* TBD.
|
|
4
|
-
* @param {Game} game - TBD.
|
|
4
|
+
* @param {import('./game').Game} game - TBD.
|
|
5
5
|
* @param {string} key - TBD.
|
|
6
6
|
*/
|
|
7
7
|
constructor(game, key) {
|
|
@@ -28,7 +28,7 @@ export class SoundSprite {
|
|
|
28
28
|
* TBD.
|
|
29
29
|
* @param {string} marker - TBD.
|
|
30
30
|
* @param {number} volume - TBD.
|
|
31
|
-
* @returns {Sound} TBD.
|
|
31
|
+
* @returns {import('./sound').Sound} TBD.
|
|
32
32
|
*/
|
|
33
33
|
play(marker, volume = 1) {
|
|
34
34
|
return this.sounds[marker].play(marker, null, volume);
|
|
@@ -51,7 +51,7 @@ export class SoundSprite {
|
|
|
51
51
|
/**
|
|
52
52
|
* TBD.
|
|
53
53
|
* @param {string} marker - TBD.
|
|
54
|
-
* @returns {Sound} TBD.
|
|
54
|
+
* @returns {import('./sound').Sound} TBD.
|
|
55
55
|
*/
|
|
56
56
|
get(marker) {
|
|
57
57
|
return this.sounds[marker];
|
package/src/phaser/core/stage.js
CHANGED
package/src/phaser/core/time.js
CHANGED
package/src/phaser/core/timer.js
CHANGED
package/src/phaser/core/tween.js
CHANGED
|
@@ -6,9 +6,9 @@ import { TWEEN_PENDING, TWEEN_RUNNING, TWEEN_COMPLETE, TWEEN_LOOPED } from './co
|
|
|
6
6
|
export class Tween {
|
|
7
7
|
/**
|
|
8
8
|
* TBD.
|
|
9
|
-
* @param {DisplayObject} target - TBD.
|
|
10
|
-
* @param {Game} game - TBD.
|
|
11
|
-
* @param {TweenManager} manager - TBD.
|
|
9
|
+
* @param {import('../display/display_object').DisplayObject} target - TBD.
|
|
10
|
+
* @param {import('./game').Game} game - TBD.
|
|
11
|
+
* @param {import('./tween_manager').TweenManager} manager - TBD.
|
|
12
12
|
*/
|
|
13
13
|
constructor(target, game, manager) {
|
|
14
14
|
this.game = game;
|
package/src/phaser/core/world.js
CHANGED
|
@@ -6,7 +6,7 @@ import { BITMAP_TEXT, SCALE_LINEAR, SCALE_NEAREST } from '../core/const';
|
|
|
6
6
|
export class BitmapText extends DisplayObject {
|
|
7
7
|
/**
|
|
8
8
|
* TBD.
|
|
9
|
-
* @param {Game} game - TBD.
|
|
9
|
+
* @param {import('../core/game').Game} game - TBD.
|
|
10
10
|
* @param {number} x - TBD.
|
|
11
11
|
* @param {number} y - TBD.
|
|
12
12
|
* @param {string} font - TBD.
|
|
@@ -12,7 +12,7 @@ const STATE_DISABLED = 'Disabled';
|
|
|
12
12
|
export class Button extends Image {
|
|
13
13
|
/**
|
|
14
14
|
* TBD.
|
|
15
|
-
* @param {Game} game - TBD.
|
|
15
|
+
* @param {import('../core/game').Game} game - TBD.
|
|
16
16
|
* @param {number} x - TBD.
|
|
17
17
|
* @param {number} y - TBD.
|
|
18
18
|
* @param {string} key - TBD.
|
|
@@ -27,7 +27,7 @@ import * as CanvasMaskManager from './masker';
|
|
|
27
27
|
export class CanvasRenderer {
|
|
28
28
|
/**
|
|
29
29
|
* TBD.
|
|
30
|
-
* @param {Game} game - TBD.
|
|
30
|
+
* @param {import('../../core/game').Game} game - TBD.
|
|
31
31
|
*/
|
|
32
32
|
constructor(game) {
|
|
33
33
|
detectCapabilities();
|
|
@@ -59,7 +59,7 @@ export class CanvasRenderer {
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* TBD.
|
|
62
|
-
* @param {Stage} root - TBD.
|
|
62
|
+
* @param {import('../../core/stage').Stage} root - TBD.
|
|
63
63
|
*/
|
|
64
64
|
render(root) {
|
|
65
65
|
if (!this.context) {
|
|
@@ -118,7 +118,7 @@ export class CanvasRenderer {
|
|
|
118
118
|
* TBD.
|
|
119
119
|
* @param {Image} displayObject - TBD.
|
|
120
120
|
* @param {CanvasRenderingContext2D} context - TBD.
|
|
121
|
-
* @param {Matrix} matrix - TBD.
|
|
121
|
+
* @param {import('../../geom/matrix').Matrix} matrix - TBD.
|
|
122
122
|
*/
|
|
123
123
|
renderDisplayObject(displayObject, context, matrix) {
|
|
124
124
|
this.renderSession.context = context || this.context;
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
export class Graphics extends DisplayObject {
|
|
28
28
|
/**
|
|
29
29
|
* TBD.
|
|
30
|
-
* @param {Game} game - TBD.
|
|
30
|
+
* @param {import('../core/game').Game} game - TBD.
|
|
31
31
|
* @param {number} x - TBD.
|
|
32
32
|
* @param {number} y - TBD.
|
|
33
33
|
*/
|
|
@@ -553,7 +553,7 @@ export class Graphics extends DisplayObject {
|
|
|
553
553
|
|
|
554
554
|
/**
|
|
555
555
|
* TBD.
|
|
556
|
-
* @param {Matrix} matrix - TBD.
|
|
556
|
+
* @param {import('../geom/matrix').Matrix} matrix - TBD.
|
|
557
557
|
* @returns {Rectangle} TBD.
|
|
558
558
|
*/
|
|
559
559
|
getBounds(matrix = null) {
|
|
@@ -789,7 +789,7 @@ export class Graphics extends DisplayObject {
|
|
|
789
789
|
|
|
790
790
|
/**
|
|
791
791
|
* TBD.
|
|
792
|
-
* @param shape - TBD.
|
|
792
|
+
* @param {object} shape - TBD.
|
|
793
793
|
* @returns {GraphicsData} TBD.
|
|
794
794
|
*/
|
|
795
795
|
drawShape(shape) {
|