Skip to content

Commit 39783f1

Browse files
authored
Merge pull request #697 from photonstorm/release/v2.18.0
Phaser CE v2.18.0
2 parents 9daba25 + 636c5ff commit 39783f1

222 files changed

Lines changed: 7825 additions & 7765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## Unreleased
3+
## Version 2.18.0 - 7 May 2021
44

55
### Updates
66

@@ -12,7 +12,7 @@
1212

1313
### Thanks
1414

15-
@drfrankius, @samme
15+
@drfrankius, @photonstorm, @samme
1616

1717
## Version 2.17.0 - 16 March 2021
1818

DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
| [Graphics](./Phaser.Graphics.html) | Allows you to draw primitive shapes (lines, rects, circles), setting color, stroke and fills. |
9999
| [BitmapData](./Phaser.BitmapData.html) | Provides a powerful interface to a blank Canvas object. Can be used as a Sprite texture. |
100100
| [RenderTexture](./Phaser.RenderTexture.html) | A special kind of texture you can draw Sprites to extremely quickly. |
101-
| [Video](./Phaser.Video.html) | A video that can be used as a Sprite. texture. |
101+
| [Video](./Phaser.Video.html) | A video that can be used as a Sprite texture. |
102102

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

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Phaser CE is a fast, free, and fun open source HTML5 game framework. It uses a c
66

77
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.
88

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

