@vpmedia/phaser 1.109.0 → 1.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/index.js +100 -166
  2. package/dist/index.js.map +1 -1
  3. package/dist/phaser/core/animation_manager.d.ts +8 -7
  4. package/dist/phaser/core/animation_manager.d.ts.map +1 -1
  5. package/dist/phaser/core/cache.d.ts +23 -10
  6. package/dist/phaser/core/cache.d.ts.map +1 -1
  7. package/dist/phaser/core/device.d.ts +23 -23
  8. package/dist/phaser/core/device.d.ts.map +1 -1
  9. package/dist/phaser/core/dom.d.ts +1 -1
  10. package/dist/phaser/core/dom.d.ts.map +1 -1
  11. package/dist/phaser/core/factory.d.ts +13 -7
  12. package/dist/phaser/core/factory.d.ts.map +1 -1
  13. package/dist/phaser/core/input.d.ts +54 -45
  14. package/dist/phaser/core/input.d.ts.map +1 -1
  15. package/dist/phaser/core/input_handler.d.ts +70 -51
  16. package/dist/phaser/core/input_handler.d.ts.map +1 -1
  17. package/dist/phaser/core/input_mouse.d.ts +15 -14
  18. package/dist/phaser/core/input_mouse.d.ts.map +1 -1
  19. package/dist/phaser/core/input_pointer.d.ts +40 -38
  20. package/dist/phaser/core/input_pointer.d.ts.map +1 -1
  21. package/dist/phaser/core/loader.d.ts +31 -28
  22. package/dist/phaser/core/loader.d.ts.map +1 -1
  23. package/dist/phaser/core/scale_manager.d.ts +57 -53
  24. package/dist/phaser/core/scale_manager.d.ts.map +1 -1
  25. package/dist/phaser/core/scene_manager.d.ts +7 -4
  26. package/dist/phaser/core/scene_manager.d.ts.map +1 -1
  27. package/dist/phaser/core/signal.d.ts +9 -9
  28. package/dist/phaser/core/signal.d.ts.map +1 -1
  29. package/dist/phaser/core/time.d.ts +31 -30
  30. package/dist/phaser/core/time.d.ts.map +1 -1
  31. package/dist/phaser/core/timer.d.ts +25 -23
  32. package/dist/phaser/core/timer.d.ts.map +1 -1
  33. package/dist/phaser/core/tween_manager.d.ts +1 -1
  34. package/dist/phaser/core/tween_manager.d.ts.map +1 -1
  35. package/dist/phaser/display/bitmap_text.d.ts +17 -15
  36. package/dist/phaser/display/bitmap_text.d.ts.map +1 -1
  37. package/dist/phaser/display/display_object.d.ts +13 -12
  38. package/dist/phaser/display/display_object.d.ts.map +1 -1
  39. package/dist/phaser/display/group.d.ts +5 -4
  40. package/dist/phaser/display/group.d.ts.map +1 -1
  41. package/dist/phaser/display/text.d.ts +13 -12
  42. package/dist/phaser/display/text.d.ts.map +1 -1
  43. package/package.json +10 -10
  44. package/src/phaser/core/animation_manager.ts +5 -9
  45. package/src/phaser/core/cache.ts +41 -8
  46. package/src/phaser/core/device.ts +23 -83
  47. package/src/phaser/core/dom.ts +1 -1
  48. package/src/phaser/core/factory.ts +3 -2
  49. package/src/phaser/core/input.ts +51 -51
  50. package/src/phaser/core/input_handler.ts +57 -35
  51. package/src/phaser/core/input_mouse.ts +16 -14
  52. package/src/phaser/core/input_pointer.ts +35 -53
  53. package/src/phaser/core/loader.ts +34 -31
  54. package/src/phaser/core/scale_manager.ts +51 -49
  55. package/src/phaser/core/scene_manager.ts +6 -4
  56. package/src/phaser/core/signal.ts +8 -6
  57. package/src/phaser/core/time.ts +29 -53
  58. package/src/phaser/core/timer.ts +22 -40
  59. package/src/phaser/core/tween_manager.ts +2 -2
  60. package/src/phaser/display/bitmap_text.ts +18 -30
  61. package/src/phaser/display/display_object.ts +11 -10
  62. package/src/phaser/display/group.ts +7 -5
  63. package/src/phaser/display/text.ts +14 -14
