@vpmedia/phaser 1.0.27 → 1.0.29
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/dist/phaser.cjs +1 -1
- package/dist/phaser.cjs.LICENSE.txt +1 -1
- package/dist/phaser.cjs.map +1 -1
- package/dist/phaser.js +1 -1
- package/dist/phaser.js.LICENSE.txt +1 -1
- package/dist/phaser.js.map +1 -1
- package/package.json +1 -1
- package/src/phaser/core/loader.js +6 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
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",
|
|
@@ -540,8 +540,9 @@ export default class {
|
|
|
540
540
|
console.warn('Missing loader pack key', pack.key);
|
|
541
541
|
return;
|
|
542
542
|
}
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
const packDataCompat = Array.isArray(packData) ? packData : packData.files;
|
|
544
|
+
for (let i = 0; i < packDataCompat.length; i += 1) {
|
|
545
|
+
const file = packDataCompat[i];
|
|
545
546
|
switch (file.type) {
|
|
546
547
|
case "image":
|
|
547
548
|
this.image(file.key, file.url, file.overwrite);
|
|
@@ -565,13 +566,13 @@ export default class {
|
|
|
565
566
|
this.spritesheet(file.key, file.url, file.frameWidth, file.frameHeight, file.frameMax, file.margin, file.spacing);
|
|
566
567
|
break;
|
|
567
568
|
case "video":
|
|
568
|
-
this.video(file.key, file.urls);
|
|
569
|
+
this.video(file.key, file.urls ? file.urls : file.url);
|
|
569
570
|
break;
|
|
570
571
|
case "audio":
|
|
571
|
-
this.audio(file.key, file.urls, file.autoDecode);
|
|
572
|
+
this.audio(file.key, file.urls ? file.urls : file.url, file.autoDecode);
|
|
572
573
|
break;
|
|
573
574
|
case "audiosprite":
|
|
574
|
-
this.audioSprite(file.key, file.urls, file.jsonURL, file.jsonData, file.autoDecode);
|
|
575
|
+
this.audioSprite(file.key, file.urls ? file.urls : file.url, file.jsonURL, file.jsonData, file.autoDecode);
|
|
575
576
|
break;
|
|
576
577
|
case "tilemap":
|
|
577
578
|
// TODO
|
|
@@ -584,15 +585,6 @@ export default class {
|
|
|
584
585
|
case "bitmapFont":
|
|
585
586
|
this.bitmapFont(file.key, file.textureURL, file.atlasURL, file.atlasData, file.xSpacing, file.ySpacing);
|
|
586
587
|
break;
|
|
587
|
-
case "atlasJSONArray":
|
|
588
|
-
this.atlasJSONArray(file.key, file.textureURL, file.atlasURL, file.atlasData);
|
|
589
|
-
break;
|
|
590
|
-
case "atlasJSONHash":
|
|
591
|
-
this.atlasJSONHash(file.key, file.textureURL, file.atlasURL, file.atlasData);
|
|
592
|
-
break;
|
|
593
|
-
case "atlasXML":
|
|
594
|
-
this.atlasXML(file.key, file.textureURL, file.atlasURL, file.atlasData);
|
|
595
|
-
break;
|
|
596
588
|
case "atlas":
|
|
597
589
|
this.atlas(file.key, file.textureURL, file.atlasURL, file.atlasData, file.format === 'TEXTURE_ATLAS_JSON_HASH' ? TEXTURE_ATLAS_JSON_HASH : TEXTURE_ATLAS_JSON_ARRAY);
|
|
598
590
|
break;
|