Skip to content

Commit

Permalink
Merge pull request #642 from photonstorm/release/v2.13.3
Browse files Browse the repository at this point in the history
Release Phaser CE v2.13.3
  • Loading branch information
photonstorm authored Sep 26, 2019
2 parents 4073f94 + 0deed2d commit 8eb7a85
Show file tree
Hide file tree
Showing 223 changed files with 7,875 additions and 7,794 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## Unreleased
## Version 2.13.3 - 17 Sep 2019

### Bug Fixes

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Phaser CE is a fast, free, and fun open source HTML5 game framework. It uses a c

Phaser v2 was built and maintained by [Photon Storm](http://www.photonstorm.com) and turned over to the community (as Phaser CE) in November 2016. [Phaser v3](http://phaser.io/phaser3) is in active development.

The [current Phaser CE release is 2.13.2](https://github.com/photonstorm/phaser-ce/releases/tag/v2.13.2).
The [current Phaser CE release is 2.13.3](https://github.com/photonstorm/phaser-ce/releases/tag/v2.13.3).

- **Visit:** The [Phaser website](http://phaser.io) and follow on [Twitter](https://twitter.com/photonstorm) (#[phaserjs](https://twitter.com/hashtag/phaserjs))
- **Learn:** [API Docs](https://photonstorm.github.io/phaser-ce/), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
Expand Down Expand Up @@ -88,16 +88,16 @@ Please see additional steps for [Browserify/CommonJS](#browserify) and [Webpack]
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce), a "super-fast CDN for developers". Include the following in your html:

```html
<script src="//cdn.jsdelivr.net/npm/[email protected].2/build/phaser.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected].3/build/phaser.js"></script>
```

or the minified version:

```html
<script src="//cdn.jsdelivr.net/npm/[email protected].2"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected].3"></script>
```

[Custom builds](https://cdn.jsdelivr.net/npm/[email protected].2/build/custom/) are available too.
[Custom builds](https://cdn.jsdelivr.net/npm/[email protected].3/build/custom/) are available too.

<a name="getting-started"></a>

Expand Down Expand Up @@ -312,10 +312,10 @@ All rights reserved.
[![Analytics](https://ga-beacon.appspot.com/UA-44006568-2/phaser/index)](https://github.com/igrigorik/ga-beacon)
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.13.2/phaser.js
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.13.2/phaser.min.js
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.13.2.zip
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.13.2.tar.gz
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.13.3/phaser.js
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.13.3/phaser.min.js
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.13.3.zip
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.13.3.tar.gz
[clone-http]: https://github.com/photonstorm/phaser.git
[clone-ssh]: ssh://[email protected]:photonstorm/phaser.git
[clone-svn]: https://github.com/photonstorm/phaser
Expand Down
2 changes: 1 addition & 1 deletion build/custom/creature.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/custom/p2.min.js

Large diffs are not rendered by default.

86 changes: 49 additions & 37 deletions build/custom/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.13.2 "2019-05-22" - Built: Wed May 22 2019 19:22:14
* v2.13.3 "2019-09-17" - Built: Tue Sep 17 2019 10:32:38
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
Expand Down Expand Up @@ -3985,7 +3985,7 @@ PIXI.WebGLRenderer.prototype.updateCompressedTexture = function (texture)
*/
PIXI.WebGLRenderer.prototype.updateTexture = function (texture)
{
if (!texture.hasLoaded)
if (!texture.hasLoaded || !texture.source)
{
return false;
}
Expand Down Expand Up @@ -4983,15 +4983,6 @@ PIXI.WebGLSpriteBatch.prototype.end = function ()
PIXI.WebGLSpriteBatch.prototype.render = function (sprite, matrix)
{
var texture = sprite.texture;
var baseTexture = texture.baseTexture;
var gl = this.gl;
if (PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] != baseTexture) // eslint-disable-line eqeqeq
{
this.flush();
gl.activeTexture(gl.TEXTURE0 + baseTexture.textureIndex);
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] = baseTexture;
}

// They provided an alternative rendering matrix, so use it
var wt = sprite.worldTransform;
Expand Down Expand Up @@ -5164,16 +5155,7 @@ PIXI.WebGLSpriteBatch.prototype.render = function (sprite, matrix)
PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function (sprite)
{
var texture = sprite.tilingTexture;
var baseTexture = texture.baseTexture;
var gl = this.gl;
var textureIndex = sprite.texture.baseTexture.textureIndex;
if (PIXI.WebGLRenderer.textureArray[textureIndex] != baseTexture) // eslint-disable-line eqeqeq
{
this.flush();
gl.activeTexture(gl.TEXTURE0 + textureIndex);
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[textureIndex] = baseTexture;
}

// check texture..
if (this.currentBatchSize >= this.size)
Expand Down Expand Up @@ -5405,7 +5387,7 @@ PIXI.WebGLSpriteBatch.prototype.flush = function ()
}

//
if (/* (currentBaseTexture != nextTexture && !skip) || */
if ((currentBaseTexture !== nextTexture && !skip) ||
blendSwap ||
shaderSwap)
{
Expand Down Expand Up @@ -5738,6 +5720,13 @@ PIXI.WebGLFastSpriteBatch.prototype.render = function (spriteBatch)
this.renderSession.blendModeManager.setBlendMode(sprite.blendMode);
}

var textureIndex = this.currentBaseTexture.textureIndex;
var gl = this.gl;

gl.activeTexture(gl.TEXTURE0 + textureIndex);
gl.bindTexture(gl.TEXTURE_2D, this.currentBaseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[textureIndex] = this.currentBaseTexture;

for(var i = 0,j = children.length; i < j; i++)
{
this.renderSprite(children[i]);
Expand Down Expand Up @@ -7823,7 +7812,7 @@ var Phaser = Phaser || { // jshint ignore:line
* @constant Phaser.VERSION
* @type {string}
*/
VERSION: '2.13.2',
VERSION: '2.13.3',

/**
* An array of Phaser game instances.
Expand Down Expand Up @@ -12319,16 +12308,16 @@ Phaser.Point.equalsXY = function (a, x, y)
Phaser.Point.fuzzyEquals = function (a, b, epsilon)
{

return Phaser.Math.fuzzyEquals(a.x, b.x, epsilon) &&
Phaser.Math.fuzzyEquals(a.y, b.y, epsilon);
return Phaser.Math.fuzzyEqual(a.x, b.x, epsilon) &&
Phaser.Math.fuzzyEqual(a.y, b.y, epsilon);

};

Phaser.Point.fuzzyEqualsXY = function (a, x, y, epsilon)
{

return Phaser.Math.fuzzyEquals(a.x, x, epsilon) &&
Phaser.Math.fuzzyEquals(a.y, y, epsilon);
return Phaser.Math.fuzzyEqual(a.x, x, epsilon) &&
Phaser.Math.fuzzyEqual(a.y, y, epsilon);

};

Expand Down Expand Up @@ -22586,7 +22575,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
this.renderer = null;

/**
* @property {number} renderType - The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, Phaser.WEBGL_MULTI or Phaser.HEADLESS. After the game boots, renderType reflects the renderer in use: AUTO changes to CANVAS or WEBGL and WEBGL_MULTI changes to WEBGL. HEADLESS skips `preRender`, `render, and `postRender` hooks, just like {@link #lockRender}.
* @property {number} renderType - The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, Phaser.WEBGL_MULTI or Phaser.HEADLESS. After the game boots, renderType reflects the renderer in use: AUTO changes to CANVAS or WEBGL and WEBGL_MULTI changes to WEBGL. HEADLESS skips `preRender`, `render`, and `postRender` hooks, just like {@link #lockRender}.
* @readonly
*/
this.renderType = Phaser.AUTO;
Expand Down Expand Up @@ -23485,6 +23474,12 @@ Phaser.Game.prototype = {
}
}

if (this.renderer.type === Phaser.WEBGL)
{
// flush gl to prevent flickering on some android devices
this.renderer.gl.flush();
}

},

/**
Expand Down Expand Up @@ -31450,7 +31445,7 @@ Phaser.SinglePad.prototype = {
pollStatus: function ()
{

if (!this.connected || !this.game.input.enabled || !this.game.input.gamepad.enabled || (this._rawPad && this._rawPad.timestamp && (this._rawPad.timestamp === this._prevTimestamp)))
if (!this.connected || !this.game.input.enabled || !this.game.input.gamepad.enabled || !this._rawPad || this._rawPad.timestamp && this._rawPad.timestamp === this._prevTimestamp)
{
return;
}
Expand Down Expand Up @@ -35741,7 +35736,7 @@ Phaser.Component.LoadTexture.prototype = {
var cache = this.game.cache;

var setFrame = true;
var smoothed = !this.texture.baseTexture.scaleMode;
var smoothed = this.texture.baseTexture.scaleMode === PIXI.scaleModes.LINEAR;

if (Phaser.RenderTexture && key instanceof Phaser.RenderTexture)
{
Expand Down Expand Up @@ -35782,6 +35777,8 @@ Phaser.Component.LoadTexture.prototype = {
}
else if (key instanceof PIXI.Texture)
{
smoothed = key.baseTexture.scaleMode === PIXI.scaleModes.LINEAR;

this.setTexture(key);
}
else
Expand Down Expand Up @@ -36442,15 +36439,20 @@ Phaser.Component.Smoothed.prototype = {
{
if (this.texture)
{
this.texture.baseTexture.scaleMode = 0;
this.texture.baseTexture.dirty();
if (this.texture.baseTexture.scaleMode !== 0)
{
this.texture.baseTexture.scaleMode = 0;
this.texture.baseTexture.dirty();
}
}
}
else
if (this.texture)
else if (this.texture)
{
this.texture.baseTexture.scaleMode = 1;
this.texture.baseTexture.dirty();
if (this.texture.baseTexture.scaleMode !== 1)
{
this.texture.baseTexture.scaleMode = 1;
this.texture.baseTexture.dirty();
}
}
}

Expand Down Expand Up @@ -51195,6 +51197,7 @@ Phaser.Device = function ()

/**
* @property {boolean} webGL - Is webGL available?
* @see Phaser.Game#renderType
* @default
*/
this.webGL = false;
Expand Down Expand Up @@ -61340,7 +61343,7 @@ Phaser.FrameData.prototype = {
{
if (this._frameNames.hasOwnProperty(p))
{
output._frameNames.push(this._frameNames[p]);
output._frameNames[p] = this._frameNames[p];
}
}

Expand Down Expand Up @@ -69496,7 +69499,16 @@ Phaser.Sound.prototype = {
_startSource: function (when, offset, duration)
{

this._sound.start(when || 0, offset || 0, duration);
// Avoids passing an undefined `duration` (#588, #635).

if (duration === undefined)
{
this._sound.start(when || 0, offset || 0);
}
else
{
this._sound.start(when || 0, offset || 0, duration);
}

},

Expand Down
2 changes: 1 addition & 1 deletion build/custom/phaser-arcade-physics.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/custom/phaser-arcade-physics.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 8eb7a85

Please sign in to comment.