Skip to content

Commit

Permalink
Merge pull request #697 from photonstorm/release/v2.18.0
Browse files Browse the repository at this point in the history
Phaser CE v2.18.0
  • Loading branch information
photonstorm committed May 12, 2021
2 parents 9daba25 + 636c5ff commit 39783f1
Show file tree
Hide file tree
Showing 222 changed files with 7,825 additions and 7,765 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## Unreleased
## Version 2.18.0 - 7 May 2021

### Updates

Expand All @@ -12,7 +12,7 @@

### Thanks

@drfrankius, @samme
@drfrankius, @photonstorm, @samme

## Version 2.17.0 - 16 March 2021

Expand Down
2 changes: 1 addition & 1 deletion DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
| [Graphics](./Phaser.Graphics.html) | Allows you to draw primitive shapes (lines, rects, circles), setting color, stroke and fills. |
| [BitmapData](./Phaser.BitmapData.html) | Provides a powerful interface to a blank Canvas object. Can be used as a Sprite texture. |
| [RenderTexture](./Phaser.RenderTexture.html) | A special kind of texture you can draw Sprites to extremely quickly. |
| [Video](./Phaser.Video.html) | A video that can be used as a Sprite. texture. |
| [Video](./Phaser.Video.html) | A video that can be used as a Sprite texture. |

<a name="text"></a>

