Skip to content

Commit 53e2b6c

Browse files
authored
Merge pull request phaserjs#2891 from stoneman1/master
Build for release 2.7.1
2 parents ede9bc1 + e318d70 commit 53e2b6c

406 files changed

Lines changed: 5395 additions & 1752 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.

v2-community/build/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.

v2-community/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.

v2-community/build/custom/phaser-arcade-physics.js

Lines changed: 693 additions & 43 deletions
Large diffs are not rendered by default.

v2-community/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.

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

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

v2-community/build/custom/phaser-minimum.js

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.7.0 "World's End" - Built: Wed Nov 23 2016 00:48:46
10+
* v2.7.1 "2016-11-28" - Built: Mon Nov 28 2016 18:47:30
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -6900,16 +6900,17 @@ PIXI.CanvasRenderer.prototype.mapBlendModes = function () {
69006900
* @constructor
69016901
* @param source {String|Canvas} the source object (image or canvas)
69026902
* @param scaleMode {Number} See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
6903+
* @param [resolution] {Number} the resolution of the texture (for HiDPI displays)
69036904
*/
6904-
PIXI.BaseTexture = function(source, scaleMode)
6905+
PIXI.BaseTexture = function(source, scaleMode, resolution)
69056906
{
69066907
/**
69076908
* The Resolution of the texture.
69086909
*
69096910
* @property resolution
69106911
* @type Number
69116912
*/
6912-
this.resolution = 1;
6913+
this.resolution = resolution || 1;
69136914

69146915
/**
69156916
* [read-only] The width of the base texture set when the image has loaded
@@ -7125,9 +7126,10 @@ PIXI.BaseTexture.prototype.unloadFromGPU = function()
71257126
* @method fromCanvas
71267127
* @param canvas {Canvas} The canvas element source of the texture
71277128
* @param scaleMode {Number} See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
7129+
* @param [resolution] {Number} the resolution of the texture (for HiDPI displays)
71287130
* @return {BaseTexture}
71297131
*/
7130-
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
7132+
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode, resolution)
71317133
{
71327134
if (canvas.width === 0)
71337135
{
@@ -7139,7 +7141,9 @@ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
71397141
canvas.height = 1;
71407142
}
71417143

7142-
return new PIXI.BaseTexture(canvas, scaleMode);
7144+
resolution = resolution || 1;
7145+
7146+
return new PIXI.BaseTexture(canvas, scaleMode, resolution);
71437147
};
71447148

71457149
/**
@@ -7502,7 +7506,7 @@ var Phaser = Phaser || { // jshint ignore:line
75027506
* @constant
75037507
* @type {string}
75047508
*/
7505-
VERSION: '2.7.0',
7509+
VERSION: '2.7.1',
75067510

75077511
/**
75087512
* An array of Phaser game instances.
@@ -34675,7 +34679,7 @@ Phaser.RequestAnimationFrame = function(game, forceSetTimeOut) {
3467534679
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; x++)
3467634680
{
3467734681
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
34678-
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'];
34682+
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
3467934683
}
3468034684

3468134685
/**
@@ -39229,8 +39233,9 @@ Phaser.Animation.prototype = {
3922939233

3923039234
if (frameIndex)
3923139235
{
39232-
// Set the current frame index to the found index. Subtract 1 so that it animates to the desired frame on update.
39233-
this._frameIndex = frameIndex - 1;
39236+
// Set the current frame index to the found index. Subtract a directional offset so that it animates to the desired frame on update.
39237+
var directionalOffset = this.isReversed ? -1 : 1;
39238+
this._frameIndex = frameIndex - directionalOffset;
3923439239

3923539240
// Make the animation update at next update
3923639241
this._timeNextFrame = this.game.time.time;
@@ -40332,6 +40337,10 @@ Phaser.AnimationParser = {
4033240337
*/
4033340338
spriteSheet: function (game, key, frameWidth, frameHeight, frameMax, margin, spacing, skipFrames) {
4033440339

40340+
if (frameMax === undefined) { frameMax = -1; }
40341+
if (margin === undefined) { margin = 0; }
40342+
if (spacing === undefined) { spacing = 0; }
40343+
4033540344
var img = key;
4033640345

4033740346
if (typeof key === 'string')
@@ -40911,7 +40920,7 @@ Phaser.Cache.prototype = {
4091140920
key: key,
4091240921
url: url,
4091340922
data: data,
40914-
base: new PIXI.BaseTexture(data),
40923+
base: new PIXI.BaseTexture(data, null, this.game.resolution),
4091540924
frame: new Phaser.Frame(0, 0, 0, data.width, data.height, key),
4091640925
frameData: new Phaser.FrameData(),
4091740926
fileFormat: extension
@@ -40964,7 +40973,7 @@ Phaser.Cache.prototype = {
4096440973
key: key,
4096540974
url: url,
4096640975
data: data,
40967-
base: new PIXI.BaseTexture(data),
40976+
base: new PIXI.BaseTexture(data, null, this.game.resolution),
4096840977
frame: new Phaser.Frame(0, 0, 0, data.width, data.height, key),
4096940978
frameData: new Phaser.FrameData()
4097040979
};
@@ -41177,7 +41186,7 @@ Phaser.Cache.prototype = {
4117741186
url: url,
4117841187
data: data,
4117941188
font: null,
41180-
base: new PIXI.BaseTexture(data)
41189+
base: new PIXI.BaseTexture(data, null, this.game.resolution)
4118141190
};
4118241191

4118341192
if (xSpacing === undefined) { xSpacing = 0; }
@@ -41359,7 +41368,7 @@ Phaser.Cache.prototype = {
4135941368
frameHeight: frameHeight,
4136041369
margin: margin,
4136141370
spacing: spacing,
41362-
base: new PIXI.BaseTexture(data),
41371+
base: new PIXI.BaseTexture(data, null, this.game.resolution),
4136341372
frameData: Phaser.AnimationParser.spriteSheet(this.game, data, frameWidth, frameHeight, frameMax, margin, spacing, skipFrames)
4136441373
};
4136541374

@@ -41385,7 +41394,7 @@ Phaser.Cache.prototype = {
4138541394
key: key,
4138641395
url: url,
4138741396
data: data,
41388-
base: new PIXI.BaseTexture(data)
41397+
base: new PIXI.BaseTexture(data, null, this.game.resolution)
4138941398
};
4139041399

4139141400
if (format === Phaser.Loader.TEXTURE_ATLAS_XML_STARLING)
@@ -52681,11 +52690,8 @@ Phaser.Particles.prototype = {
5268152690
* @return {Phaser.Emitter} The emitter that was added.
5268252691
*/
5268352692
add: function (emitter) {
52684-
52685-
this.emitters[emitter.name] = emitter;
52686-
52693+
this.emitters[emitter.id] = emitter;
5268752694
return emitter;
52688-
5268952695
},
5269052696

5269152697
/**
@@ -52694,9 +52700,7 @@ Phaser.Particles.prototype = {
5269452700
* @param {Phaser.Emitter} emitter - The emitter to remove.
5269552701
*/
5269652702
remove: function (emitter) {
52697-
52698-
delete this.emitters[emitter.name];
52699-
52703+
delete this.emitters[emitter.id];
5270052704
},
5270152705

5270252706
/**
@@ -52705,7 +52709,6 @@ Phaser.Particles.prototype = {
5270552709
* @protected
5270652710
*/
5270752711
update: function () {
52708-
5270952712
for (var key in this.emitters)
5271052713
{
5271152714
if (this.emitters[key].exists)

v2-community/build/custom/phaser-minimum.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.

v2-community/build/custom/phaser-minimum.min.js

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

0 commit comments

Comments
 (0)