@vpmedia/phaser 1.19.0 → 1.20.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 +2 -2
- package/src/phaser/core/cache.js +16 -37
- package/src/phaser/core/dom.js +3 -3
- package/src/phaser/core/input.js +12 -13
- package/src/phaser/core/input_handler.js +1 -2
- package/src/phaser/core/input_mouse.js +2 -3
- package/src/phaser/core/input_pointer.js +1 -2
- package/src/phaser/core/loader.js +69 -70
- package/src/phaser/core/scene_manager.js +1 -1
- package/src/phaser/core/signal_binding.js +7 -16
- package/src/phaser/core/tween.js +4 -5
- package/src/phaser/core/tween_data.js +1 -2
- package/src/phaser/display/canvas/renderer.js +5 -8
- package/src/phaser/display/display_object.js +0 -2
- package/src/phaser/display/graphics.js +4 -4
- package/src/phaser/display/image.js +4 -6
- package/src/phaser/display/text.js +30 -41
- package/src/phaser/display/webgl/abstract_filter.js +1 -1
- package/src/phaser/display/webgl/fast_sprite_batch.js +1 -3
- package/src/phaser/display/webgl/graphics.js +6 -6
- package/src/phaser/display/webgl/render_texture.js +1 -3
- package/src/phaser/display/webgl/renderer.js +5 -9
- package/src/phaser/display/webgl/shader/normal.js +1 -1
- package/src/phaser/display/webgl/shader_manager.js +2 -3
- package/src/phaser/display/webgl/sprite_batch.js +1 -2
- package/src/phaser/display/webgl/stencil_manager.js +6 -8
- package/typedefs/global.d.ts +1 -1
- package/types/phaser/core/cache.d.ts +44 -68
- package/types/phaser/core/cache.d.ts.map +1 -1
- package/types/phaser/core/dom.d.ts +6 -6
- package/types/phaser/core/dom.d.ts.map +1 -1
- package/types/phaser/core/input.d.ts +19 -20
- package/types/phaser/core/input.d.ts.map +1 -1
- package/types/phaser/core/input_handler.d.ts +4 -5
- package/types/phaser/core/input_handler.d.ts.map +1 -1
- package/types/phaser/core/input_mouse.d.ts +1 -1
- package/types/phaser/core/input_mouse.d.ts.map +1 -1
- package/types/phaser/core/input_pointer.d.ts +2 -3
- package/types/phaser/core/input_pointer.d.ts.map +1 -1
- package/types/phaser/core/loader.d.ts +103 -104
- package/types/phaser/core/loader.d.ts.map +1 -1
- package/types/phaser/core/scene_manager.d.ts +2 -2
- package/types/phaser/core/scene_manager.d.ts.map +1 -1
- package/types/phaser/core/signal_binding.d.ts +15 -23
- package/types/phaser/core/signal_binding.d.ts.map +1 -1
- package/types/phaser/core/tween.d.ts +8 -8
- package/types/phaser/core/tween.d.ts.map +1 -1
- package/types/phaser/core/tween_data.d.ts +5 -6
- package/types/phaser/core/tween_data.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 +7 -10
- package/types/phaser/display/canvas/renderer.d.ts.map +1 -1
- package/types/phaser/display/display_object.d.ts +3 -5
- package/types/phaser/display/display_object.d.ts.map +1 -1
- package/types/phaser/display/graphics.d.ts +6 -6
- package/types/phaser/display/graphics.d.ts.map +1 -1
- package/types/phaser/display/image.d.ts +11 -14
- package/types/phaser/display/image.d.ts.map +1 -1
- package/types/phaser/display/text.d.ts +50 -61
- 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 +2 -3
- package/types/phaser/display/webgl/fast_sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/graphics.d.ts +12 -13
- package/types/phaser/display/webgl/graphics.d.ts.map +1 -1
- package/types/phaser/display/webgl/render_texture.d.ts +3 -5
- package/types/phaser/display/webgl/render_texture.d.ts.map +1 -1
- package/types/phaser/display/webgl/renderer.d.ts +8 -12
- 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 +5 -6
- package/types/phaser/display/webgl/shader_manager.d.ts.map +1 -1
- package/types/phaser/display/webgl/sprite_batch.d.ts +2 -3
- package/types/phaser/display/webgl/sprite_batch.d.ts.map +1 -1
- package/types/phaser/display/webgl/stencil_manager.d.ts +9 -11
- package/types/phaser/display/webgl/stencil_manager.d.ts.map +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Signal } from './signal';
|
|
2
2
|
import { Rectangle } from '../geom/rectangle';
|
|
3
|
-
import { Image } from '../display/image';
|
|
4
3
|
import { canPlayAudio } from './device_util';
|
|
5
4
|
import { Game } from './game';
|
|
6
5
|
|
|
@@ -48,8 +47,8 @@ export class Loader {
|
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
49
|
* TBD.
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
50
|
+
* @param sprite - TBD.
|
|
51
|
+
* @param direction - TBD.
|
|
53
52
|
*/
|
|
54
53
|
setPreloadSprite(sprite, direction = 0) {
|
|
55
54
|
this.preloadSprite = {
|
|
@@ -81,7 +80,7 @@ export class Loader {
|
|
|
81
80
|
|
|
82
81
|
/**
|
|
83
82
|
* TBD.
|
|
84
|
-
* @param
|
|
83
|
+
* @param type - TBD.
|
|
85
84
|
* @param {string} key - TBD.
|
|
86
85
|
* @returns {boolean} TBD.
|
|
87
86
|
*/
|
|
@@ -91,7 +90,7 @@ export class Loader {
|
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
92
|
* TBD.
|
|
94
|
-
* @param
|
|
93
|
+
* @param type - TBD.
|
|
95
94
|
* @param {string} key - TBD.
|
|
96
95
|
* @returns {number} TBD.
|
|
97
96
|
*/
|
|
@@ -113,7 +112,7 @@ export class Loader {
|
|
|
113
112
|
|
|
114
113
|
/**
|
|
115
114
|
* TBD.
|
|
116
|
-
* @param
|
|
115
|
+
* @param type - TBD.
|
|
117
116
|
* @param {string} key - TBD.
|
|
118
117
|
* @returns {object} TBD.
|
|
119
118
|
*/
|
|
@@ -127,10 +126,10 @@ export class Loader {
|
|
|
127
126
|
|
|
128
127
|
/**
|
|
129
128
|
* TBD.
|
|
130
|
-
* @param
|
|
131
|
-
* @param
|
|
129
|
+
* @param hard
|
|
130
|
+
* @param clearEvents
|
|
132
131
|
*/
|
|
133
|
-
reset(hard
|
|
132
|
+
reset(hard, clearEvents = false) {
|
|
134
133
|
if (hard) {
|
|
135
134
|
this.preloadSprite = null;
|
|
136
135
|
}
|
|
@@ -155,12 +154,12 @@ export class Loader {
|
|
|
155
154
|
|
|
156
155
|
/**
|
|
157
156
|
* TBD.
|
|
158
|
-
* @param
|
|
157
|
+
* @param type - TBD.
|
|
159
158
|
* @param {string} key - TBD.
|
|
160
159
|
* @param {string} url - TBD.
|
|
161
|
-
* @param
|
|
162
|
-
* @param
|
|
163
|
-
* @param
|
|
160
|
+
* @param properties - TBD.
|
|
161
|
+
* @param overwrite - TBD.
|
|
162
|
+
* @param extension - TBD.
|
|
164
163
|
* @returns {Loader} TBD.
|
|
165
164
|
*/
|
|
166
165
|
addToFileList(type, key = '', url = null, properties = null, overwrite = false, extension = null) {
|
|
@@ -212,10 +211,10 @@ export class Loader {
|
|
|
212
211
|
|
|
213
212
|
/**
|
|
214
213
|
* TBD.
|
|
215
|
-
* @param
|
|
214
|
+
* @param type - TBD.
|
|
216
215
|
* @param {string} key - TBD.
|
|
217
216
|
* @param {string} url - TBD.
|
|
218
|
-
* @param
|
|
217
|
+
* @param properties - TBD.
|
|
219
218
|
* @returns {Loader} TBD.
|
|
220
219
|
*/
|
|
221
220
|
replaceInFileList(type, key, url, properties) {
|
|
@@ -226,7 +225,7 @@ export class Loader {
|
|
|
226
225
|
* TBD.
|
|
227
226
|
* @param {string} key - TBD.
|
|
228
227
|
* @param {string} url - TBD.
|
|
229
|
-
* @param
|
|
228
|
+
* @param data - TBD.
|
|
230
229
|
* @param {object} callbackContext - TBD.
|
|
231
230
|
* @returns {Loader} TBD.
|
|
232
231
|
*/
|
|
@@ -265,17 +264,17 @@ export class Loader {
|
|
|
265
264
|
* TBD.
|
|
266
265
|
* @param {string} key - TBD.
|
|
267
266
|
* @param {string} url - TBD.
|
|
268
|
-
* @param
|
|
267
|
+
* @param overwrite - TBD.
|
|
269
268
|
* @returns {Loader} TBD.
|
|
270
269
|
*/
|
|
271
|
-
image(key, url, overwrite
|
|
270
|
+
image(key, url, overwrite) {
|
|
272
271
|
return this.addToFileList('image', key, url, undefined, overwrite, '.png');
|
|
273
272
|
}
|
|
274
273
|
|
|
275
274
|
/**
|
|
276
275
|
* TBD.
|
|
277
|
-
* @param
|
|
278
|
-
* @param
|
|
276
|
+
* @param keys - TBD.
|
|
277
|
+
* @param urls - TBD.
|
|
279
278
|
* @returns {Loader} TBD.
|
|
280
279
|
*/
|
|
281
280
|
images(keys, urls) {
|
|
@@ -295,7 +294,7 @@ export class Loader {
|
|
|
295
294
|
* TBD.
|
|
296
295
|
* @param {string} key - TBD.
|
|
297
296
|
* @param {string} url - TBD.
|
|
298
|
-
* @param
|
|
297
|
+
* @param overwrite - TBD.
|
|
299
298
|
* @returns {Loader} TBD.
|
|
300
299
|
*/
|
|
301
300
|
text(key, url, overwrite) {
|
|
@@ -306,7 +305,7 @@ export class Loader {
|
|
|
306
305
|
* TBD.
|
|
307
306
|
* @param {string} key - TBD.
|
|
308
307
|
* @param {string} url - TBD.
|
|
309
|
-
* @param
|
|
308
|
+
* @param overwrite - TBD.
|
|
310
309
|
* @returns {Loader} TBD.
|
|
311
310
|
*/
|
|
312
311
|
json(key, url, overwrite) {
|
|
@@ -317,7 +316,7 @@ export class Loader {
|
|
|
317
316
|
* TBD.
|
|
318
317
|
* @param {string} key - TBD.
|
|
319
318
|
* @param {string} url - TBD.
|
|
320
|
-
* @param
|
|
319
|
+
* @param overwrite - TBD.
|
|
321
320
|
* @returns {Loader} TBD.
|
|
322
321
|
*/
|
|
323
322
|
xml(key, url, overwrite) {
|
|
@@ -328,11 +327,11 @@ export class Loader {
|
|
|
328
327
|
* TBD.
|
|
329
328
|
* @param {string} key - TBD.
|
|
330
329
|
* @param {string} url - TBD.
|
|
331
|
-
* @param
|
|
332
|
-
* @param
|
|
333
|
-
* @param
|
|
334
|
-
* @param
|
|
335
|
-
* @param
|
|
330
|
+
* @param frameWidth - TBD.
|
|
331
|
+
* @param frameHeight - TBD.
|
|
332
|
+
* @param frameMax - TBD.
|
|
333
|
+
* @param margin - TBD.
|
|
334
|
+
* @param spacing - TBD.
|
|
336
335
|
* @returns {Loader} TBD.
|
|
337
336
|
*/
|
|
338
337
|
spritesheet(key, url, frameWidth, frameHeight, frameMax = -1, margin = 0, spacing = 0) {
|
|
@@ -349,8 +348,8 @@ export class Loader {
|
|
|
349
348
|
/**
|
|
350
349
|
* TBD.
|
|
351
350
|
* @param {string} key - TBD.
|
|
352
|
-
* @param
|
|
353
|
-
* @param
|
|
351
|
+
* @param urls
|
|
352
|
+
* @param autoDecode
|
|
354
353
|
* @returns {Loader} TBD.
|
|
355
354
|
*/
|
|
356
355
|
audio(key, urls, autoDecode = true) {
|
|
@@ -366,10 +365,10 @@ export class Loader {
|
|
|
366
365
|
/**
|
|
367
366
|
* TBD.
|
|
368
367
|
* @param {string} key - TBD.
|
|
369
|
-
* @param
|
|
370
|
-
* @param
|
|
371
|
-
* @param
|
|
372
|
-
* @param
|
|
368
|
+
* @param urls - TBD.
|
|
369
|
+
* @param jsonURL - TBD.
|
|
370
|
+
* @param jsonData - TBD.
|
|
371
|
+
* @param autoDecode - TBD.
|
|
373
372
|
* @returns {Loader} TBD.
|
|
374
373
|
*/
|
|
375
374
|
audioSprite(key, urls, jsonURL, jsonData, autoDecode = true) {
|
|
@@ -391,11 +390,11 @@ export class Loader {
|
|
|
391
390
|
/**
|
|
392
391
|
* TBD.
|
|
393
392
|
* @param {string} key - TBD.
|
|
394
|
-
* @param
|
|
395
|
-
* @param
|
|
396
|
-
* @param
|
|
397
|
-
* @param
|
|
398
|
-
* @param
|
|
393
|
+
* @param textureURL - TBD.
|
|
394
|
+
* @param atlasURL - TBD.
|
|
395
|
+
* @param atlasData - TBD.
|
|
396
|
+
* @param xSpacing - TBD.
|
|
397
|
+
* @param ySpacing - TBD.
|
|
399
398
|
* @returns {Loader} TBD.
|
|
400
399
|
* @throws Error.
|
|
401
400
|
*/
|
|
@@ -435,10 +434,10 @@ export class Loader {
|
|
|
435
434
|
/**
|
|
436
435
|
* TBD.
|
|
437
436
|
* @param {string} key - TBD.
|
|
438
|
-
* @param
|
|
439
|
-
* @param
|
|
440
|
-
* @param
|
|
441
|
-
* @param
|
|
437
|
+
* @param textureURL - TBD.
|
|
438
|
+
* @param atlasURL - TBD.
|
|
439
|
+
* @param atlasData - TBD.
|
|
440
|
+
* @param format - TBD.
|
|
442
441
|
* @returns {Loader} TBD.
|
|
443
442
|
*/
|
|
444
443
|
atlas(key, textureURL, atlasURL = null, atlasData = null, format = TEXTURE_ATLAS_JSON_HASH) {
|
|
@@ -475,7 +474,7 @@ export class Loader {
|
|
|
475
474
|
|
|
476
475
|
/**
|
|
477
476
|
* TBD.
|
|
478
|
-
* @param
|
|
477
|
+
* @param type - TBD.
|
|
479
478
|
* @param {string} key - TBD.
|
|
480
479
|
* @returns {Loader} TBD.
|
|
481
480
|
*/
|
|
@@ -489,7 +488,7 @@ export class Loader {
|
|
|
489
488
|
|
|
490
489
|
/**
|
|
491
490
|
* TBD.
|
|
492
|
-
* @param
|
|
491
|
+
* @param type - TBD.
|
|
493
492
|
* @param {string} key - TBD.
|
|
494
493
|
*/
|
|
495
494
|
removeFile(type, key) {
|
|
@@ -622,7 +621,7 @@ export class Loader {
|
|
|
622
621
|
|
|
623
622
|
/**
|
|
624
623
|
* TBD.
|
|
625
|
-
* @param
|
|
624
|
+
* @param abnormal - TBD.
|
|
626
625
|
*/
|
|
627
626
|
finishedLoading(abnormal) {
|
|
628
627
|
if (this.hasLoaded) {
|
|
@@ -645,8 +644,8 @@ export class Loader {
|
|
|
645
644
|
|
|
646
645
|
/**
|
|
647
646
|
* TBD.
|
|
648
|
-
* @param
|
|
649
|
-
* @param
|
|
647
|
+
* @param file - TBD.
|
|
648
|
+
* @param errorMessage - TBD.
|
|
650
649
|
*/
|
|
651
650
|
asyncComplete(file, errorMessage = '') {
|
|
652
651
|
file.loaded = true;
|
|
@@ -661,7 +660,7 @@ export class Loader {
|
|
|
661
660
|
|
|
662
661
|
/**
|
|
663
662
|
* TBD.
|
|
664
|
-
* @param
|
|
663
|
+
* @param pack - TBD.
|
|
665
664
|
*/
|
|
666
665
|
processPack(pack) {
|
|
667
666
|
const packData = pack.data[pack.key];
|
|
@@ -725,7 +724,7 @@ export class Loader {
|
|
|
725
724
|
/**
|
|
726
725
|
* TBD.
|
|
727
726
|
* @param {string} url - TBD.
|
|
728
|
-
* @param
|
|
727
|
+
* @param file - TBD.
|
|
729
728
|
* @returns {string} TBD.
|
|
730
729
|
*/
|
|
731
730
|
transformUrl(url, file) {
|
|
@@ -740,7 +739,7 @@ export class Loader {
|
|
|
740
739
|
|
|
741
740
|
/**
|
|
742
741
|
* TBD.
|
|
743
|
-
* @param
|
|
742
|
+
* @param file - TBD.
|
|
744
743
|
*/
|
|
745
744
|
loadFile(file) {
|
|
746
745
|
switch (file.type) {
|
|
@@ -778,7 +777,7 @@ export class Loader {
|
|
|
778
777
|
|
|
779
778
|
/**
|
|
780
779
|
* TBD.
|
|
781
|
-
* @param
|
|
780
|
+
* @param file - TBD.
|
|
782
781
|
*/
|
|
783
782
|
loadImageTag(file) {
|
|
784
783
|
this.log('loadImageTag', file);
|
|
@@ -810,13 +809,13 @@ export class Loader {
|
|
|
810
809
|
|
|
811
810
|
/**
|
|
812
811
|
* TBD.
|
|
813
|
-
* @param
|
|
812
|
+
* @param file - TBD.
|
|
814
813
|
* @param {string} url - TBD.
|
|
815
|
-
* @param
|
|
816
|
-
* @param
|
|
817
|
-
* @param
|
|
814
|
+
* @param type - TBD.
|
|
815
|
+
* @param onload - TBD.
|
|
816
|
+
* @param onerror - TBD.
|
|
818
817
|
*/
|
|
819
|
-
xhrLoad(file, url, type, onload, onerror
|
|
818
|
+
xhrLoad(file, url, type, onload, onerror) {
|
|
820
819
|
this.log('xhrLoad', file);
|
|
821
820
|
const scope = this;
|
|
822
821
|
const xhr = new XMLHttpRequest();
|
|
@@ -885,7 +884,7 @@ export class Loader {
|
|
|
885
884
|
|
|
886
885
|
/**
|
|
887
886
|
* TBD.
|
|
888
|
-
* @param
|
|
887
|
+
* @param urls - TBD.
|
|
889
888
|
* @returns {string} TBD.
|
|
890
889
|
*/
|
|
891
890
|
getAudioURL(urls) {
|
|
@@ -923,9 +922,9 @@ export class Loader {
|
|
|
923
922
|
|
|
924
923
|
/**
|
|
925
924
|
* TBD.
|
|
926
|
-
* @param
|
|
927
|
-
* @param
|
|
928
|
-
* @param
|
|
925
|
+
* @param file - TBD.
|
|
926
|
+
* @param xhr - TBD.
|
|
927
|
+
* @param reason - TBD.
|
|
929
928
|
*/
|
|
930
929
|
fileError(file, xhr, reason) {
|
|
931
930
|
// const url = file.requestUrl || this.transformUrl(file.url, file);
|
|
@@ -941,8 +940,8 @@ export class Loader {
|
|
|
941
940
|
|
|
942
941
|
/**
|
|
943
942
|
* TBD.
|
|
944
|
-
* @param
|
|
945
|
-
* @param
|
|
943
|
+
* @param file - TBD.
|
|
944
|
+
* @param xhr - TBD.
|
|
946
945
|
* @throws Error.
|
|
947
946
|
*/
|
|
948
947
|
fileComplete(file, xhr) {
|
|
@@ -1033,8 +1032,8 @@ export class Loader {
|
|
|
1033
1032
|
|
|
1034
1033
|
/**
|
|
1035
1034
|
* TBD.
|
|
1036
|
-
* @param
|
|
1037
|
-
* @param
|
|
1035
|
+
* @param file - TBD.
|
|
1036
|
+
* @param xhr - TBD.
|
|
1038
1037
|
*/
|
|
1039
1038
|
jsonLoadComplete(file, xhr) {
|
|
1040
1039
|
const data = JSON.parse(xhr.responseText);
|
|
@@ -1058,8 +1057,8 @@ export class Loader {
|
|
|
1058
1057
|
|
|
1059
1058
|
/**
|
|
1060
1059
|
* TBD.
|
|
1061
|
-
* @param
|
|
1062
|
-
* @param
|
|
1060
|
+
* @param file - TBD.
|
|
1061
|
+
* @param xhr - TBD.
|
|
1063
1062
|
*/
|
|
1064
1063
|
xmlLoadComplete(file, xhr) {
|
|
1065
1064
|
// Always try parsing the content as XML, regardless of actually response type
|
|
@@ -1083,7 +1082,7 @@ export class Loader {
|
|
|
1083
1082
|
|
|
1084
1083
|
/**
|
|
1085
1084
|
* TBD.
|
|
1086
|
-
* @param
|
|
1085
|
+
* @param data - TBD.
|
|
1087
1086
|
* @returns {Document} TBD.
|
|
1088
1087
|
*/
|
|
1089
1088
|
parseXml(data) {
|
|
@@ -1128,8 +1127,8 @@ export class Loader {
|
|
|
1128
1127
|
|
|
1129
1128
|
/**
|
|
1130
1129
|
* TBD.
|
|
1131
|
-
* @param
|
|
1132
|
-
* @param
|
|
1130
|
+
* @param message - TBD.
|
|
1131
|
+
* @param data - TBD.
|
|
1133
1132
|
*/
|
|
1134
1133
|
log(message, data = '') {
|
|
1135
1134
|
if (!this.isUseLog) {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { Signal } from './signal';
|
|
2
|
-
|
|
3
1
|
export class SignalBinding {
|
|
4
2
|
/**
|
|
5
3
|
* TBD.
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
4
|
+
* @param signal
|
|
5
|
+
* @param listener
|
|
6
|
+
* @param isOnce
|
|
7
|
+
* @param listenerContext
|
|
8
|
+
* @param priority
|
|
9
|
+
* @param args - TBD.
|
|
12
10
|
*/
|
|
13
11
|
constructor(signal, listener, isOnce = false, listenerContext = null, priority = 0, args = null) {
|
|
14
12
|
this._signal = signal;
|
|
@@ -24,8 +22,7 @@ export class SignalBinding {
|
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* TBD.
|
|
27
|
-
* @param
|
|
28
|
-
* @returns {Function} TBD.
|
|
25
|
+
* @param paramsArr
|
|
29
26
|
*/
|
|
30
27
|
execute(paramsArr) {
|
|
31
28
|
let handlerReturn;
|
|
@@ -46,7 +43,6 @@ export class SignalBinding {
|
|
|
46
43
|
|
|
47
44
|
/**
|
|
48
45
|
* TBD.
|
|
49
|
-
* @returns {Function} TBD.
|
|
50
46
|
*/
|
|
51
47
|
detach() {
|
|
52
48
|
return this.isBound() ? this._signal.remove(this._listener, this.context) : null;
|
|
@@ -54,7 +50,6 @@ export class SignalBinding {
|
|
|
54
50
|
|
|
55
51
|
/**
|
|
56
52
|
* TBD.
|
|
57
|
-
* @returns {boolean} TBD.
|
|
58
53
|
*/
|
|
59
54
|
isBound() {
|
|
60
55
|
return !!this._signal && !!this._listener;
|
|
@@ -62,7 +57,6 @@ export class SignalBinding {
|
|
|
62
57
|
|
|
63
58
|
/**
|
|
64
59
|
* TBD.
|
|
65
|
-
* @returns {boolean} TBD.
|
|
66
60
|
*/
|
|
67
61
|
isOnce() {
|
|
68
62
|
return this._isOnce;
|
|
@@ -70,7 +64,6 @@ export class SignalBinding {
|
|
|
70
64
|
|
|
71
65
|
/**
|
|
72
66
|
* TBD.
|
|
73
|
-
* @returns {Function} TBD.
|
|
74
67
|
*/
|
|
75
68
|
getListener() {
|
|
76
69
|
return this._listener;
|
|
@@ -78,7 +71,6 @@ export class SignalBinding {
|
|
|
78
71
|
|
|
79
72
|
/**
|
|
80
73
|
* TBD.
|
|
81
|
-
* @returns {Signal} TBD.
|
|
82
74
|
*/
|
|
83
75
|
getSignal() {
|
|
84
76
|
return this._signal;
|
|
@@ -95,7 +87,6 @@ export class SignalBinding {
|
|
|
95
87
|
|
|
96
88
|
/**
|
|
97
89
|
* TBD.
|
|
98
|
-
* @returns {string} TBD.
|
|
99
90
|
*/
|
|
100
91
|
toString() {
|
|
101
92
|
return '[SignalBinding isOnce:' + this._isOnce + ', isBound:' + this.isBound() + ', active:' + this.active + ']';
|
package/src/phaser/core/tween.js
CHANGED
|
@@ -148,7 +148,7 @@ export class Tween {
|
|
|
148
148
|
/**
|
|
149
149
|
* TBD.
|
|
150
150
|
* @param {string} property - TBD.
|
|
151
|
-
* @param {
|
|
151
|
+
* @param {number} value - TBD.
|
|
152
152
|
* @param {number} index - TBD.
|
|
153
153
|
* @returns {Tween} TBD.
|
|
154
154
|
*/
|
|
@@ -235,8 +235,8 @@ export class Tween {
|
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
237
|
* TBD.
|
|
238
|
-
* @param
|
|
239
|
-
* @param
|
|
238
|
+
* @param interpolation - TBD.
|
|
239
|
+
* @param context - TBD.
|
|
240
240
|
* @param {number} index - TBD.
|
|
241
241
|
* @returns {Tween} TBD.
|
|
242
242
|
*/
|
|
@@ -424,8 +424,7 @@ export class Tween {
|
|
|
424
424
|
/**
|
|
425
425
|
* TBD.
|
|
426
426
|
* @param {number} frameRate - TBD.
|
|
427
|
-
* @param
|
|
428
|
-
* @returns {object[]} TBD.
|
|
427
|
+
* @param data - TBD.
|
|
429
428
|
*/
|
|
430
429
|
generateData(frameRate = 60, data = []) {
|
|
431
430
|
if (this.game === null || this.target === null) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Tween } from './tween';
|
|
2
1
|
import * as MathUtils from '../util/math';
|
|
3
2
|
import { TWEEN_PENDING, TWEEN_RUNNING, TWEEN_COMPLETE, TWEEN_LOOPED } from './const';
|
|
4
3
|
|
|
5
4
|
export class TweenData {
|
|
6
5
|
/**
|
|
7
6
|
* TBD.
|
|
8
|
-
* @param
|
|
7
|
+
* @param parent - TBD.
|
|
9
8
|
*/
|
|
10
9
|
constructor(parent) {
|
|
11
10
|
this.parent = parent;
|
|
@@ -24,9 +24,6 @@ import { getSmoothingPrefix } from './util';
|
|
|
24
24
|
import { detectCapabilities } from './tinter';
|
|
25
25
|
import * as CanvasMaskManager from './masker';
|
|
26
26
|
import { Game } from '../../core/game';
|
|
27
|
-
import { Stage } from '../../core/stage';
|
|
28
|
-
import { Image } from '../image';
|
|
29
|
-
import { Matrix } from '../../geom/matrix';
|
|
30
27
|
|
|
31
28
|
export class CanvasRenderer {
|
|
32
29
|
/**
|
|
@@ -63,7 +60,7 @@ export class CanvasRenderer {
|
|
|
63
60
|
|
|
64
61
|
/**
|
|
65
62
|
* TBD.
|
|
66
|
-
* @param
|
|
63
|
+
* @param root - TBD.
|
|
67
64
|
*/
|
|
68
65
|
render(root) {
|
|
69
66
|
if (!this.context) {
|
|
@@ -88,7 +85,7 @@ export class CanvasRenderer {
|
|
|
88
85
|
|
|
89
86
|
/**
|
|
90
87
|
* TBD.
|
|
91
|
-
* @param
|
|
88
|
+
* @param removeView - TBD.
|
|
92
89
|
*/
|
|
93
90
|
destroy(removeView = true) {
|
|
94
91
|
if (removeView && this.view.parent) {
|
|
@@ -120,9 +117,9 @@ export class CanvasRenderer {
|
|
|
120
117
|
|
|
121
118
|
/**
|
|
122
119
|
* TBD.
|
|
123
|
-
* @param
|
|
124
|
-
* @param
|
|
125
|
-
* @param
|
|
120
|
+
* @param displayObject - TBD.
|
|
121
|
+
* @param context - TBD.
|
|
122
|
+
* @param matrix - TBD.
|
|
126
123
|
*/
|
|
127
124
|
renderDisplayObject(displayObject, context, matrix) {
|
|
128
125
|
this.renderSession.context = context || this.context;
|
|
@@ -4,7 +4,6 @@ import { Matrix } from '../geom/matrix';
|
|
|
4
4
|
import { getIdentityMatrix } from '../geom/util/matrix';
|
|
5
5
|
import { PI_2 } from '../util/math';
|
|
6
6
|
import { renderCanvas, renderWebGL } from './sprite_util';
|
|
7
|
-
import { Graphics } from './graphics';
|
|
8
7
|
|
|
9
8
|
export class DisplayObject {
|
|
10
9
|
/**
|
|
@@ -672,7 +671,6 @@ export class DisplayObject {
|
|
|
672
671
|
|
|
673
672
|
/**
|
|
674
673
|
* TBD.
|
|
675
|
-
* @returns {Graphics} TBD.
|
|
676
674
|
*/
|
|
677
675
|
get mask() {
|
|
678
676
|
return this._mask;
|
|
@@ -841,8 +841,8 @@ export class Graphics extends DisplayObject {
|
|
|
841
841
|
|
|
842
842
|
/**
|
|
843
843
|
* TBD.
|
|
844
|
-
* @param
|
|
845
|
-
* @param
|
|
844
|
+
* @param points - TBD.
|
|
845
|
+
* @param cull - TBD.
|
|
846
846
|
*/
|
|
847
847
|
drawTriangle(points, cull = false) {
|
|
848
848
|
const triangle = new Polygon(points);
|
|
@@ -861,8 +861,8 @@ export class Graphics extends DisplayObject {
|
|
|
861
861
|
|
|
862
862
|
/**
|
|
863
863
|
* TBD.
|
|
864
|
-
* @param
|
|
865
|
-
* @param
|
|
864
|
+
* @param vertices - TBD.
|
|
865
|
+
* @param indices - TBD.
|
|
866
866
|
* @param {boolean} cull - TBD.
|
|
867
867
|
*/
|
|
868
868
|
drawTriangles(vertices, indices, cull = false) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Texture } from './webgl/texture';
|
|
2
2
|
import { AnimationManager } from '../core/animation_manager';
|
|
3
3
|
import { EventManager } from '../core/event_manager';
|
|
4
|
-
import { Frame } from '../core/frame';
|
|
5
4
|
import { Rectangle } from '../geom/rectangle';
|
|
6
5
|
import { Matrix } from '../geom/matrix';
|
|
7
6
|
import { DisplayObject } from './display_object';
|
|
@@ -141,7 +140,7 @@ export class Image extends DisplayObject {
|
|
|
141
140
|
|
|
142
141
|
/**
|
|
143
142
|
* TBD.
|
|
144
|
-
* @param
|
|
143
|
+
* @param frame - TBD.
|
|
145
144
|
*/
|
|
146
145
|
setFrame(frame) {
|
|
147
146
|
this._frame = frame;
|
|
@@ -186,7 +185,7 @@ export class Image extends DisplayObject {
|
|
|
186
185
|
|
|
187
186
|
/**
|
|
188
187
|
* TBD.
|
|
189
|
-
* @param
|
|
188
|
+
* @param parent - TBD.
|
|
190
189
|
* @param {number} width - TBD.
|
|
191
190
|
* @param {number} height - TBD.
|
|
192
191
|
*/
|
|
@@ -206,7 +205,6 @@ export class Image extends DisplayObject {
|
|
|
206
205
|
|
|
207
206
|
/**
|
|
208
207
|
* TBD.
|
|
209
|
-
* @returns {number} TBD.
|
|
210
208
|
*/
|
|
211
209
|
get frame() {
|
|
212
210
|
return this.animations.frame;
|
|
@@ -238,7 +236,7 @@ export class Image extends DisplayObject {
|
|
|
238
236
|
|
|
239
237
|
/**
|
|
240
238
|
* TBD.
|
|
241
|
-
* @param
|
|
239
|
+
* @param rect - TBD.
|
|
242
240
|
* @param {boolean} copy - TBD.
|
|
243
241
|
*/
|
|
244
242
|
crop(rect, copy = false) {
|
|
@@ -337,7 +335,7 @@ export class Image extends DisplayObject {
|
|
|
337
335
|
|
|
338
336
|
/**
|
|
339
337
|
* TBD.
|
|
340
|
-
* @param
|
|
338
|
+
* @param texture - TBD.
|
|
341
339
|
* @param {boolean} destroyBase - TBD.
|
|
342
340
|
*/
|
|
343
341
|
setTexture(texture, destroyBase = false) {
|