Expand Down
18 changes: 9 additions & 9 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 CE is based on Phaser v2.6.2 by [Photon Storm](http://www.photonstorm.com). [Phaser v3](http://phaser.io/phaser3) and [Phaser v4](https://github.com/phaserjs/phaser4) are in active development.

The [current Phaser CE release is 2.17.0](https://github.com/photonstorm/phaser-ce/releases/tag/v2.17.0).
The [current Phaser CE release is 2.18.0](https://github.com/photonstorm/phaser-ce/releases/tag/v2.18.0).

- **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 @@ -82,19 +82,19 @@ Please see additional steps for [Browserify/CommonJS](#browserify) and [Webpack]
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce). Include the following in your html:

```html
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.17.0/build/phaser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.18.0/build/phaser.js"></script>
```

or the minified version:

```html
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.17.0"></script>
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.18.0"></script>
```

[Custom builds](https://cdn.jsdelivr.net/npm/phaser-ce@2.17.0/build/custom/) are available too, e.g.,
[Custom builds](https://cdn.jsdelivr.net/npm/phaser-ce@2.18.0/build/custom/) are available too, e.g.,

```html
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.17.0/build/custom/phaser-arcade-physics.js"></script>
<script src="https://cdn.jsdelivr.net/npm/phaser-ce@2.18.0/build/custom/phaser-arcade-physics.js"></script>
```

<a name="getting-started"></a>
Expand Down Expand Up @@ -282,10 +282,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.17.0/phaser.js
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.17.0/phaser.min.js
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.17.0.zip
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.17.0.tar.gz
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.18.0/phaser.js
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.18.0/phaser.min.js
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.18.0.zip
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.18.0.tar.gz
[clone-http]: https://github.com/photonstorm/phaser.git
[clone-ssh]: ssh://git@github.com: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.

63 changes: 37 additions & 26 deletions build/custom/phaser-arcade-physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser CE - https://github.com/photonstorm/phaser-ce
*
* v2.17.0 "2021-03-16" - Built: Tue Mar 16 2021 11:18:44
* v2.18.0 "2021-05-07" - Built: Thu May 06 2021 19:53:35
*
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
*
Expand Down Expand Up @@ -4930,14 +4930,18 @@ 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

if (PIXI._enableMultiTextureToggle)
{
this.flush();
gl.activeTexture(gl.TEXTURE0 + baseTexture.textureIndex);
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] = baseTexture;
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
Expand Down Expand Up @@ -5113,15 +5117,19 @@ 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

if (PIXI._enableMultiTextureToggle)
{
this.flush();
gl.activeTexture(gl.TEXTURE0 + textureIndex);
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[textureIndex] = baseTexture;
var baseTexture = texture.baseTexture;
var gl = this.gl;
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..
Expand Down Expand Up @@ -5356,8 +5364,10 @@ PIXI.WebGLSpriteBatch.prototype.flush = function ()
skip = false;
}

//
if (/* (currentBaseTexture !== nextTexture && !skip) || */
// if multi-texture batching disabled we always render the batch upon switching textures
var multiTextureBatchingEnabled = PIXI._enableMultiTextureToggle;
var baseTextureChanged = currentBaseTexture !== nextTexture;
if ((!multiTextureBatchingEnabled && baseTextureChanged && !skip) ||
blendSwap ||
shaderSwap)
{
Expand Down Expand Up @@ -7774,7 +7784,7 @@ var Phaser = Phaser || { // jshint ignore:line
* @constant Phaser.VERSION
* @type {string}
*/
VERSION: '2.17.0',
VERSION: '2.18.0',

/**
* An array of Phaser game instances.
Expand Down Expand Up @@ -59377,14 +59387,14 @@ Phaser.Cache.prototype = {
*/

/**
* Add a new canvas object in to the cache.
* Add a new compressed texture in to the cache.
*
* @method Phaser.Cache#addCompressedTextureMetaData
* @private
* @param {string} key - The key that this asset will be stored in the cache under. This should be unique within this cache.
* @param {string} url
* @param {string} extension
* @param {array} arrayBuffer
* @param {string} url - The URL the asset was loaded from. If the asset was not loaded externally set to `null`.
* @param {string} extension - The extension of the compressed texture.
* @param {ArrayBuffer} arrayBuffer - The compressed texture data.
* @return {object} The compressed texture entry.
*/
addCompressedTextureMetaData: function (key, url, extension, arrayBuffer)
Expand Down Expand Up @@ -63961,6 +63971,7 @@ Phaser.Loader.prototype = {

file.data = document.createElement('video');
file.data.name = file.key;
file.data.crossOrigin = this.crossOrigin;
file.data.controls = false;
file.data.autoplay = false;
file.data.playsInline = true;
Expand Down Expand Up @@ -88440,11 +88451,11 @@ Phaser.Video.prototype = {

if (loop)
{
this.video.loop = 'loop';
this.video.loop = true;
}
else
{
this.video.loop = '';
this.video.loop = false;
}

this.video.playbackRate = playbackRate;
Expand Down Expand Up @@ -89135,11 +89146,11 @@ Object.defineProperty(Phaser.Video.prototype, 'loop', {
{
if (value && this.video)
{
this.video.loop = 'loop';
this.video.loop = true;
}
else if (this.video)
{
this.video.loop = '';
this.video.loop = false;
}
}

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.

21 changes: 11 additions & 10 deletions build/custom/phaser-creature.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser CE - https://github.com/photonstorm/phaser-ce
*
* v2.17.0 "2021-03-16" - Built: Tue Mar 16 2021 11:19:01
* v2.18.0 "2021-05-07" - Built: Thu May 06 2021 19:53:52
*
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
*
Expand Down Expand Up @@ -40,7 +40,7 @@ var Phaser = Phaser || { // jshint ignore:line
* @constant Phaser.VERSION
* @type {string}
*/
VERSION: '2.17.0',
VERSION: '2.18.0',

/**
* An array of Phaser game instances.
Expand Down Expand Up @@ -51643,14 +51643,14 @@ Phaser.Cache.prototype = {
*/

/**
* Add a new canvas object in to the cache.
* Add a new compressed texture in to the cache.
*
* @method Phaser.Cache#addCompressedTextureMetaData
* @private
* @param {string} key - The key that this asset will be stored in the cache under. This should be unique within this cache.
* @param {string} url
* @param {string} extension
* @param {array} arrayBuffer
* @param {string} url - The URL the asset was loaded from. If the asset was not loaded externally set to `null`.
* @param {string} extension - The extension of the compressed texture.
* @param {ArrayBuffer} arrayBuffer - The compressed texture data.
* @return {object} The compressed texture entry.
*/
addCompressedTextureMetaData: function (key, url, extension, arrayBuffer)
Expand Down Expand Up @@ -56227,6 +56227,7 @@ Phaser.Loader.prototype = {

file.data = document.createElement('video');
file.data.name = file.key;
file.data.crossOrigin = this.crossOrigin;
file.data.controls = false;
file.data.autoplay = false;
file.data.playsInline = true;
Expand Down Expand Up @@ -87362,11 +87363,11 @@ Phaser.Video.prototype = {

if (loop)
{
this.video.loop = 'loop';
this.video.loop = true;
}
else
{
this.video.loop = '';
this.video.loop = false;
}

this.video.playbackRate = playbackRate;
Expand Down Expand Up @@ -88057,11 +88058,11 @@ Object.defineProperty(Phaser.Video.prototype, 'loop', {
{
if (value && this.video)
{
this.video.loop = 'loop';
this.video.loop = true;
}
else if (this.video)
{
this.video.loop = '';
this.video.loop = false;
}
}

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

55 changes: 33 additions & 22 deletions build/custom/phaser-minimum.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Phaser CE - https://github.com/photonstorm/phaser-ce
*
* v2.17.0 "2021-03-16" - Built: Tue Mar 16 2021 11:18:52
* v2.18.0 "2021-05-07" - Built: Thu May 06 2021 19:53:43
*
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
*
Expand Down Expand Up @@ -4930,14 +4930,18 @@ 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

if (PIXI._enableMultiTextureToggle)
{
this.flush();
gl.activeTexture(gl.TEXTURE0 + baseTexture.textureIndex);
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] = baseTexture;
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
Expand Down Expand Up @@ -5113,15 +5117,19 @@ 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

if (PIXI._enableMultiTextureToggle)
{
this.flush();
gl.activeTexture(gl.TEXTURE0 + textureIndex);
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
PIXI.WebGLRenderer.textureArray[textureIndex] = baseTexture;
var baseTexture = texture.baseTexture;
var gl = this.gl;
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..
Expand Down Expand Up @@ -5356,8 +5364,10 @@ PIXI.WebGLSpriteBatch.prototype.flush = function ()
skip = false;
}

//
if (/* (currentBaseTexture !== nextTexture && !skip) || */
// if multi-texture batching disabled we always render the batch upon switching textures
var multiTextureBatchingEnabled = PIXI._enableMultiTextureToggle;
var baseTextureChanged = currentBaseTexture !== nextTexture;
if ((!multiTextureBatchingEnabled && baseTextureChanged && !skip) ||
blendSwap ||
shaderSwap)
{
Expand Down Expand Up @@ -7774,7 +7784,7 @@ var Phaser = Phaser || { // jshint ignore:line
* @constant Phaser.VERSION
* @type {string}
*/
VERSION: '2.17.0',
VERSION: '2.18.0',

/**
* An array of Phaser game instances.
Expand Down Expand Up @@ -42668,14 +42678,14 @@ Phaser.Cache.prototype = {
*/

/**
* Add a new canvas object in to the cache.
* Add a new compressed texture in to the cache.
*
* @method Phaser.Cache#addCompressedTextureMetaData
* @private
* @param {string} key - The key that this asset will be stored in the cache under. This should be unique within this cache.
* @param {string} url
* @param {string} extension
* @param {array} arrayBuffer
* @param {string} url - The URL the asset was loaded from. If the asset was not loaded externally set to `null`.
* @param {string} extension - The extension of the compressed texture.
* @param {ArrayBuffer} arrayBuffer - The compressed texture data.
* @return {object} The compressed texture entry.
*/
addCompressedTextureMetaData: function (key, url, extension, arrayBuffer)
Expand Down Expand Up @@ -47252,6 +47262,7 @@ Phaser.Loader.prototype = {

file.data = document.createElement('video');
file.data.name = file.key;
file.data.crossOrigin = this.crossOrigin;
file.data.controls = false;
file.data.autoplay = false;
file.data.playsInline = true;
Expand Down
2 changes: 1 addition & 1 deletion build/custom/phaser-minimum.map

Large diffs are not rendered by default.

0 comments on commit 39783f1

Please sign in to comment.