@vpmedia/phaser 1.0.28 → 1.0.30
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/index.js +0 -2
- package/src/phaser/core/game.js +3 -2
- package/src/phaser/core/loader.js +8 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/phaser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
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",
|
package/src/index.js
CHANGED
|
@@ -21,7 +21,6 @@ import InputTouch from './phaser/core/input_touch';
|
|
|
21
21
|
import Loader from './phaser/core/loader';
|
|
22
22
|
import GameLoopRAF from './phaser/core/raf';
|
|
23
23
|
import GameLoopTO from './phaser/core/raf_to';
|
|
24
|
-
import GameLoopFB from './phaser/core/raf_fb';
|
|
25
24
|
import ScaleManager from './phaser/core/scale_manager';
|
|
26
25
|
import Scene from './phaser/core/scene';
|
|
27
26
|
import SceneManager from './phaser/core/scene_manager';
|
|
@@ -90,7 +89,6 @@ export {
|
|
|
90
89
|
Loader,
|
|
91
90
|
GameLoopRAF,
|
|
92
91
|
GameLoopTO,
|
|
93
|
-
GameLoopFB,
|
|
94
92
|
MathUtils,
|
|
95
93
|
StringUtils,
|
|
96
94
|
ScaleManager,
|
package/src/phaser/core/game.js
CHANGED
|
@@ -190,7 +190,6 @@ export default class {
|
|
|
190
190
|
|
|
191
191
|
parseConfig(config) {
|
|
192
192
|
/* game */
|
|
193
|
-
this.parseConfigElement(config, 'isDestroyUnload', false);
|
|
194
193
|
this.parseConfigElement(config, 'isSkipWindowFocus', false);
|
|
195
194
|
this.parseConfigElement(config, 'forceSetTimeOut', false);
|
|
196
195
|
this.parseConfigElement(config, 'lockRender', false);
|
|
@@ -214,10 +213,12 @@ export default class {
|
|
|
214
213
|
// Clear the Canvas each frame before rendering the display list.
|
|
215
214
|
// You can set this to `false` to gain some performance if your game always contains a background that completely fills the display.
|
|
216
215
|
this.parseConfigElement(config, 'clearBeforeRender', true);
|
|
217
|
-
// The Renderer this game will use. Either
|
|
216
|
+
// The Renderer this game will use. Either Const.RENDER_AUTO, Const.RENDER_CANVAS, Const.RENDER_WEBGL
|
|
218
217
|
this.parseConfigElement(config, 'renderType', RENDER_AUTO);
|
|
219
218
|
// Force audio disabled
|
|
220
219
|
this.parseConfigElement(config, 'isForceDisabledAudio', false);
|
|
220
|
+
// Sets the number of maximum parallel requests for the loaded (in case of HTTP/2 you can raise this)
|
|
221
|
+
this.parseConfigElement(config, 'maxParallelDownloads', 16);
|
|
221
222
|
if (config.renderer) {
|
|
222
223
|
this.config.renderType = config.renderer;
|
|
223
224
|
}
|
|
@@ -34,10 +34,7 @@ export default class {
|
|
|
34
34
|
this.onFileStart = new Signal();
|
|
35
35
|
this.onFileComplete = new Signal();
|
|
36
36
|
this.onFileError = new Signal();
|
|
37
|
-
this.
|
|
38
|
-
this._warnedAboutXDomainRequest = false;
|
|
39
|
-
this.enableParallel = true;
|
|
40
|
-
this.maxParallelDownloads = 5;
|
|
37
|
+
this.maxParallelDownloads = this.game.config.maxParallelDownloads || 16;
|
|
41
38
|
this._withSyncPointDepth = 0;
|
|
42
39
|
this._fileList = [];
|
|
43
40
|
this._flightQueue = [];
|
|
@@ -446,7 +443,7 @@ export default class {
|
|
|
446
443
|
}
|
|
447
444
|
// When true further non-pack file downloads are suppressed
|
|
448
445
|
let syncblock = false;
|
|
449
|
-
const inflightLimit = this.
|
|
446
|
+
const inflightLimit = this.maxParallelDownloads;
|
|
450
447
|
for (let i = this._processingHead; i < this._fileList.length; i += 1) {
|
|
451
448
|
const file = this._fileList[i];
|
|
452
449
|
// Pack is fetched (ie. has data) and is currently at the start of the process queue.
|
|
@@ -566,13 +563,16 @@ export default class {
|
|
|
566
563
|
this.spritesheet(file.key, file.url, file.frameWidth, file.frameHeight, file.frameMax, file.margin, file.spacing);
|
|
567
564
|
break;
|
|
568
565
|
case "video":
|
|
569
|
-
this.video(file.key, file.urls);
|
|
566
|
+
this.video(file.key, file.urls ? file.urls : file.url);
|
|
570
567
|
break;
|
|
571
568
|
case "audio":
|
|
572
|
-
this.audio(file.key, file.urls
|
|
569
|
+
this.audio(file.key, file.urls ? file.urls : file.url);
|
|
573
570
|
break;
|
|
574
571
|
case "audiosprite":
|
|
575
|
-
this.audioSprite(file.key, file.urls
|
|
572
|
+
this.audioSprite(file.key, file.urls ? file.urls : file.url, file.jsonURL, file.jsonData);
|
|
573
|
+
break;
|
|
574
|
+
case "audioSprite":
|
|
575
|
+
this.audioSprite(file.key, file.audioURL, file.jsonURL, file.jsonData);
|
|
576
576
|
break;
|
|
577
577
|
case "tilemap":
|
|
578
578
|
// TODO
|
|
@@ -585,15 +585,6 @@ export default class {
|
|
|
585
585
|
case "bitmapFont":
|
|
586
586
|
this.bitmapFont(file.key, file.textureURL, file.atlasURL, file.atlasData, file.xSpacing, file.ySpacing);
|
|
587
587
|
break;
|
|
588
|
-
case "atlasJSONArray":
|
|
589
|
-
this.atlasJSONArray(file.key, file.textureURL, file.atlasURL, file.atlasData);
|
|
590
|
-
break;
|
|
591
|
-
case "atlasJSONHash":
|
|
592
|
-
this.atlasJSONHash(file.key, file.textureURL, file.atlasURL, file.atlasData);
|
|
593
|
-
break;
|
|
594
|
-
case "atlasXML":
|
|
595
|
-
this.atlasXML(file.key, file.textureURL, file.atlasURL, file.atlasData);
|
|
596
|
-
break;
|
|
597
588
|
case "atlas":
|
|
598
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);
|
|
599
590
|
break;
|