@@ -15,28 +15,28 @@ const MAX_POINTERS = 10;
15
15
 
16
16
  export class Input {
17
17
  game!: any;
18
- hitCanvas!: any;
18
+ hitCanvas!: HTMLCanvasElement;
19
19
  hitContext!: any;
20
- moveCallbacks!: any;
20
+ moveCallbacks!: { callback: Function; context: any }[];
21
21
  lockCallbacks!: any;
22
22
  customCandidateHandler!: any;
23
23
  customCandidateHandlerContext!: any;
24
- pollRate!: any;
25
- enabled!: any;
26
- multiInputOverride!: any;
27
- position!: any;
28
- speed!: any;
29
- circle!: any;
30
- scale!: any;
31
- maxPointers!: any;
32
- tapRate!: any;
33
- doubleTapRate!: any;
34
- holdRate!: any;
35
- justPressedRate!: any;
36
- justReleasedRate!: any;
37
- recordPointerHistory!: any;
38
- recordRate!: any;
39
- recordLimit!: any;
24
+ pollRate!: number;
25
+ enabled!: boolean;
26
+ multiInputOverride!: number;
27
+ position!: Point;
28
+ speed!: Point;
29
+ circle!: Circle;
30
+ scale!: Point;
31
+ maxPointers!: number;
32
+ tapRate!: number;
33
+ doubleTapRate!: number;
34
+ holdRate!: number;
35
+ justPressedRate!: number;
36
+ justReleasedRate!: number;
37
+ recordPointerHistory!: boolean;
38
+ recordRate!: number;
39
+ recordLimit!: number;
40
40
  pointer1!: any;
41
41
  pointer2!: any;
42
42
  pointer3!: any;
@@ -47,32 +47,32 @@ export class Input {
47
47
  pointer8!: any;
48
48
  pointer9!: any;
49
49
  pointer10!: any;
50
- pointers!: any;
51
- activePointer!: any;
52
- mousePointer!: any;
53
- mouse!: any;
54
- touch!: any;
55
- mspointer!: any;
56
- resetLocked!: any;
57
- onDown!: any;
58
- onUp!: any;
59
- onTap!: any;
60
- onHold!: any;
61
- minPriorityID!: any;
62
- interactiveItems!: any;
63
- _localPoint!: any;
64
- _pollCounter!: any;
65
- _oldPosition!: any;
50
+ pointers!: Pointer[];
51
+ activePointer!: Pointer;
52
+ mousePointer!: Pointer;
53
+ mouse!: Mouse;
54
+ touch!: Touch;
55
+ mspointer!: MSPointer;
56
+ resetLocked!: boolean;
57
+ onDown!: Signal;
58
+ onUp!: Signal;
59
+ onTap!: Signal;
60
+ onHold!: Signal;
61
+ minPriorityID!: number;
62
+ interactiveItems!: ArraySet;
63
+ _localPoint!: Point;
64
+ _pollCounter!: number;
65
+ _oldPosition!: Point;
66
66
  _onClickTrampoline!: any;
67
- _x!: any;
68
- _y!: any;
67
+ _x!: number;
68
+ _y!: number;
69
69
  /**
70
70
  * TBD.
71
71
  * @param {import('./game.js').Game} game - TBD.
72
72
  */
73
73
  constructor(game: import('./game.js').Game) {
74
74
  this.game = game;
75
- this.hitCanvas = null;
75
+ this.hitCanvas = null!;
76
76
  this.hitContext = null;
77
77
  this.moveCallbacks = [];
78
78
  this.lockCallbacks = [];
@@ -81,10 +81,10 @@ export class Input {
81
81
  this.pollRate = 0;
82
82
  this.enabled = true;
83
83
  this.multiInputOverride = MOUSE_TOUCH_COMBINE;
84
- this.position = null;
85
- this.speed = null;
86
- this.circle = null;
87
- this.scale = null;
84
+ this.position = null!;
85
+ this.speed = null!;
86
+ this.circle = null!;
87
+ this.scale = null!;
88
88
  this.maxPointers = 1;
89
89
  this.tapRate = 200;
90
90
  this.doubleTapRate = 300;
@@ -105,21 +105,21 @@ export class Input {
105
105
  this.pointer9 = null;
106
106
  this.pointer10 = null;
107
107
  this.pointers = [];
108
- this.activePointer = null;
109
- this.mousePointer = null;
110
- this.mouse = null;
111
- this.touch = null;
112
- this.mspointer = null;
108
+ this.activePointer = null!;
109
+ this.mousePointer = null!;
110
+ this.mouse = null!;
111
+ this.touch = null!;
112
+ this.mspointer = null!;
113
113
  this.resetLocked = false;
114
- this.onDown = null;
115
- this.onUp = null;
116
- this.onTap = null;
117
- this.onHold = null;
114
+ this.onDown = null!;
115
+ this.onUp = null!;
116
+ this.onTap = null!;
117
+ this.onHold = null!;
118
118
  this.minPriorityID = 0;
119
119
  this.interactiveItems = new ArraySet();
120
120
  this._localPoint = new Point();
121
121
  this._pollCounter = 0;
122
- this._oldPosition = null;
122
+ this._oldPosition = null!;
123
123
  this._x = 0;
124
124
  this._y = 0;
125
125
  }
@@ -2,48 +2,66 @@ import { Point } from '../geom/point.js';
2
2
  import { distance } from '../util/math.js';
3
3
  import { GROUP } from './const.js';
4
4
 
5
+ interface PointerData {
6
+ id: number;
7
+ x: number;
8
+ y: number;
9
+ camX: number;
10
+ camY: number;
11
+ isDown: boolean;
12
+ isUp: boolean;
13
+ isOver: boolean;
14
+ isOut: boolean;
15
+ timeOver: number;
16
+ timeOut: number;
17
+ timeDown: number;
18
+ timeUp: number;
19
+ downDuration: number;
20
+ isDragged: boolean;
21
+ }
22
+
5
23
  export class InputHandler {
6
24
  sprite!: any;
7
25
  game!: any;
8
- enabled!: any;
9
- checked!: any;
10
- priorityID!: any;
11
- useHandCursor!: any;
12
- _setHandCursor!: any;
13
- isDragged!: any;
14
- allowHorizontalDrag!: any;
15
- allowVerticalDrag!: any;
16
- bringToTop!: any;
26
+ enabled!: boolean;
27
+ checked!: boolean;
28
+ priorityID!: number;
29
+ useHandCursor!: boolean;
30
+ _setHandCursor!: boolean;
31
+ isDragged!: boolean;
32
+ allowHorizontalDrag!: boolean;
33
+ allowVerticalDrag!: boolean;
34
+ bringToTop!: boolean;
17
35
  snapOffset!: any;
18
- snapOnDrag!: any;
19
- snapOnRelease!: any;
20
- snapX!: any;
21
- snapY!: any;
22
- snapOffsetX!: any;
23
- snapOffsetY!: any;
24
- pixelPerfectOver!: any;
25
- pixelPerfectClick!: any;
26
- pixelPerfectAlpha!: any;
27
- draggable!: any;
36
+ snapOnDrag!: boolean;
37
+ snapOnRelease!: boolean;
38
+ snapX!: number;
39
+ snapY!: number;
40
+ snapOffsetX!: number;
41
+ snapOffsetY!: number;
42
+ pixelPerfectOver!: boolean;
43
+ pixelPerfectClick!: boolean;
44
+ pixelPerfectAlpha!: number;
45
+ draggable!: boolean;
28
46
  boundsRect!: any;
29
47
  boundsSprite!: any;
30
- scaleLayer!: any;
31
- dragOffset!: any;
32
- dragFromCenter!: any;
33
- dragStopBlocksInputUp!: any;
34
- dragStartPoint!: any;
35
- dragDistanceThreshold!: any;
36
- dragTimeThreshold!: any;
37
- downPoint!: any;
38
- snapPoint!: any;
39
- _dragPoint!: any;
40
- _dragPhase!: any;
41
- _pendingDrag!: any;
42
- _dragTimePass!: any;
43
- _dragDistancePass!: any;
44
- _wasEnabled!: any;
48
+ scaleLayer!: boolean;
49
+ dragOffset!: Point;
50
+ dragFromCenter!: boolean;
51
+ dragStopBlocksInputUp!: boolean;
52
+ dragStartPoint!: Point;
53
+ dragDistanceThreshold!: number;
54
+ dragTimeThreshold!: number;
55
+ downPoint!: Point;
56
+ snapPoint!: Point;
57
+ _dragPoint!: Point;
58
+ _dragPhase!: boolean;
59
+ _pendingDrag!: boolean;
60
+ _dragTimePass!: boolean;
61
+ _dragDistancePass!: boolean;
62
+ _wasEnabled!: boolean;
45
63
  _tempPoint!: import('../geom/point.js').Point;
46
- _pointerData!: any;
64
+ _pointerData!: PointerData[];
47
65
  _dx!: any;
48
66
  _dy!: any;
49
67
  _draggedPointerID!: any;
@@ -130,6 +148,8 @@ export class InputHandler {
130
148
  id: i,
131
149
  x: 0,
132
150
  y: 0,
151
+ camX: 0,
152
+ camY: 0,
133
153
  isDown: false,
134
154
  isUp: false,
135
155
  isOver: false,
@@ -188,6 +208,8 @@ export class InputHandler {
188
208
  id: i,
189
209
  x: 0,
190
210
  y: 0,
211
+ camX: 0,
212
+ camY: 0,
191
213
  isDown: false,
192
214
  isUp: false,
193
215
  isOver: false,
@@ -1,20 +1,22 @@
1
+ import type { Input } from './input.js';
2
+
1
3
  export class Mouse {
2
4
  game!: any;
3
- input!: any;
5
+ input!: Input;
4
6
  callbackContext!: any;
5
- mouseDownCallback!: any;
6
- mouseUpCallback!: any;
7
- mouseOutCallback!: any;
8
- mouseOverCallback!: any;
9
- mouseWheelCallback!: any;
10
- mouseMoveCallback!: any;
11
- capture!: any;
12
- button!: any;
13
- wheelDelta!: any;
14
- enabled!: any;
15
- locked!: any;
16
- stopOnGameOut!: any;
17
- event!: any;
7
+ mouseDownCallback!: ((event: MouseEvent) => void) | null;
8
+ mouseUpCallback!: ((event: MouseEvent) => void) | null;
9
+ mouseOutCallback!: ((event: MouseEvent) => void) | null;
10
+ mouseOverCallback!: ((event: MouseEvent) => void) | null;
11
+ mouseWheelCallback!: ((event: WheelEvent) => void) | null;
12
+ mouseMoveCallback!: ((event: MouseEvent) => void) | null;
13
+ capture!: boolean;
14
+ button!: number;
15
+ wheelDelta!: number;
16
+ enabled!: boolean;
17
+ locked!: boolean;
18
+ stopOnGameOut!: boolean;
19
+ event!: MouseEvent | WheelEvent | null;
18
20
  _onMouseDown!: ((event: MouseEvent) => void) | null;
19
21
  _onMouseMove!: ((event: MouseEvent) => void) | null;
20
22
  _onMouseUp!: ((event: MouseEvent) => void) | null;
@@ -11,47 +11,47 @@ import {
11
11
 
12
12
  export class Pointer {
13
13
  game!: any;
14
- id!: any;
15
- type!: any;
16
- exists!: any;
17
- identifier!: any;
14
+ id!: number;
15
+ type!: number;
16
+ exists!: boolean;
17
+ identifier!: number | null;
18
18
  pointerId!: any;
19
- pointerMode!: any;
19
+ pointerMode!: number;
20
20
  target!: any;
21
21
  button!: any;
22
- _holdSent!: any;
22
+ _holdSent!: boolean;
23
23
  _history!: any;
24
- _nextDrop!: any;
25
- _stateReset!: any;
26
- withinGame!: any;
27
- clientX!: any;
28
- clientY!: any;
29
- pageX!: any;
30
- pageY!: any;
31
- screenX!: any;
32
- screenY!: any;
33
- rawMovementX!: any;
34
- rawMovementY!: any;
35
- movementX!: any;
36
- movementY!: any;
37
- x!: any;
38
- y!: any;
39
- isMouse!: any;
40
- isDown!: any;
41
- isUp!: any;
42
- timeDown!: any;
43
- timeUp!: any;
44
- previousTapTime!: any;
45
- totalTouches!: any;
46
- msSinceLastClick!: any;
24
+ _nextDrop!: number;
25
+ _stateReset!: boolean;
26
+ withinGame!: boolean;
27
+ clientX!: number;
28
+ clientY!: number;
29
+ pageX!: number;
30
+ pageY!: number;
31
+ screenX!: number;
32
+ screenY!: number;
33
+ rawMovementX!: number;
34
+ rawMovementY!: number;
35
+ movementX!: number;
36
+ movementY!: number;
37
+ x!: number;
38
+ y!: number;
39
+ isMouse!: boolean;
40
+ isDown!: boolean;
41
+ isUp!: boolean;
42
+ timeDown!: number;
43
+ timeUp!: number;
44
+ previousTapTime!: number;
45
+ totalTouches!: number;
46
+ msSinceLastClick!: number;
47
47
  targetObject!: any;
48
48
  interactiveCandidates!: any;
49
- active!: any;
50
- dirty!: any;
51
- position!: any;
52
- positionDown!: any;
53
- positionUp!: any;
54
- circle!: any;
49
+ active!: boolean;
50
+ dirty!: boolean;
51
+ position!: Point;
52
+ positionDown!: Point;
53
+ positionUp!: Point;
54
+ circle!: Circle;
55
55
  _clickTrampolines!: any;
56
56
  _trampolineTargetObject!: any;
57
57
  /**
@@ -63,10 +63,8 @@ export class Pointer {
63
63
  constructor(game: import('./game.js').Game, id: number, pointerMode: number) {
64
64
  this.game = game;
65
65
  this.id = id;
66
- /** @type {number} */
67
66
  this.type = POINTER;
68
67
  this.exists = true;
69
- /** @type {number} */
70
68
  this.identifier = 0;
71
69
  this.pointerId = null;
72
70
  this.pointerMode = pointerMode || POINTER_CURSOR | POINTER_CONTACT;
@@ -74,43 +72,27 @@ export class Pointer {
74
72
  this.button = null;
75
73
  this._holdSent = false;
76
74
  this._history = [];
77
- /** @type {number} */
78
75
  this._nextDrop = 0;
79
76
  this._stateReset = false;
80
77
  this.withinGame = false;
81
78
  this.clientX = -1;
82
- /** @type {number} */
83
79
  this.clientY = -1;
84
- /** @type {number} */
85
80
  this.pageX = -1;
86
- /** @type {number} */
87
81
  this.pageY = -1;
88
- /** @type {number} */
89
82
  this.screenX = -1;
90
- /** @type {number} */
91
83
  this.screenY = -1;
92
- /** @type {number} */
93
84
  this.rawMovementX = 0;
94
- /** @type {number} */
95
85
  this.rawMovementY = 0;
96
- /** @type {number} */
97
86
  this.movementX = 0;
98
- /** @type {number} */
99
87
  this.movementY = 0;
100
- /** @type {number} */
101
88
  this.x = -1;
102
- /** @type {number} */
103
89
  this.y = -1;
104
90
  this.isMouse = id === 0;
105
91
  this.isDown = false;
106
92
  this.isUp = true;
107
- /** @type {number} */
108
93
  this.timeDown = 0;
109
- /** @type {number} */
110
94
  this.timeUp = 0;
111
- /** @type {number} */
112
95
  this.previousTapTime = 0;
113
- /** @type {number} */
114
96
  this.totalTouches = 0;
115
97
  this.msSinceLastClick = Number.MAX_VALUE;
116
98
  this.targetObject = null;
@@ -1,6 +1,8 @@
1
1
  import { Rectangle } from '../geom/rectangle.js';
2
2
  import { canPlayAudio } from './device_util.js';
3
3
  import { ENGINE_ERROR_INVALID_BITMAP_FONT_ATLAS } from './error_code.js';
4
+ import type { Cache } from './cache.js';
5
+ import type { Game } from './game.js';
4
6
  import { Signal } from './signal.js';
5
7
 
6
8
  const TEXTURE_ATLAS_JSON_HASH = 1;
@@ -17,39 +19,39 @@ export interface LoaderFile {
17
19
  }
18
20
 
19
21
  export class Loader {
20
- game!: any;
21
- cache!: any;
22
- isLoading!: any;
23
- isUseLog!: any;
24
- isUseRetry!: any;
25
- maxRetry!: any;
26
- hasLoaded!: any;
22
+ game!: Game;
23
+ cache!: Cache;
24
+ isLoading!: boolean;
25
+ isUseLog!: boolean;
26
+ isUseRetry!: boolean;
27
+ maxRetry!: number;
28
+ hasLoaded!: boolean;
27
29
  preloadSprite!: any;
28
- crossOrigin!: any;
29
- baseURL!: any;
30
- path!: any;
31
- headers!: any;
32
- onLoadStart!: any;
33
- onLoadComplete!: any;
34
- onPackComplete!: any;
35
- onFileStart!: any;
36
- onFileComplete!: any;
37
- onFileError!: any;
38
- maxParallelDownloads!: any;
39
- _withSyncPointDepth!: any;
30
+ crossOrigin!: boolean | string;
31
+ baseURL!: string;
32
+ path!: string;
33
+ headers!: Record<string, string | false>;
34
+ onLoadStart!: Signal;
35
+ onLoadComplete!: Signal;
36
+ onPackComplete!: Signal;
37
+ onFileStart!: Signal;
38
+ onFileComplete!: Signal;
39
+ onFileError!: Signal;
40
+ maxParallelDownloads!: number;
41
+ _withSyncPointDepth!: number;
40
42
  _fileList!: any;
41
43
  _flightQueue!: any;
42
- _processingHead!: any;
43
- _fileLoadStarted!: any;
44
- _totalPackCount!: any;
45
- _totalFileCount!: any;
46
- _loadedPackCount!: any;
47
- _loadedFileCount!: any;
44
+ _processingHead!: number;
45
+ _fileLoadStarted!: boolean;
46
+ _totalPackCount!: number;
47
+ _totalFileCount!: number;
48
+ _loadedPackCount!: number;
49
+ _loadedFileCount!: number;
48
50
  /**
49
51
  * Creates a new Loader instance.
50
52
  * @param {import('./game.js').Game} game - Reference to the Phaser Game instance.
51
53
  */
52
- constructor(game: import('./game.js').Game) {
54
+ constructor(game: Game) {
53
55
  this.game = game;
54
56
  this.cache = game.cache;
55
57
  this.isLoading = false;
@@ -896,8 +898,9 @@ export class Loader {
896
898
  if (this.headers.requestedWith !== false) {
897
899
  xhr.setRequestHeader('X-Requested-With', this.headers.requestedWith);
898
900
  }
899
- if (this.headers[file.type]) {
900
- xhr.setRequestHeader('Accept', this.headers[file.type]);
901
+ const acceptHeader = this.headers[file.type];
902
+ if (acceptHeader) {
903
+ xhr.setRequestHeader('Accept', acceptHeader);
901
904
  }
902
905
  onerror = onerror || this.fileError;
903
906
  xhr.onload = () => {
@@ -1045,7 +1048,7 @@ export class Loader {
1045
1048
  break;
1046
1049
  case 'textureatlas':
1047
1050
  if (file.atlasURL == null) {
1048
- this.cache.addTextureAtlas(file.key, file.url, file.data, file.atlasData, file.format);
1051
+ this.cache.addTextureAtlas(file.key, file.url, file.data, file.atlasData);
1049
1052
  } else {
1050
1053
  loadNext = false;
1051
1054
  if (file.format === TEXTURE_ATLAS_JSON_HASH) {
@@ -1124,7 +1127,7 @@ export class Loader {
1124
1127
  } else if (file.type === 'json') {
1125
1128
  this.cache.addJSON(file.key, file.url, data);
1126
1129
  } else {
1127
- this.cache.addTextureAtlas(file.key, file.url, file.data, data, file.format);
1130
+ this.cache.addTextureAtlas(file.key, file.url, file.data, data);
1128
1131
  }
1129
1132
  this.asyncComplete(file);
1130
1133
  }
@@ -1155,7 +1158,7 @@ export class Loader {
1155
1158
  if (file.type === 'bitmapfont') {
1156
1159
  this.cache.addBitmapFont(file.key, file.url, file.data, xml, file.atlasType, file.xSpacing, file.ySpacing);
1157
1160
  } else if (file.type === 'textureatlas') {
1158
- this.cache.addTextureAtlas(file.key, file.url, file.data, xml, file.format);
1161
+ this.cache.addTextureAtlas(file.key, file.url, file.data, xml);
1159
1162
  } else if (file.type === 'xml') {
1160
1163
  this.cache.addXML(file.key, file.url, xml);
1161
1164
  }