1111
- **Visit:** The [Phaser website](http://phaser.io) and follow on [Twitter](https://twitter.com/photonstorm) (#[phaserjs](https://twitter.com/hashtag/phaserjs))
1212
- **Learn:** [API Docs](https://photonstorm.github.io/phaser-ce/), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
@@ -82,19 +82,19 @@ Please see additional steps for [Browserify/CommonJS](#browserify) and [Webpack]
8282
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce). Include the following in your html:
8383

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

8888
or the minified version:
8989

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

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

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

100100
<a name="getting-started"></a>
@@ -282,10 +282,10 @@ All rights reserved.
282282

283283
[![Analytics](https://ga-beacon.appspot.com/UA-44006568-2/phaser/index)](https://github.com/igrigorik/ga-beacon)
284284

285-
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.17.0/phaser.js
286-
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.17.0/phaser.min.js
287-
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.17.0.zip
288-
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.17.0.tar.gz
285+
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.18.0/phaser.js
286+
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.18.0/phaser.min.js
287+
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.18.0.zip
288+
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.18.0.tar.gz
289289
[clone-http]: https://github.com/photonstorm/phaser.git
290290
[clone-ssh]: ssh://git@github.com:photonstorm/phaser.git
291291
[clone-svn]: https://github.com/photonstorm/phaser

build/custom/creature.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/p2.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-arcade-physics.js

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser CE - https://github.com/photonstorm/phaser-ce
99
*
10-
* v2.17.0 "2021-03-16" - Built: Tue Mar 16 2021 11:18:44
10+
* v2.18.0 "2021-05-07" - Built: Thu May 06 2021 19:53:35
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
1313
*
@@ -4930,14 +4930,18 @@ PIXI.WebGLSpriteBatch.prototype.end = function ()
49304930
PIXI.WebGLSpriteBatch.prototype.render = function (sprite, matrix)
49314931
{
49324932
var texture = sprite.texture;
4933-
var baseTexture = texture.baseTexture;
4934-
var gl = this.gl;
4935-
if (PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] != baseTexture) // eslint-disable-line eqeqeq
4933+
4934+
if (PIXI._enableMultiTextureToggle)
49364935
{
4937-
this.flush();
4938-
gl.activeTexture(gl.TEXTURE0 + baseTexture.textureIndex);
4939-
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
4940-
PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] = baseTexture;
4936+
var baseTexture = texture.baseTexture;
4937+
var gl = this.gl;
4938+
if (PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] != baseTexture) // eslint-disable-line eqeqeq
4939+
{
4940+
this.flush();
4941+
gl.activeTexture(gl.TEXTURE0 + baseTexture.textureIndex);
4942+
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
4943+
PIXI.WebGLRenderer.textureArray[baseTexture.textureIndex] = baseTexture;
4944+
}
49414945
}
49424946

49434947
// They provided an alternative rendering matrix, so use it
@@ -5113,15 +5117,19 @@ PIXI.WebGLSpriteBatch.prototype.render = function (sprite, matrix)
51135117
PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function (sprite)
51145118
{
51155119
var texture = sprite.tilingTexture;
5116-
var baseTexture = texture.baseTexture;
5117-
var gl = this.gl;
51185120
var textureIndex = sprite.texture.baseTexture.textureIndex;
5119-
if (PIXI.WebGLRenderer.textureArray[textureIndex] != baseTexture) // eslint-disable-line eqeqeq
5121+
5122+
if (PIXI._enableMultiTextureToggle)
51205123
{
5121-
this.flush();
5122-
gl.activeTexture(gl.TEXTURE0 + textureIndex);
5123-
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
5124-
PIXI.WebGLRenderer.textureArray[textureIndex] = baseTexture;
5124+
var baseTexture = texture.baseTexture;
5125+
var gl = this.gl;
5126+
if (PIXI.WebGLRenderer.textureArray[textureIndex] != baseTexture) // eslint-disable-line eqeqeq
5127+
{
5128+
this.flush();
5129+
gl.activeTexture(gl.TEXTURE0 + textureIndex);
5130+
gl.bindTexture(gl.TEXTURE_2D, baseTexture._glTextures[gl.id]);
5131+
PIXI.WebGLRenderer.textureArray[textureIndex] = baseTexture;
5132+
}
51255133
}
51265134

51275135
// check texture..
@@ -5356,8 +5364,10 @@ PIXI.WebGLSpriteBatch.prototype.flush = function ()
53565364
skip = false;
53575365
}
53585366

5359-
//
5360-
if (/* (currentBaseTexture !== nextTexture && !skip) || */
5367+
// if multi-texture batching disabled we always render the batch upon switching textures
5368+
var multiTextureBatchingEnabled = PIXI._enableMultiTextureToggle;
5369+
var baseTextureChanged = currentBaseTexture !== nextTexture;
5370+
if ((!multiTextureBatchingEnabled && baseTextureChanged && !skip) ||
53615371
blendSwap ||
53625372
shaderSwap)
53635373
{
@@ -7774,7 +7784,7 @@ var Phaser = Phaser || { // jshint ignore:line
77747784
* @constant Phaser.VERSION
77757785
* @type {string}
77767786
*/
7777-
VERSION: '2.17.0',
7787+
VERSION: '2.18.0',
77787788

77797789
/**
77807790
* An array of Phaser game instances.
@@ -59377,14 +59387,14 @@ Phaser.Cache.prototype = {
5937759387
*/
5937859388

5937959389
/**
59380-
* Add a new canvas object in to the cache.
59390+
* Add a new compressed texture in to the cache.
5938159391
*
5938259392
* @method Phaser.Cache#addCompressedTextureMetaData
5938359393
* @private
5938459394
* @param {string} key - The key that this asset will be stored in the cache under. This should be unique within this cache.
59385-
* @param {string} url
59386-
* @param {string} extension
59387-
* @param {array} arrayBuffer
59395+
* @param {string} url - The URL the asset was loaded from. If the asset was not loaded externally set to `null`.
59396+
* @param {string} extension - The extension of the compressed texture.
59397+
* @param {ArrayBuffer} arrayBuffer - The compressed texture data.
5938859398
* @return {object} The compressed texture entry.
5938959399
*/
5939059400
addCompressedTextureMetaData: function (key, url, extension, arrayBuffer)
@@ -63961,6 +63971,7 @@ Phaser.Loader.prototype = {
6396163971

6396263972
file.data = document.createElement('video');
6396363973
file.data.name = file.key;
63974+
file.data.crossOrigin = this.crossOrigin;
6396463975
file.data.controls = false;
6396563976
file.data.autoplay = false;
6396663977
file.data.playsInline = true;
@@ -88440,11 +88451,11 @@ Phaser.Video.prototype = {
8844088451

8844188452
if (loop)
8844288453
{
88443-
this.video.loop = 'loop';
88454+
this.video.loop = true;
8844488455
}
8844588456
else
8844688457
{
88447-
this.video.loop = '';
88458+
this.video.loop = false;
8844888459
}
8844988460

8845088461
this.video.playbackRate = playbackRate;
@@ -89135,11 +89146,11 @@ Object.defineProperty(Phaser.Video.prototype, 'loop', {
8913589146
{
8913689147
if (value && this.video)
8913789148
{
89138-
this.video.loop = 'loop';
89149+
this.video.loop = true;
8913989150
}
8914089151
else if (this.video)
8914189152
{
89142-
this.video.loop = '';
89153+
this.video.loop = false;
8914389154
}
8914489155
}
8914589156

build/custom/phaser-arcade-physics.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-arcade-physics.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-creature.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser CE - https://github.com/photonstorm/phaser-ce
99
*
10-
* v2.17.0 "2021-03-16" - Built: Tue Mar 16 2021 11:19:01
10+
* v2.18.0 "2021-05-07" - Built: Thu May 06 2021 19:53:52
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm and Phaser CE contributors
1313
*
@@ -40,7 +40,7 @@ var Phaser = Phaser || { // jshint ignore:line
4040
* @constant Phaser.VERSION
4141
* @type {string}
4242
*/
43-
VERSION: '2.17.0',
43+
VERSION: '2.18.0',
4444

4545
/**
4646
* An array of Phaser game instances.
@@ -51643,14 +51643,14 @@ Phaser.Cache.prototype = {
5164351643
*/
5164451644

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

5622856228
file.data = document.createElement('video');
5622956229
file.data.name = file.key;
56230+
file.data.crossOrigin = this.crossOrigin;
5623056231
file.data.controls = false;
5623156232
file.data.autoplay = false;
5623256233
file.data.playsInline = true;
@@ -87362,11 +87363,11 @@ Phaser.Video.prototype = {
8736287363

8736387364
if (loop)
8736487365
{
87365-
this.video.loop = 'loop';
87366+
this.video.loop = true;
8736687367
}
8736787368
else
8736887369
{
87369-
this.video.loop = '';
87370+
this.video.loop = false;
8737087371
}
8737187372

8737287373
this.video.playbackRate = playbackRate;
@@ -88057,11 +88058,11 @@ Object.defineProperty(Phaser.Video.prototype, 'loop', {
8805788058
{
8805888059
if (value && this.video)
8805988060
{
88060-
this.video.loop = 'loop';
88061+
this.video.loop = true;
8806188062
}
8806288063
else if (this.video)
8806388064
{
88064-
this.video.loop = '';
88065+
this.video.loop = false;
8806588066
}
8806688067
}
8806788068

build/custom/phaser-creature.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)