phaser-rails 2.4.7.0 → 2.4.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e8170528a1d5a9b35d3a7d14019be79eef34044
4
- data.tar.gz: 76374c9bbbc2ca0813e0a430870dd5ffef1bc254
3
+ metadata.gz: 5eeea8aafe235e506bc45b64444bef7107653484
4
+ data.tar.gz: 45b6c6aeee91ce3c4649c21009926052aa3b8edb
5
5
  SHA512:
6
- metadata.gz: ce221b4fea8f69b65951f34c1d9d9a61fb5a260dcc89adc7b225d9acdf34d8e85a870bacb8f308f1371dd499b718a5dd89b9880484fd99889fd536098ea9018a
7
- data.tar.gz: 98cf927404edef3ba0b6a64d4795b22f08dd16f91e44c7d63d25f17b46542d9d116a5cd46fcee10b59e2f60c96d4fbb949736d35078264603429989e77730e28
6
+ metadata.gz: 506ae0e1c7bcff9bf7e89c5c0565309730796729f94a0f0d5032a19b8ebfdb6daf8c4e4b9453f20cf96b30b749e4359322257c5d9313bccdc1e0167672015b3e
7
+ data.tar.gz: 7a6ebc8f262b1b46fefbd4b193abe3e4aa92a97aed6a44ac288460bc78c083c7a0063ba313dbaa6c0cb853df8ecd63943a1c2b6145fb3f9ee93b3674e0469d0c
@@ -1,5 +1,5 @@
1
1
  module Phaser
2
2
  module Rails
3
- VERSION = "2.4.7.0"
3
+ VERSION = "2.4.8.0"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Phaser - http://phaser.io
9
9
  *
10
- * v2.4.7 "Hinderstap" - Built: Fri Apr 22 2016 15:08:21
10
+ * v2.4.8 "Watch Hill" - Built: Thu May 19 2016 12:22:18
11
11
  *
12
12
  * By Richard Davey http://www.photonstorm.com @photonstorm
13
13
  *
@@ -14248,8 +14248,8 @@ PIXI.DisplayObject.prototype.updateTransform = function(parent)
14248
14248
  this.worldAlpha = this.alpha * p.worldAlpha;
14249
14249
 
14250
14250
  this.worldPosition.set(wt.tx, wt.ty);
14251
- this.worldScale.set(Math.sqrt(wt.a * wt.a + wt.b * wt.b), Math.sqrt(wt.c * wt.c + wt.d * wt.d));
14252
- this.worldRotation = Math.atan2(-wt.c, wt.d);
14251
+ this.worldScale.set(wt.a, wt.d);
14252
+ this.worldRotation = Math.atan2(wt.c, wt.d);
14253
14253
 
14254
14254
  // reset the bounds each time this is called!
14255
14255
  this._currentBounds = null;
@@ -14317,7 +14317,7 @@ PIXI.DisplayObject.prototype.preUpdate = function()
14317
14317
  * @param resolution {Number} The resolution of the texture being generated
14318
14318
  * @param scaleMode {Number} See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
14319
14319
  * @param renderer {CanvasRenderer|WebGLRenderer} The renderer used to generate the texture.
14320
- * @return {Texture} a texture of the graphics object
14320
+ * @return {RenderTexture} a texture of the graphics object
14321
14321
  */
14322
14322
  PIXI.DisplayObject.prototype.generateTexture = function(resolution, scaleMode, renderer)
14323
14323
  {
@@ -15507,6 +15507,7 @@ PIXI.Sprite.prototype._renderCanvas = function(renderSession, matrix)
15507
15507
  this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint);
15508
15508
 
15509
15509
  this.cachedTint = this.tint;
15510
+ this.texture.requiresReTint = false;
15510
15511
  }
15511
15512
 
15512
15513
  renderSession.context.drawImage(this.tintedTexture, 0, 0, cw, ch, dx, dy, cw / resolution, ch / resolution);
@@ -16115,6 +16116,7 @@ PIXI.compileProgram = function(gl, vertexSrc, fragmentSrc)
16115
16116
 
16116
16117
  if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS))
16117
16118
  {
16119
+ window.console.log(gl.getProgramInfoLog(shaderProgram));
16118
16120
  window.console.log("Could not initialise shaders");
16119
16121
  }
16120
16122
 
@@ -18010,6 +18012,7 @@ PIXI.WebGLShaderManager.prototype.setContext = function(gl)
18010
18012
 
18011
18013
  // the next one is used for rendering triangle strips
18012
18014
  this.stripShader = new PIXI.StripShader(gl);
18015
+
18013
18016
  this.setShader(this.defaultShader);
18014
18017
  };
18015
18018
 
