Skip to content

Commit 4208d68

Browse files
authored
Merge pull request #209 from photonstorm/release-v2.7.9
Phaser CE Version 2.7.9
2 parents 8415292 + 355d835 commit 4208d68

File tree

425 files changed

+654
-559
lines changed

Some content is hidden

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

425 files changed

+654
-559
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
See [README: Change Log](README.md#change-log).
66

7+
## Version 2.7.9 - 9th May 2017
8+
9+
### Updates
10+
11+
* Emitter#gravity can now be set as a number (as in Phaser versions prior to 2.7.2) or a Point (#203). Reading the value will always give you a Point.
12+
13+
### Bug Fixes
14+
15+
* Fixed a crash when a Text object's alignment was not set (#208).
16+
717
## Version 2.7.8 - 8th May 2017
818

919
### New Features

README.md

+9-44
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Thousands of developers worldwide use Phaser. From indies and multi-national dig
88

99
Phaser v2 was originally built and maintained by the company [Photon Storm](http://www.photonstorm.com), but was turned over to the community in November 2016. [Phaser v3](https://github.com/photonstorm/phaser/tree/master/v3) is in active development.
1010

11-
The [current Phaser CE release is 2.7.8](https://github.com/photonstorm/phaser-ce/releases/tag/v2.7.8).
11+
The [current Phaser CE release is 2.7.9](https://github.com/photonstorm/phaser-ce/releases/tag/v2.7.9).
1212

1313
- **Visit:** The [Phaser website](http://phaser.io) and follow on [Twitter](https://twitter.com/photonstorm) (#[phaserjs](https://twitter.com/hashtag/phaserjs))
1414
- **Learn:** [API Docs](https://photonstorm.github.io/phaser-ce/), [Support Forum][forum] and [StackOverflow](http://stackoverflow.com/questions/tagged/phaser-framework)
@@ -122,11 +122,11 @@ Using Browserify? Please [read this](#browserify).
122122

123123
[Phaser CE is on jsDelivr](http://www.jsdelivr.com/projects/phaser-ce), a "super-fast CDN for developers". Include the following in your html:
124124

125-
<script src="//cdn.jsdelivr.net/phaser-ce/2.7.8/phaser.js"></script>
125+
<script src="//cdn.jsdelivr.net/phaser-ce/2.7.9/phaser.js"></script>
126126

127127
or the minified version:
128128

129-
<script src="//cdn.jsdelivr.net/phaser-ce/2.7.8/phaser.min.js"></script>
129+
<script src="//cdn.jsdelivr.net/phaser-ce/2.7.9/phaser.min.js"></script>
130130

131131
### Web Templates
132132

@@ -258,50 +258,15 @@ If you code with [TypeScript](http://www.typescriptlang.org/) there are comprehe
258258

259259
# Change Log
260260

261-
## Version 2.7.9 - Unreleased
262-
263-
### New Features
261+
## Version 2.7.9 - 9th May 2017
264262

265263
### Updates
266264

267265
* Emitter#gravity can now be set as a number (as in Phaser versions prior to 2.7.2) or a Point (#203). Reading the value will always give you a Point.
268266

269267
### Bug Fixes
270268

271-
## Version 2.7.8 - 8th May 2017
272-
273-
### New Features
274-
275-
* You can now set [Group#updateOnlyExistingChildren](https://photonstorm.github.io/phaser-ce/Phaser.Group.html#updateOnlyExistingChildren) to skip [update](https://photonstorm.github.io/phaser-ce/Phaser.Component.Core.html#update) calls on children with `exists = false` (#187).
276-
* [Phaser.ScaleManager#setUserScale](https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager.html#setUserScale) now has `queueUpdate` and `force` parameters. Set these to false if your [resize callback](https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager.html#setResizeCallback) is being called repeatedly (#197).
277-
* Added [Phaser.Creature#createAllAnimations](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#createAllAnimations) to force load all animations in a creature mesh. It must be called before [Phaser.Creature#setAnimation](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#setAnimation).
278-
* Added [Phaser.Creature#setAnimationPlaySpeed](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#setAnimationPlaySpeed).
279-
* Added [Phaser.Creature.html#height](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#height) and [Phaser.Creature#width](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#width). You can set these dimensions directly rather than by using `scale`.
280-
* Added [Phaser.Creature#setAnchorPointEnabled](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#setAnchorPointEnabled), [Phaser.Creature#anchorX](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#anchorX), and [Phaser.Creature#anchorY](https://photonstorm.github.io/phaser-ce/Phaser.Creature.html#anchorY) for setting a Creature's anchor point dynamically (still experimental).
281-
282-
### Updates
283-
284-
* Removed the upper limit of 12 for [Phaser.Loader#maxParallelDownloads](https://photonstorm.github.io/phaser-ce/Phaser.Loader.html#maxParallelDownloads). The default value is still 4. Most browsers limit parallel connections to 6 per domain. Older IE and Android browsers may suffer with a value above 4 (#170).
285-
* Arcade Physics Bodies no longer receive angular motion updates while they have [allowRotation](https://photonstorm.github.io/phaser-ce/Phaser.Physics.Arcade.Body.html#allowRotation) disabled, as this was unnecessary.
286-
* [Phaser.Text#align](https://photonstorm.github.io/phaser-ce/Phaser.Text.html#align) can now be set in any case or mix of cases (e.g., 'left', 'Left', 'LEFT').
287-
* [Phaser CE API](https://photonstorm.github.io/phaser-ce/) now shows a synopsis like the Phaser 2.6 docs. You can still find the complete [README](https://github.com/photonstorm/phaser-ce/blob/master/README.md) on GitHub.
288-
* Updated [ScaleManager](https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager.html) docs.
289-
* Clarified `gid` argument in [Phaser.Tilemap#createFromObjects](https://photonstorm.github.io/phaser-ce/Phaser.Tilemap.html#createFromObjects). It can represent an object's `gid`, `id`, or `name`.
290-
* Clarified [Phaser.Image](https://photonstorm.github.io/phaser-ce/Phaser.Image.html)'s use of the Animation component (#185). Images can be animated the same way Sprites can.
291-
292-
### Bug Fixes
293-
294-
* Fixed an issue where Sprites sharing the same texture were distorted or hidden when a WebGLFilter was applied (#39, #153, #154).
295-
* Fixed a 'memory exhausted' error in PIXI.PixiFastShader when compiling shaders with multiTexture enabled.
296-
* Fixed a TypeError in PIXI.WebGLGraphics when trying to render a Graphics object with a missing WebGL context (#178)
297-
* Fixed a ReferenceError in [PIXI.WebGLRenderer](https://photonstorm.github.io/phaser-ce/PIXI.WebGLRenderer.html) when running Phaser in ES5 strict mode.
298-
* Fixed some Typescript definitions (#167).
299-
* Phaser now correctly sets a Creature's anchor point (as set in Creature editor) when a creature mesh is loaded.
300-
* Fixed CreatureManager#CreateAllAnimations crashing in Chrome.
301-
302-
### Thanks
303-
304-
@aaronransley, @andrewjb123, @Cryt1c, @goldfire, @gre, @LandonSchropp, @NickH-nz, @noseglid, @photonstorm, @samme, @tanquetav, @vantreeseba, @vpmedia, @Xan0C
269+
* Fixed a crash when a Text object's alignment was not set (#208).
305270

306271
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser-ce/blob/master/CHANGELOG.md).
307272

@@ -335,10 +300,10 @@ All rights reserved.
335300

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

338-
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.7.8/phaser.js
339-
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.7.8/phaser.min.js
340-
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.7.8.zip
341-
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.7.8.tar.gz
303+
[get-js]: https://github.com/photonstorm/phaser-ce/releases/download/v2.7.9/phaser.js
304+
[get-minjs]: https://github.com/photonstorm/phaser-ce/releases/download/v2.7.9/phaser.min.js
305+
[get-zip]: https://github.com/photonstorm/phaser-ce/archive/v2.7.9.zip
306+
[get-tgz]: https://github.com/photonstorm/phaser-ce/archive/v2.7.9.tar.gz
342307
[clone-http]: https://github.com/photonstorm/phaser.git
343308
[clone-ssh]: ssh://git@github.com:photonstorm/phaser.git
344309
[clone-svn]: https://github.com/photonstorm/phaser

build/creature.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/p2.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-arcade-physics.js

+36-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.7.8 "2017-05-08" - Built: Sun May 07 2017 19:45:40
10+
* v2.7.9 "2017-05-09" - Built: Tue May 09 2017 12:04:38
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -7559,7 +7559,7 @@ var Phaser = Phaser || { // jshint ignore:line
75597559
* @constant Phaser.VERSION
75607560
* @type {string}
75617561
*/
7562-
VERSION: '2.7.8',
7562+
VERSION: '2.7.9',
75637563

75647564
/**
75657565
* An array of Phaser game instances.
@@ -42159,9 +42159,9 @@ Phaser.Text.prototype.setStyle = function (style, update) {
4215942159
newStyle.font = style.font || 'bold 20pt Arial';
4216042160
newStyle.backgroundColor = style.backgroundColor || null;
4216142161
newStyle.fill = style.fill || 'black';
42162-
newStyle.align = style.align.toLowerCase() || 'left';
42163-
newStyle.boundsAlignH = style.boundsAlignH.toLowerCase() || 'left';
42164-
newStyle.boundsAlignV = style.boundsAlignV.toLowerCase() || 'top';
42162+
newStyle.align = (style.align || 'left').toLowerCase();
42163+
newStyle.boundsAlignH = (style.boundsAlignH || 'left').toLowerCase();
42164+
newStyle.boundsAlignV = (style.boundsAlignV || 'top').toLowerCase();
4216542165
newStyle.stroke = style.stroke || 'black'; //provide a default, see: https://github.com/GoodBoyDigital/pixi.js/issues/136
4216642166
newStyle.strokeThickness = style.strokeThickness || 0;
4216742167
newStyle.wordWrap = style.wordWrap || false;
@@ -82063,12 +82063,6 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
8206382063
*/
8206482064
this.alphaData = null;
8206582065

82066-
/**
82067-
* @property {Phaser.Point} gravity - Sets the `body.gravity` of each particle sprite to this on launch.
82068-
* @default
82069-
*/
82070-
this.gravity = new Phaser.Point(0, 100);
82071-
8207282066
/**
8207382067
* @property {function} particleClass - For emitting your own particle class types. They must extend Phaser.Particle.
8207482068
* @default
@@ -82159,6 +82153,12 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
8215982153
*/
8216082154
this.particleSendToBack = false;
8216182155

82156+
/**
82157+
* @property {Phaser.Point} _gravity - Internal gravity value.
82158+
* @private
82159+
*/
82160+
this._gravity = new Phaser.Point(0, 100);
82161+
8216282162
/**
8216382163
* @property {Phaser.Point} _minParticleScale - Internal particle scale var.
8216482164
* @private
@@ -82635,7 +82635,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function (x, y, key, fr
8263582635
body.velocity.y = rnd.between(this.minParticleSpeed.y, this.maxParticleSpeed.y);
8263682636
body.angularVelocity = rnd.between(this.minRotation, this.maxRotation);
8263782637

82638-
body.gravity = this.gravity;
82638+
body.gravity.copyFrom(this.gravity);
8263982639
body.angularDrag = this.angularDrag;
8264082640

8264182641
particle.onEmit();
@@ -82850,6 +82850,30 @@ Phaser.Particles.Arcade.Emitter.prototype.at = function (object) {
8285082850

8285182851
};
8285282852

82853+
/**
82854+
* @name Phaser.Particles.Arcade.Emitter#gravity
82855+
* @property {Phaser.Point} gravity - Sets the `body.gravity` of each particle sprite to this on launch.
82856+
*/
82857+
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "gravity", {
82858+
82859+
get: function () {
82860+
return this._gravity;
82861+
},
82862+
82863+
set: function (value) {
82864+
if (typeof value === "number")
82865+
{
82866+
this._gravity.y = value;
82867+
}
82868+
else
82869+
{
82870+
this._gravity = value;
82871+
}
82872+
}
82873+
82874+
});
82875+
82876+
8285382877
/**
8285482878
* @name Phaser.Particles.Arcade.Emitter#id
8285582879
* @property {number} id - Gets the internal ID that represents this emitter.

build/custom/phaser-arcade-physics.map

+1-1
Large diffs are not rendered by default.

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

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-minimum.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.7.8 "2017-05-08" - Built: Sun May 07 2017 19:45:50
10+
* v2.7.9 "2017-05-09" - Built: Tue May 09 2017 12:04:48
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -7559,7 +7559,7 @@ var Phaser = Phaser || { // jshint ignore:line
75597559
* @constant Phaser.VERSION
75607560
* @type {string}
75617561
*/
7562-
VERSION: '2.7.8',
7562+
VERSION: '2.7.9',
75637563

75647564
/**
75657565
* An array of Phaser game instances.

build/custom/phaser-minimum.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-no-physics.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.7.8 "2017-05-08" - Built: Sun May 07 2017 19:45:46
10+
* v2.7.9 "2017-05-09" - Built: Tue May 09 2017 12:04:43
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -7559,7 +7559,7 @@ var Phaser = Phaser || { // jshint ignore:line
75597559
* @constant Phaser.VERSION
75607560
* @type {string}
75617561
*/
7562-
VERSION: '2.7.8',
7562+
VERSION: '2.7.9',
75637563

75647564
/**
75657565
* An array of Phaser game instances.
@@ -42159,9 +42159,9 @@ Phaser.Text.prototype.setStyle = function (style, update) {
4215942159
newStyle.font = style.font || 'bold 20pt Arial';
4216042160
newStyle.backgroundColor = style.backgroundColor || null;
4216142161
newStyle.fill = style.fill || 'black';
42162-
newStyle.align = style.align.toLowerCase() || 'left';
42163-
newStyle.boundsAlignH = style.boundsAlignH.toLowerCase() || 'left';
42164-
newStyle.boundsAlignV = style.boundsAlignV.toLowerCase() || 'top';
42162+
newStyle.align = (style.align || 'left').toLowerCase();
42163+
newStyle.boundsAlignH = (style.boundsAlignH || 'left').toLowerCase();
42164+
newStyle.boundsAlignV = (style.boundsAlignV || 'top').toLowerCase();
4216542165
newStyle.stroke = style.stroke || 'black'; //provide a default, see: https://github.com/GoodBoyDigital/pixi.js/issues/136
4216642166
newStyle.strokeThickness = style.strokeThickness || 0;
4216742167
newStyle.wordWrap = style.wordWrap || false;

build/custom/phaser-no-physics.map

+1-1
Large diffs are not rendered by default.

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

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-split.js

+36-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.7.8 "2017-05-08" - Built: Sun May 07 2017 19:45:54
10+
* v2.7.9 "2017-05-09" - Built: Tue May 09 2017 12:04:53
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -53,7 +53,7 @@ var Phaser = Phaser || { // jshint ignore:line
5353
* @constant Phaser.VERSION
5454
* @type {string}
5555
*/
56-
VERSION: '2.7.8',
56+
VERSION: '2.7.9',
5757

5858
/**
5959
* An array of Phaser game instances.
@@ -34653,9 +34653,9 @@ Phaser.Text.prototype.setStyle = function (style, update) {
3465334653
newStyle.font = style.font || 'bold 20pt Arial';
3465434654
newStyle.backgroundColor = style.backgroundColor || null;
3465534655
newStyle.fill = style.fill || 'black';
34656-
newStyle.align = style.align.toLowerCase() || 'left';
34657-
newStyle.boundsAlignH = style.boundsAlignH.toLowerCase() || 'left';
34658-
newStyle.boundsAlignV = style.boundsAlignV.toLowerCase() || 'top';
34656+
newStyle.align = (style.align || 'left').toLowerCase();
34657+
newStyle.boundsAlignH = (style.boundsAlignH || 'left').toLowerCase();
34658+
newStyle.boundsAlignV = (style.boundsAlignV || 'top').toLowerCase();
3465934659
newStyle.stroke = style.stroke || 'black'; //provide a default, see: https://github.com/GoodBoyDigital/pixi.js/issues/136
3466034660
newStyle.strokeThickness = style.strokeThickness || 0;
3466134661
newStyle.wordWrap = style.wordWrap || false;
@@ -79996,12 +79996,6 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
7999679996
*/
7999779997
this.alphaData = null;
7999879998

79999-
/**
80000-
* @property {Phaser.Point} gravity - Sets the `body.gravity` of each particle sprite to this on launch.
80001-
* @default
80002-
*/
80003-
this.gravity = new Phaser.Point(0, 100);
80004-
8000579999
/**
8000680000
* @property {function} particleClass - For emitting your own particle class types. They must extend Phaser.Particle.
8000780001
* @default
@@ -80092,6 +80086,12 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
8009280086
*/
8009380087
this.particleSendToBack = false;
8009480088

80089+
/**
80090+
* @property {Phaser.Point} _gravity - Internal gravity value.
80091+
* @private
80092+
*/
80093+
this._gravity = new Phaser.Point(0, 100);
80094+
8009580095
/**
8009680096
* @property {Phaser.Point} _minParticleScale - Internal particle scale var.
8009780097
* @private
@@ -80568,7 +80568,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function (x, y, key, fr
8056880568
body.velocity.y = rnd.between(this.minParticleSpeed.y, this.maxParticleSpeed.y);
8056980569
body.angularVelocity = rnd.between(this.minRotation, this.maxRotation);
8057080570

80571-
body.gravity = this.gravity;
80571+
body.gravity.copyFrom(this.gravity);
8057280572
body.angularDrag = this.angularDrag;
8057380573

8057480574
particle.onEmit();
@@ -80783,6 +80783,30 @@ Phaser.Particles.Arcade.Emitter.prototype.at = function (object) {
8078380783

8078480784
};
8078580785

80786+
/**
80787+
* @name Phaser.Particles.Arcade.Emitter#gravity
80788+
* @property {Phaser.Point} gravity - Sets the `body.gravity` of each particle sprite to this on launch.
80789+
*/
80790+
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "gravity", {
80791+
80792+
get: function () {
80793+
return this._gravity;
80794+
},
80795+
80796+
set: function (value) {
80797+
if (typeof value === "number")
80798+
{
80799+
this._gravity.y = value;
80800+
}
80801+
else
80802+
{
80803+
this._gravity = value;
80804+
}
80805+
}
80806+
80807+
});
80808+
80809+
8078680810
/**
8078780811
* @name Phaser.Particles.Arcade.Emitter#id
8078880812
* @property {number} id - Gets the internal ID that represents this emitter.

build/custom/phaser-split.map

+1-1
Large diffs are not rendered by default.

build/custom/phaser-split.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/pixi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.7.8 "2017-05-08" - Built: Sun May 07 2017 19:45:54
10+
* v2.7.9 "2017-05-09" - Built: Tue May 09 2017 12:04:52
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*

build/custom/pixi.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/p2.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)