@vpmedia/phaser 1.0.29 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/phaser",
3
- "version": "1.0.29",
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,
@@ -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 PowerGamer.Const.RENDER_AUTO, PowerGamer.Const.RENDER_CANVAS, PowerGamer.Const.RENDER_WEBGL
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.useXDomainRequest = false;
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.enableParallel ? Math.max(1, this.maxParallelDownloads) : 1;
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.
@@ -569,10 +566,13 @@ export default class {
569
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 ? file.urls : file.url, file.autoDecode);
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 ? file.urls : file.url, file.jsonURL, file.jsonData, file.autoDecode);
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