@@ -22767,7 +22770,7 @@ var Phaser = Phaser || {
22767
22770
  * @constant
22768
22771
  * @type {string}
22769
22772
  */
22770
- VERSION: '2.4.7',
22773
+ VERSION: '2.4.8',
22771
22774
 
22772
22775
  /**
22773
22776
  * An array of Phaser game instances.
@@ -27988,7 +27991,7 @@ Phaser.Camera = function (game, id, x, y, width, height) {
27988
27991
  * The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World.
27989
27992
  * The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound
27990
27993
  * at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world.
27991
- *
27994
+ *
27992
27995
  * @property {Phaser.Rectangle} bounds - The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.
27993
27996
  */
27994
27997
  this.bounds = new Phaser.Rectangle(x, y, width, height);
@@ -28211,10 +28214,10 @@ Phaser.Camera.prototype = {
28211
28214
  *
28212
28215
  * You can set the follow type and a linear interpolation value.
28213
28216
  * Use low lerp values (such as 0.1) to automatically smooth the camera motion.
28214
- *
28217
+ *
28215
28218
  * If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.
28216
28219
  * This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.
28217
- *
28220
+ *
28218
28221
  * @method Phaser.Camera#follow
28219
28222
  * @param {Phaser.Sprite|Phaser.Image|Phaser.Text} target - The object you want the camera to track. Set to null to not follow anything.
28220
28223
  * @param {number} [style] - Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow().
@@ -28379,7 +28382,7 @@ Phaser.Camera.prototype = {
28379
28382
  },
28380
28383
 
28381
28384
  /**
28382
- * This creates a camera fade effect. It works by filling the game with the
28385
+ * This creates a camera fade effect. It works by filling the game with the
28383
28386
  * color specified, over the duration given, ending with a solid fill.
28384
28387
  *
28385
28388
  * You can use this for things such as transitioning to a new scene.
@@ -28849,6 +28852,28 @@ Object.defineProperty(Phaser.Camera.prototype, "height", {
28849
28852
 
28850
28853
  });
28851
28854
 
28855
+
28856
+ /**
28857
+ * The Cameras shake intensity.
28858
+ * @name Phaser.Camera#shakeIntensity
28859
+ * @property {number} shakeIntensity - Gets or sets the cameras shake intensity.
28860
+ */
28861
+ Object.defineProperty(Phaser.Camera.prototype, "shakeIntensity", {
28862
+
28863
+ get: function () {
28864
+
28865
+ return this._shake.intensity;
28866
+
28867
+ },
28868
+
28869
+ set: function (value) {
28870
+
28871
+ this._shake.intensity = value;
28872
+
28873
+ }
28874
+
28875
+ });
28876
+
28852
28877
  /**
28853
28878
  * @author Richard Davey <rich@photonstorm.com>
28854
28879
  * @copyright 2016 Photon Storm Ltd.
@@ -34482,7 +34507,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
34482
34507
  this.renderer = null;
34483
34508
 
34484
34509
  /**
34485
- * @property {number} renderType - The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS or Phaser.WEBGL.
34510
+ * @property {number} renderType - The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, or Phaser.HEADLESS.
34486
34511
  * @readonly
34487
34512
  */
34488
34513
  this.renderType = Phaser.AUTO;
@@ -35310,11 +35335,14 @@ Phaser.Game.prototype = {
35310
35335
 
35311
35336
  this.state.preRender(elapsedTime);
35312
35337
 
35313
- this.renderer.render(this.stage);
35338
+ if (this.renderType !== Phaser.HEADLESS)
35339
+ {
35340
+ this.renderer.render(this.stage);
35314
35341
 
35315
- this.plugins.render(elapsedTime);
35342
+ this.plugins.render(elapsedTime);
35316
35343
 
35317
- this.state.render(elapsedTime);
35344
+ this.state.render(elapsedTime);
35345
+ }
35318
35346
 
35319
35347
  this.plugins.postRender(elapsedTime);
35320
35348
 
@@ -35362,6 +35390,11 @@ Phaser.Game.prototype = {
35362
35390
  /**
35363
35391
  * Nukes the entire game from orbit.
35364
35392
  *
35393
+ * Calls destroy on Game.state, Game.sound, Game.scale, Game.stage, Game.input, Game.physics and Game.plugins.
35394
+ *
35395
+ * Then sets all of those local handlers to null, destroys the renderer, removes the canvas from the DOM
35396
+ * and resets the PIXI default renderer.
35397
+ *
35365
35398
  * @method Phaser.Game#destroy
35366
35399
  */
35367
35400
  destroy: function () {
@@ -35395,6 +35428,8 @@ Phaser.Game.prototype = {
35395
35428
 
35396
35429
  Phaser.Canvas.removeFromDOM(this.canvas);
35397
35430
 
35431
+ PIXI.defaultRenderer = null;
35432
+
35398
35433
  Phaser.GAMES[this.id] = null;
35399
35434
 
35400
35435
  },
@@ -36018,7 +36053,12 @@ Phaser.Input.prototype = {
36018
36053
  /**
36019
36054
  * Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.
36020
36055
  *
36021
- * The callback will be sent 4 parameters: The Pointer that moved, the x position of the pointer, the y position and the down state.
36056
+ * The callback will be sent 4 parameters:
36057
+ *
36058
+ * A reference to the Phaser.Pointer object that moved,
36059
+ * The x position of the pointer,
36060
+ * The y position,
36061
+ * A boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down).
36022
36062
  *
36023
36063
  * It will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best
36024
36064
  * to only use if you've limited input to a single pointer (i.e. mouse or touch).
@@ -36508,7 +36548,7 @@ Phaser.Input.prototype = {
36508
36548
 
36509
36549
  // Didn't hit the parent, does it have any children?
36510
36550
 
36511
- for (var i = 0, len = displayObject.children.length; i < len; i++)
36551
+ for (var i = 0; i < displayObject.children.length; i++)
36512
36552
  {
36513
36553
  if (this.hitTest(displayObject.children[i], pointer, localPoint))
36514
36554
  {
@@ -39314,7 +39354,7 @@ Object.defineProperty(Phaser.Pointer.prototype, "duration", {
39314
39354
  /**
39315
39355
  * Gets the X value of this Pointer in world coordinates based on the world camera.
39316
39356
  * @name Phaser.Pointer#worldX
39317
- * @property {number} duration - The X value of this Pointer in world coordinates based on the world camera.
39357
+ * @property {number} worldX - The X value of this Pointer in world coordinates based on the world camera.
39318
39358
  * @readonly
39319
39359
  */
39320
39360
  Object.defineProperty(Phaser.Pointer.prototype, "worldX", {
@@ -39330,7 +39370,7 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldX", {
39330
39370
  /**
39331
39371
  * Gets the Y value of this Pointer in world coordinates based on the world camera.
39332
39372
  * @name Phaser.Pointer#worldY
39333
- * @property {number} duration - The Y value of this Pointer in world coordinates based on the world camera.
39373
+ * @property {number} worldY - The Y value of this Pointer in world coordinates based on the world camera.
39334
39374
  * @readonly
39335
39375
  */
39336
39376
  Object.defineProperty(Phaser.Pointer.prototype, "worldY", {
@@ -40516,7 +40556,14 @@ Phaser.InputHandler.prototype = {
40516
40556
  */
40517
40557
  checkPointerDown: function (pointer, fastTest) {
40518
40558
 
40519
- if (!pointer.isDown || !this.enabled || !this.sprite || !this.sprite.parent || !this.sprite.visible || !this.sprite.parent.visible)
40559
+ if (!pointer.isDown ||
40560
+ !this.enabled ||
40561
+ !this.sprite ||
40562
+ !this.sprite.parent ||
40563
+ !this.sprite.visible ||
40564
+ !this.sprite.parent.visible |
40565
+ this.sprite.worldScale.x === 0 ||
40566
+ this.sprite.worldScale.y === 0)
40520
40567
  {
40521
40568
  return false;
40522
40569
  }
@@ -40554,11 +40601,19 @@ Phaser.InputHandler.prototype = {
40554
40601
  */
40555
40602
  checkPointerOver: function (pointer, fastTest) {
40556
40603
 
40557
- if (!this.enabled || !this.sprite || !this.sprite.parent || !this.sprite.visible || !this.sprite.parent.visible)
40604
+ if (!pointer.isDown ||
40605
+ !this.enabled ||
40606
+ !this.sprite ||
40607
+ !this.sprite.parent ||
40608
+ !this.sprite.visible ||
40609
+ !this.sprite.parent.visible |
40610
+ this.sprite.worldScale.x === 0 ||
40611
+ this.sprite.worldScale.y === 0)
40558
40612
  {
40559
40613
  return false;
40560
40614
  }
40561
40615
 
40616
+
40562
40617
  // Need to pass it a temp point, in case we need it again for the pixel check
40563
40618
  if (this.game.input.hitTest(this.sprite, pointer, this._tempPoint))
40564
40619
  {
@@ -44340,11 +44395,6 @@ Phaser.Component.Core.preUpdate = function () {
44340
44395
  this.renderOrderID = this.game.stage.currentRenderOrderID++;
44341
44396
  }
44342
44397
 
44343
- if (this.texture)
44344
- {
44345
- this.texture.requiresReTint = false;
44346
- }
44347
-
44348
44398
  if (this.animations)
44349
44399
  {
44350
44400
  this.animations.update();
@@ -44940,12 +44990,19 @@ Phaser.Component.Destroy.prototype = {
44940
44990
 
44941
44991
  /**
44942
44992
  * The Events component is a collection of events fired by the parent game object.
44993
+ *
44994
+ * Phaser uses what are known as 'Signals' for all event handling. All of the events in
44995
+ * this class are signals you can subscribe to, much in the same way you'd "listen" for
44996
+ * an event.
44943
44997
  *
44944
- * For example to tell when a Sprite has been added to a new group:
44998
+ * For example to tell when a Sprite has been added to a new group, you can bind a function
44999
+ * to the `onAddedToGroup` signal:
44945
45000
  *
44946
45001
  * `sprite.events.onAddedToGroup.add(yourFunction, this);`
44947
45002
  *
44948
45003
  * Where `yourFunction` is the function you want called when this event occurs.
45004
+ *
45005
+ * For more details about how signals work please see the Phaser.Signal class.
44949
45006
  *
44950
45007
  * The Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true`
44951
45008
  * and the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}.
@@ -45897,7 +45954,7 @@ Phaser.Component.LoadTexture.prototype = {
45897
45954
  {
45898
45955
  this.updateCrop();
45899
45956
  }
45900
-
45957
+
45901
45958
  this.texture.requiresReTint = true;
45902
45959
 
45903
45960
  this.texture._updateUvs();
@@ -49509,7 +49566,7 @@ Phaser.BitmapData.prototype = {
49509
49566
  * You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.
49510
49567
  *
49511
49568
  * @method Phaser.BitmapData#copy
49512
- * @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.BitmapData|Image|HTMLCanvasElement|string} [source] - The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.
49569
+ * @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.BitmapData|Phaser.RenderTexture|Image|HTMLCanvasElement|string} [source] - The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.
49513
49570
  * @param {number} [x=0] - The x coordinate representing the top-left of the region to copy from the source image.
49514
49571
  * @param {number} [y=0] - The y coordinate representing the top-left of the region to copy from the source image.
49515
49572
  * @param {number} [width] - The width of the region to copy from the source image. If not specified it will use the full source image width.
@@ -49532,6 +49589,11 @@ Phaser.BitmapData.prototype = {
49532
49589
 
49533
49590
  if (source === undefined || source === null) { source = this; }
49534
49591
 
49592
+ if (source instanceof Phaser.RenderTexture || source instanceof PIXI.RenderTexture)
49593
+ {
49594
+ source = source.getCanvas();
49595
+ }
49596
+
49535
49597
  this._image = source;
49536
49598
 
49537
49599
  if (source instanceof Phaser.Sprite || source instanceof Phaser.Image || source instanceof Phaser.Text || source instanceof PIXI.Sprite)
@@ -49543,7 +49605,15 @@ Phaser.BitmapData.prototype = {
49543
49605
  this._anchor.set(source.anchor.x, source.anchor.y);
49544
49606
  this._rotate = source.rotation;
49545
49607
  this._alpha.current = source.alpha;
49546
- this._image = source.texture.baseTexture.source;
49608
+
49609
+ if (source.texture instanceof Phaser.RenderTexture || source.texture instanceof PIXI.RenderTexture)
49610
+ {
49611
+ this._image = source.texture.getCanvas();
49612
+ }
49613
+ else
49614
+ {
49615
+ this._image = source.texture.baseTexture.source;
49616
+ }
49547
49617
 
49548
49618
  if (tx === undefined || tx === null) { tx = source.x; }
49549
49619
  if (ty === undefined || ty === null) { ty = source.y; }
@@ -49702,7 +49772,7 @@ Phaser.BitmapData.prototype = {
49702
49772
  * Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.
49703
49773
  *
49704
49774
  * @method Phaser.BitmapData#copyRect
49705
- * @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.BitmapData|Image|string} source - The Image to copy from. If you give a string it will try and find the Image in the Game.Cache.
49775
+ * @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.BitmapData|Phaser.RenderTexture|Image|string} source - The Image to copy from. If you give a string it will try and find the Image in the Game.Cache.
49706
49776
  * @param {Phaser.Rectangle} area - The Rectangle region to copy from the source image.
49707
49777
  * @param {number} x - The destination x coordinate to copy the image to.
49708
49778
  * @param {number} y - The destination y coordinate to copy the image to.
@@ -49723,7 +49793,7 @@ Phaser.BitmapData.prototype = {
49723
49793
  * When drawing it will take into account the Sprites rotation, scale and alpha values.
49724
49794
  *
49725
49795
  * @method Phaser.BitmapData#draw
49726
- * @param {Phaser.Sprite|Phaser.Image|Phaser.Text} source - The Sprite, Image or Text object to draw onto this BitmapData.
49796
+ * @param {Phaser.Sprite|Phaser.Image|Phaser.Text|Phaser.RenderTexture} source - The Sprite, Image or Text object to draw onto this BitmapData.
49727
49797
  * @param {number} [x=0] - The x coordinate to translate to before drawing. If not specified it will default to `source.x`.
49728
49798
  * @param {number} [y=0] - The y coordinate to translate to before drawing. If not specified it will default to `source.y`.
49729
49799
  * @param {number} [width] - The new width of the Sprite being copied. If not specified it will default to `source.width`.
@@ -49774,17 +49844,22 @@ Phaser.BitmapData.prototype = {
49774
49844
  */
49775
49845
  drawGroupProxy: function (child, blendMode, roundPx) {
49776
49846
 
49777
- if (child.type === Phaser.EMITTER || child.type === Phaser.BITMAPTEXT)
49847
+ // Draw base Object
49848
+ if (child.hasOwnProperty('texture'))
49849
+ {
49850
+ this.copy(child, null, null, null, null, child.worldPosition.x, child.worldPosition.y, null, null, child.worldRotation, null, null, child.worldScale.x, child.worldScale.y, child.worldAlpha, blendMode, roundPx);
49851
+ }
49852
+
49853
+ if (child.hasOwnProperty('children') && child.children.length > 0)
49778
49854
  {
49855
+ var c;
49856
+
49779
49857
  for (var i = 0; i < child.children.length; i++)
49780
49858
  {
49781
- this.copy(child.children[i], null, null, null, null, null, null, null, null, null, null, null, null, null, null, blendMode, roundPx);
49859
+ c = child.children[i];
49860
+ this.copy(c, null, null, null, null, c.worldPosition.x, c.worldPosition.y, null, null, c.worldRotation, null, null, c.worldScale.x, c.worldScale.y, child.worldAlpha, blendMode, roundPx);
49782
49861
  }
49783
49862
  }
49784
- else
49785
- {
49786
- this.copy(child, null, null, null, null, null, null, null, null, null, null, null, null, null, null, blendMode, roundPx);
49787
- }
49788
49863
 
49789
49864
  },
49790
49865
 
@@ -54600,9 +54675,12 @@ Phaser.Text.prototype.setShadow = function (x, y, color, blur, shadowStroke, sha
54600
54675
  * @param {number} [style.wordWrapWidth=100] - The width in pixels at which text will wrap.
54601
54676
  * @param {number} [style.maxLines=0] - The maximum number of lines to be shown for wrapped text.
54602
54677
  * @param {number|array} [style.tabs=0] - The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an array of varying tab sizes, one per tab stop.
54678
+ * @param {boolean} [update=false] - Immediately update the Text object after setting the new style? Or wait for the next frame.
54603
54679
  * @return {Phaser.Text} This Text instance.
54604
54680
  */
54605
- Phaser.Text.prototype.setStyle = function (style) {
54681
+ Phaser.Text.prototype.setStyle = function (style, update) {
54682
+
54683
+ if (update === undefined) { update = false; }
54606
54684
 
54607
54685
  style = style || {};
54608
54686
  style.font = style.font || 'bold 20pt Arial';
@@ -54656,6 +54734,11 @@ Phaser.Text.prototype.setStyle = function (style) {
54656
54734
  this.style = style;
54657
54735
  this.dirty = true;
54658
54736
 
54737
+ if (update)
54738
+ {
54739
+ this.updateText();
54740
+ }
54741
+
54659
54742
  return this;
54660
54743
 
54661
54744
  };
@@ -58238,7 +58321,7 @@ Phaser.TileSprite.prototype.reset = function(x, y) {
58238
58321
 
58239
58322
  /**
58240
58323
  * @classdesc
58241
- * Detects device support capabilities and is responsible for device intialization - see {@link Phaser.Device.whenReady whenReady}.
58324
+ * Detects device support capabilities and is responsible for device initialization - see {@link Phaser.Device.whenReady whenReady}.
58242
58325
  *
58243
58326
  * This class represents a singleton object that can be accessed directly as `game.device`
58244
58327
  * (or, as a fallback, `Phaser.Device` when a game instance is not available) without the need to instantiate it.
@@ -65277,7 +65360,7 @@ Phaser.Timer.prototype = {
65277
65360
  /**
65278
65361
  * Creates a new TimerEvent on this Timer.
65279
65362
  *
65280
- * Use {@link Phaser.Timer#add}, {@link Phaser.Timer#add}, or {@link Phaser.Timer#add} methods to create a new event.
65363
+ * Use {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.
65281
65364
  *
65282
65365
  * @method Phaser.Timer#create
65283
65366
  * @private
@@ -73815,6 +73898,12 @@ Phaser.Sound = function (game, key, volume, loop, connect) {
73815
73898
  */
73816
73899
  this._tempVolume = 0;
73817
73900
 
73901
+ /**
73902
+ * @property {number} _tempPause - Internal marker var.
73903
+ * @private
73904
+ */
73905
+ this._tempPause = 0;
73906
+
73818
73907
  /**
73819
73908
  * @property {number} _muteVolume - Internal cache var.
73820
73909
  * @private
@@ -73952,6 +74041,9 @@ Phaser.Sound.prototype = {
73952
74041
  // won't work with markers, needs to reset the position
73953
74042
  this.onLoop.dispatch(this);
73954
74043
 
74044
+ // Gets reset by the play function
74045
+ this.isPlaying = false;
74046
+
73955
74047
  if (this.currentMarker === '')
73956
74048
  {
73957
74049
  this.currentTime = 0;
@@ -73977,6 +74069,16 @@ Phaser.Sound.prototype = {
73977
74069
  if (this.loop)
73978
74070
  {
73979
74071
  this.onLoop.dispatch(this);
74072
+
74073
+ if (this.currentMarker === '')
74074
+ {
74075
+ this.currentTime = 0;
74076
+ this.startTime = this.game.time.time;
74077
+ }
74078
+
74079
+ // Gets reset by the play function
74080
+ this.isPlaying = false;
74081
+
73980
74082
  this.play(this.currentMarker, 0, this.volume, true, true);
73981
74083
  }
73982
74084
  else
@@ -74223,6 +74325,7 @@ Phaser.Sound.prototype = {
74223
74325
  this.startTime = this.game.time.time;
74224
74326
  this.currentTime = 0;
74225
74327
  this.stopTime = this.startTime + this.durationMS;
74328
+
74226
74329
  this.onPlay.dispatch(this);
74227
74330
  }
74228
74331
  else
@@ -74268,6 +74371,7 @@ Phaser.Sound.prototype = {
74268
74371
  this.paused = true;
74269
74372
  this.pausedPosition = this.currentTime;
74270
74373
  this.pausedTime = this.game.time.time;
74374
+ this._tempPause = this._sound.currentTime;
74271
74375
  this.onPause.dispatch(this);
74272
74376
  this.stop();
74273
74377
  }
@@ -74338,6 +74442,7 @@ Phaser.Sound.prototype = {
74338
74442
  }
74339
74443
  else
74340
74444
  {
74445
+ this._sound.currentTime = this._tempPause;
74341
74446
  this._sound.play();
74342
74447
  }
74343
74448
 
@@ -75534,7 +75639,6 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", {
75534
75639
  }
75535
75640
 
75536
75641
  this.onVolumeChange.dispatch(value);
75537
-
75538
75642
  }
75539
75643
 
75540
75644
  }
@@ -83408,9 +83512,10 @@ Phaser.Physics.Arcade.prototype = {
83408
83512
  * @method Phaser.Physics.Arcade#getOverlapX
83409
83513
  * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.
83410
83514
  * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.
83515
+ * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?
83411
83516
  * @return {float} Returns the amount of horizontal overlap between the two bodies.
83412
83517
  */
83413
- getOverlapX: function (body1, body2) {
83518
+ getOverlapX: function (body1, body2, overlapOnly) {
83414
83519
 
83415
83520
  var overlap = 0;
83416
83521
  var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + this.OVERLAP_BIAS;
@@ -83426,7 +83531,7 @@ Phaser.Physics.Arcade.prototype = {
83426
83531
  // Body1 is moving right and / or Body2 is moving left
83427
83532
  overlap = body1.right - body2.x;
83428
83533
 
83429
- if ((overlap > maxOverlap) || body1.checkCollision.right === false || body2.checkCollision.left === false)
83534
+ if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false)
83430
83535
  {
83431
83536
  overlap = 0;
83432
83537
  }
@@ -83443,7 +83548,7 @@ Phaser.Physics.Arcade.prototype = {
83443
83548
  // Body1 is moving left and/or Body2 is moving right
83444
83549
  overlap = body1.x - body2.width - body2.x;
83445
83550
 
83446
- if ((-overlap > maxOverlap) || body1.checkCollision.left === false || body2.checkCollision.right === false)
83551
+ if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false)
83447
83552
  {
83448
83553
  overlap = 0;
83449
83554
  }
@@ -83471,9 +83576,10 @@ Phaser.Physics.Arcade.prototype = {
83471
83576
  * @method Phaser.Physics.Arcade#getOverlapY
83472
83577
  * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.
83473
83578
  * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.
83579
+ * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?
83474
83580
  * @return {float} Returns the amount of vertical overlap between the two bodies.
83475
83581
  */
83476
- getOverlapY: function (body1, body2) {
83582
+ getOverlapY: function (body1, body2, overlapOnly) {
83477
83583
 
83478
83584
  var overlap = 0;
83479
83585
  var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + this.OVERLAP_BIAS;
@@ -83489,7 +83595,7 @@ Phaser.Physics.Arcade.prototype = {
83489
83595
  // Body1 is moving down and/or Body2 is moving up
83490
83596
  overlap = body1.bottom - body2.y;
83491
83597
 
83492
- if ((overlap > maxOverlap) || body1.checkCollision.down === false || body2.checkCollision.up === false)
83598
+ if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false)
83493
83599
  {
83494
83600
  overlap = 0;
83495
83601
  }
@@ -83506,7 +83612,7 @@ Phaser.Physics.Arcade.prototype = {
83506
83612
  // Body1 is moving up and/or Body2 is moving down
83507
83613
  overlap = body1.y - body2.bottom;
83508
83614
 
83509
- if ((-overlap > maxOverlap) || body1.checkCollision.up === false || body2.checkCollision.down === false)
83615
+ if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false)
83510
83616
  {
83511
83617
  overlap = 0;
83512
83618
  }
@@ -83539,13 +83645,13 @@ Phaser.Physics.Arcade.prototype = {
83539
83645
  */
83540
83646
  separateX: function (body1, body2, overlapOnly) {
83541
83647
 
83542
- var overlap = this.getOverlapX(body1, body2);
83648
+ var overlap = this.getOverlapX(body1, body2, overlapOnly);
83543
83649
 
83544
83650
  // Can't separate two immovable bodies, or a body with its own custom separation logic
83545
83651
  if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)
83546
83652
  {
83547
83653
  // return true if there was some overlap, otherwise false
83548
- return (overlap !== 0);
83654
+ return (overlap !== 0) || (body1.embedded && body2.embedded);
83549
83655
  }
83550
83656
 
83551
83657
  // Adjust their positions and velocities accordingly (if there was any overlap)
@@ -83609,13 +83715,13 @@ Phaser.Physics.Arcade.prototype = {
83609
83715
  */
83610
83716
  separateY: function (body1, body2, overlapOnly) {
83611
83717
 
83612
- var overlap = this.getOverlapY(body1, body2);
83718
+ var overlap = this.getOverlapY(body1, body2, overlapOnly);
83613
83719
 
83614
83720
  // Can't separate two immovable bodies, or a body with its own custom separation logic
83615
83721
  if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY)
83616
83722
  {
83617
83723
  // return true if there was some overlap, otherwise false
83618
- return (overlap !== 0);
83724
+ return (overlap !== 0) || (body1.embedded && body2.embedded);
83619
83725
  }
83620
83726
 
83621
83727
  // Adjust their positions and velocities accordingly (if there was any overlap)
@@ -83989,15 +84095,22 @@ Phaser.Physics.Arcade.prototype = {
83989
84095
  /**
83990
84096
  * Find the distance between two display objects (like Sprites).
83991
84097
  *
84098
+ * The optional `world` argument allows you to return the result based on the Game Objects `world` property,
84099
+ * instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,
84100
+ * or parent Game Object.
84101
+ *
83992
84102
  * @method Phaser.Physics.Arcade#distanceBetween
83993
84103
  * @param {any} source - The Display Object to test from.
83994
84104
  * @param {any} target - The Display Object to test to.
84105
+ * @param {boolean} [world=false] - Calculate the distance using World coordinates (true), or Object coordinates (false, the default)
83995
84106
  * @return {number} The distance between the source and target objects.
83996
84107
  */
83997
- distanceBetween: function (source, target) {
84108
+ distanceBetween: function (source, target, world) {
83998
84109
 
83999
- var dx = source.x - target.x;
84000
- var dy = source.y - target.y;
84110
+ if (world === undefined) { world = false; }
84111
+
84112
+ var dx = (world) ? source.world.x - target.world.x : source.x - target.x;
84113
+ var dy = (world) ? source.world.y - target.world.y : source.y - target.y;
84001
84114
 
84002
84115
  return Math.sqrt(dx * dx + dy * dy);
84003
84116
 
@@ -84008,16 +84121,23 @@ Phaser.Physics.Arcade.prototype = {
84008
84121
  * The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.
84009
84122
  * If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()
84010
84123
  *
84124
+ * The optional `world` argument allows you to return the result based on the Game Objects `world` property,
84125
+ * instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,
84126
+ * or parent Game Object.
84127
+ *
84011
84128
  * @method Phaser.Physics.Arcade#distanceToXY
84012
84129
  * @param {any} displayObject - The Display Object to test from.
84013
84130
  * @param {number} x - The x coordinate to move towards.
84014
84131
  * @param {number} y - The y coordinate to move towards.
84132
+ * @param {boolean} [world=false] - Calculate the distance using World coordinates (true), or Object coordinates (false, the default)
84015
84133
  * @return {number} The distance between the object and the x/y coordinates.
84016
84134
  */
84017
- distanceToXY: function (displayObject, x, y) {
84135
+ distanceToXY: function (displayObject, x, y, world) {
84136
+
84137
+ if (world === undefined) { world = false; }
84018
84138
 
84019
- var dx = displayObject.x - x;
84020
- var dy = displayObject.y - y;
84139
+ var dx = (world) ? displayObject.world.x - x : displayObject.x - x;
84140
+ var dy = (world) ? displayObject.world.y - y : displayObject.y - y;
84021
84141
 
84022
84142
  return Math.sqrt(dx * dx + dy * dy);
84023
84143
 
@@ -84027,19 +84147,24 @@ Phaser.Physics.Arcade.prototype = {
84027
84147
  * Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used.
84028
84148
  * The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.
84029
84149
  * If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()
84030
- * The distance to the Pointer is returned in screen space, not world space.
84150
+ *
84151
+ * The optional `world` argument allows you to return the result based on the Game Objects `world` property,
84152
+ * instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,
84153
+ * or parent Game Object.
84031
84154
  *
84032
84155
  * @method Phaser.Physics.Arcade#distanceToPointer
84033
84156
  * @param {any} displayObject - The Display Object to test from.
84034
84157
  * @param {Phaser.Pointer} [pointer] - The Phaser.Pointer to test to. If none is given then Input.activePointer is used.
84158
+ * @param {boolean} [world=false] - Calculate the distance using World coordinates (true), or Object coordinates (false, the default)
84035
84159
  * @return {number} The distance between the object and the Pointer.
84036
84160
  */
84037
- distanceToPointer: function (displayObject, pointer) {
84161
+ distanceToPointer: function (displayObject, pointer, world) {
84038
84162
 
84039
- pointer = pointer || this.game.input.activePointer;
84163
+ if (pointer === undefined) { pointer = this.game.input.activePointer; }
84164
+ if (world === undefined) { world = false; }
84040
84165
 
84041
- var dx = displayObject.x - pointer.worldX;
84042
- var dy = displayObject.y - pointer.worldY;
84166
+ var dx = (world) ? displayObject.world.x - pointer.worldX : displayObject.x - pointer.worldX;
84167
+ var dy = (world) ? displayObject.world.y - pointer.worldY : displayObject.y - pointer.worldY;
84043
84168
 
84044
84169
  return Math.sqrt(dx * dx + dy * dy);
84045
84170
 
@@ -84048,54 +84173,86 @@ Phaser.Physics.Arcade.prototype = {
84048
84173
  /**
84049
84174
  * Find the angle in radians between two display objects (like Sprites).
84050
84175
  *
84176
+ * The optional `world` argument allows you to return the result based on the Game Objects `world` property,
84177
+ * instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,
84178
+ * or parent Game Object.
84179
+ *
84051
84180
  * @method Phaser.Physics.Arcade#angleBetween
84052
84181
  * @param {any} source - The Display Object to test from.
84053
84182
  * @param {any} target - The Display Object to test to.
84183
+ * @param {boolean} [world=false] - Calculate the angle using World coordinates (true), or Object coordinates (false, the default)
84054
84184
  * @return {number} The angle in radians between the source and target display objects.
84055
84185
  */
84056
- angleBetween: function (source, target) {
84186
+ angleBetween: function (source, target, world) {
84057
84187
 
84058
- var dx = target.x - source.x;
84059
- var dy = target.y - source.y;
84188
+ if (world === undefined) { world = false; }
84060
84189
 
84061
- return Math.atan2(dy, dx);
84190
+ if (world)
84191
+ {
84192
+ return Math.atan2(target.world.y - source.world.y, target.world.x - source.world.x);
84193
+ }
84194
+ else
84195
+ {
84196
+ return Math.atan2(target.y - source.y, target.x - source.x);
84197
+ }
84062
84198
 
84063
84199
  },
84064
84200
 
84065
84201
  /**
84066
84202
  * Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.
84067
84203
  *
84204
+ * The optional `world` argument allows you to return the result based on the Game Objects `world` property,
84205
+ * instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,
84206
+ * or parent Game Object.
84207
+ *
84068
84208
  * @method Phaser.Physics.Arcade#angleToXY
84069
84209
  * @param {any} displayObject - The Display Object to test from.
84070
84210
  * @param {number} x - The x coordinate to get the angle to.
84071
84211
  * @param {number} y - The y coordinate to get the angle to.
84212
+ * @param {boolean} [world=false] - Calculate the angle using World coordinates (true), or Object coordinates (false, the default)
84072
84213
  * @return {number} The angle in radians between displayObject.x/y to Pointer.x/y
84073
84214
  */
84074
- angleToXY: function (displayObject, x, y) {
84215
+ angleToXY: function (displayObject, x, y, world) {
84075
84216
 
84076
- var dx = x - displayObject.x;
84077
- var dy = y - displayObject.y;
84217
+ if (world === undefined) { world = false; }
84078
84218
 
84079
- return Math.atan2(dy, dx);
84219
+ if (world)
84220
+ {
84221
+ return Math.atan2(y - displayObject.world.y, x - displayObject.world.x);
84222
+ }
84223
+ else
84224
+ {
84225
+ return Math.atan2(y - displayObject.y, x - displayObject.x);
84226
+ }
84080
84227
 
84081
84228
  },
84082
84229
 
84083
84230
  /**
84084
84231
  * Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.
84085
84232
  *
84233
+ * The optional `world` argument allows you to return the result based on the Game Objects `world` property,
84234
+ * instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,
84235
+ * or parent Game Object.
84236
+ *
84086
84237
  * @method Phaser.Physics.Arcade#angleToPointer
84087
84238
  * @param {any} displayObject - The Display Object to test from.
84088
84239
  * @param {Phaser.Pointer} [pointer] - The Phaser.Pointer to test to. If none is given then Input.activePointer is used.
84240
+ * @param {boolean} [world=false] - Calculate the angle using World coordinates (true), or Object coordinates (false, the default)
84089
84241
  * @return {number} The angle in radians between displayObject.x/y to Pointer.x/y
84090
84242
  */
84091
- angleToPointer: function (displayObject, pointer) {
84092
-
84093
- pointer = pointer || this.game.input.activePointer;
84243
+ angleToPointer: function (displayObject, pointer, world) {
84094
84244
 
84095
- var dx = pointer.worldX - displayObject.x;
84096
- var dy = pointer.worldY - displayObject.y;
84245
+ if (pointer === undefined) { pointer = this.game.input.activePointer; }
84246
+ if (world === undefined) { world = false; }
84097
84247
 
84098
- return Math.atan2(dy, dx);
84248
+ if (world)
84249
+ {
84250
+ return Math.atan2(pointer.worldY - displayObject.world.y, pointer.worldX - displayObject.world.x);
84251
+ }
84252
+ else
84253
+ {
84254
+ return Math.atan2(pointer.worldY - displayObject.y, pointer.worldX - displayObject.x);
84255
+ }
84099
84256
 
84100
84257
  },
84101
84258
 
@@ -84110,12 +84267,7 @@ Phaser.Physics.Arcade.prototype = {
84110
84267
  */
84111
84268
  worldAngleToPointer: function (displayObject, pointer) {
84112
84269
 
84113
- pointer = pointer || this.game.input.activePointer;
84114
-
84115
- var dx = pointer.worldX - displayObject.world.x;
84116
- var dy = pointer.worldY - displayObject.world.y;
84117
-
84118
- return Math.atan2(dy, dx);
84270
+ return this.angleToPointer(displayObject, pointer, true);
84119
84271
 
84120
84272
  }
84121
84273
 
@@ -84284,6 +84436,14 @@ Phaser.Physics.Arcade.Body = function (sprite) {
84284
84436
  */
84285
84437
  this.bounce = new Phaser.Point();
84286
84438
 
84439
+ /**
84440
+ * The elasticity of the Body when colliding with the World bounds.
84441
+ * By default this property is `null`, in which case `Body.bounce` is used instead. Set this property
84442
+ * to a Phaser.Point object in order to enable a World bounds specific bounce value.
84443
+ * @property {Phaser.Point} worldBounce
84444
+ */
84445
+ this.worldBounce = null;
84446
+
84287
84447
  /**
84288
84448
  * @property {Phaser.Point} maxVelocity - The maximum velocity in pixels per second sq. that the Body can reach.
84289
84449
  * @default
@@ -84567,8 +84727,9 @@ Phaser.Physics.Arcade.Body.prototype = {
84567
84727
 
84568
84728
  this.updateBounds();
84569
84729
 
84570
- this.position.x = (this.sprite.world.x - (this.sprite.anchor.x * this.width)) + this.offset.x;
84571
- this.position.y = (this.sprite.world.y - (this.sprite.anchor.y * this.height)) + this.offset.y;
84730
+ this.position.x = (this.sprite.world.x - (this.sprite.anchor.x * this.sprite.width)) + this.offset.x;
84731
+ this.position.y = (this.sprite.world.y - (this.sprite.anchor.y * this.sprite.height)) + this.offset.y;
84732
+
84572
84733
  this.rotation = this.sprite.angle;
84573
84734
 
84574
84735
  this.preRotation = this.rotation;
@@ -84703,29 +84864,32 @@ Phaser.Physics.Arcade.Body.prototype = {
84703
84864
  var bounds = this.game.physics.arcade.bounds;
84704
84865
  var check = this.game.physics.arcade.checkCollision;
84705
84866
 
84867
+ var bx = (this.worldBounce) ? -this.worldBounce.x : -this.bounce.x;
84868
+ var by = (this.worldBounce) ? -this.worldBounce.y : -this.bounce.y;
84869
+
84706
84870
  if (pos.x < bounds.x && check.left)
84707
84871
  {
84708
84872
  pos.x = bounds.x;
84709
- this.velocity.x *= -this.bounce.x;
84873
+ this.velocity.x *= bx;
84710
84874
  this.blocked.left = true;
84711
84875
  }
84712
84876
  else if (this.right > bounds.right && check.right)
84713
84877
  {
84714
84878
  pos.x = bounds.right - this.width;
84715
- this.velocity.x *= -this.bounce.x;
84879
+ this.velocity.x *= bx;
84716
84880
  this.blocked.right = true;
84717
84881
  }
84718
84882
 
84719
84883
  if (pos.y < bounds.y && check.up)
84720
84884
  {
84721
84885
  pos.y = bounds.y;
84722
- this.velocity.y *= -this.bounce.y;
84886
+ this.velocity.y *= by;
84723
84887
  this.blocked.up = true;
84724
84888
  }
84725
84889
  else if (this.bottom > bounds.bottom && check.down)
84726
84890
  {
84727
84891
  pos.y = bounds.bottom - this.height;
84728
- this.velocity.y *= -this.bounce.y;
84892
+ this.velocity.y *= by;
84729
84893
  this.blocked.down = true;
84730
84894
  }
84731
84895
 
@@ -84824,8 +84988,8 @@ Phaser.Physics.Arcade.Body.prototype = {
84824
84988
  this.angularVelocity = 0;
84825
84989
  this.angularAcceleration = 0;
84826
84990
 
84827
- this.position.x = (x - (this.sprite.anchor.x * this.width)) + this.offset.x;
84828
- this.position.y = (y - (this.sprite.anchor.y * this.height)) + this.offset.y;
84991
+ this.position.x = (x - (this.sprite.anchor.x * this.sprite.width)) + this.offset.x;
84992
+ this.position.y = (y - (this.sprite.anchor.y * this.sprite.height)) + this.offset.y;
84829
84993
 
84830
84994
  this.prev.x = this.position.x;
84831
84995
  this.prev.y = this.position.y;
@@ -92056,9 +92220,10 @@ Phaser.Tilemap.prototype = {
92056
92220
  * @param {number} [width] - The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width.
92057
92221
  * @param {number} [height] - The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height.
92058
92222
  * @param {Phaser.Group} [group] - Optional Group to add the object to. If not specified it will be added to the World group.
92223
+ * @param {boolean} [pixiTest] - Temporary additional flag to enable tests of the PIXI.Tilemap renderer
92059
92224
  * @return {Phaser.TilemapLayer} The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly.
92060
92225
  */
92061
- createLayer: function (layer, width, height, group) {
92226
+ createLayer: function (layer, width, height, group, pixiTest) {
92062
92227
 
92063
92228
  // Add Buffer support for the left of the canvas
92064
92229
 
@@ -92079,6 +92244,11 @@ Phaser.Tilemap.prototype = {
92079
92244
  return;
92080
92245
  }
92081
92246
 
92247
+ if ( pixiTest )
92248
+ {
92249
+ return group.add(new Phaser.TilemapLayerGL(this.game, this, index, width, height));
92250
+ }
92251
+
92082
92252
  return group.add(new Phaser.TilemapLayer(this.game, this, index, width, height));
92083
92253
 
92084
92254
  },