Skip to content

Commit bc61e33

Browse files
committed
Build Phaser v2.10.4
1 parent f7b417d commit bc61e33

File tree

218 files changed

+10194
-8940
lines changed

Some content is hidden

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

218 files changed

+10194
-8940
lines changed

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: 157 additions & 44 deletions
Large diffs are not rendered by default.

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: 148 additions & 40 deletions
Large diffs are not rendered by default.

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.

build/custom/phaser-creature.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-minimum.js

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.10.3 "2018-03-22" - Built: Thu Mar 22 2018 10:07:14
10+
* v2.10.4 "2018-05-03" - Built: Thu May 03 2018 15:47:58
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -1953,7 +1953,7 @@ PIXI.Sprite.prototype._renderWebGL = function(renderSession, matrix)
19531953
PIXI.Sprite.prototype._renderCanvas = function(renderSession, matrix)
19541954
{
19551955
// If the sprite is not visible or the alpha is 0 then no need to render this element
1956-
if (!this.visible || this.alpha === 0 || !this.renderable || this.texture.crop.width <= 0 || this.texture.crop.height <= 0)
1956+
if (!this.visible || this.alpha === 0 || !this.renderable || this.texture.crop.width < 1 || this.texture.crop.height < 1)
19571957
{
19581958
return;
19591959
}
@@ -2054,6 +2054,14 @@ PIXI.Sprite.prototype._renderCanvas = function(renderSession, matrix)
20542054
dx /= resolution;
20552055
dy /= resolution;
20562056

2057+
cw |= 0;
2058+
ch |= 0;
2059+
2060+
if (!cw || !ch)
2061+
{
2062+
return;
2063+
}
2064+
20572065
if (this.tint !== 0xFFFFFF)
20582066
{
20592067
if (this.texture.requiresReTint || this.cachedTint !== this.tint)
@@ -2071,9 +2079,6 @@ PIXI.Sprite.prototype._renderCanvas = function(renderSession, matrix)
20712079
var cx = this.texture.crop.x;
20722080
var cy = this.texture.crop.y;
20732081

2074-
cw = Math.floor(cw)
2075-
ch = Math.floor(ch)
2076-
20772082
renderSession.context.drawImage(this.texture.baseTexture.source, cx, cy, cw, ch, dx, dy, cw / resolution, ch / resolution);
20782083
}
20792084

@@ -7591,7 +7596,7 @@ var Phaser = Phaser || { // jshint ignore:line
75917596
* @constant Phaser.VERSION
75927597
* @type {string}
75937598
*/
7594-
VERSION: '2.10.3',
7599+
VERSION: '2.10.4',
75957600

75967601
/**
75977602
* An array of Phaser game instances.
@@ -9683,13 +9688,10 @@ Phaser.Ellipse.prototype = {
96839688
if (out === undefined) { out = new Phaser.Point(); }
96849689

96859690
var p = Math.random() * Math.PI * 2;
9686-
var r = Math.random();
9691+
var r = Math.sqrt(Math.random());
96879692

9688-
out.x = Math.sqrt(r) * Math.cos(p);
9689-
out.y = Math.sqrt(r) * Math.sin(p);
9690-
9691-
out.x = this.x + (out.x * this.width / 2.0);
9692-
out.y = this.y + (out.y * this.height / 2.0);
9693+
out.x = this.centerX + 0.5 * r * Math.cos(p) * this.width;
9694+
out.y = this.centerY + 0.5 * r * Math.sin(p) * this.height;
96939695

96949696
return out;
96959697

@@ -9794,6 +9796,34 @@ Object.defineProperty(Phaser.Ellipse.prototype, "bottom", {
97949796

97959797
});
97969798

9799+
/**
9800+
* The x coordinate of the center of the Ellipse.
9801+
* @name Phaser.Ellipse#centerX
9802+
* @property {number} centerX
9803+
* @readonly
9804+
*/
9805+
Object.defineProperty(Phaser.Ellipse.prototype, "centerX", {
9806+
9807+
get: function () {
9808+
return this.x + 0.5 * this.width;
9809+
}
9810+
9811+
});
9812+
9813+
/**
9814+
* The y coordinate of the center of the Ellipse.
9815+
* @name Phaser.Ellipse#centerY
9816+
* @property {number} centerY
9817+
* @readonly
9818+
*/
9819+
Object.defineProperty(Phaser.Ellipse.prototype, "centerY", {
9820+
9821+
get: function () {
9822+
return this.y + 0.5 * this.height;
9823+
}
9824+
9825+
});
9826+
97979827
/**
97989828
* Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false.
97999829
* If set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0.
@@ -14902,7 +14932,7 @@ Phaser.State = function () {
1490214932
this.stage = null;
1490314933

1490414934
/**
14905-
* @property {Phaser.StateManager} stage - A reference to the State Manager, which controls state changes.
14935+
* @property {Phaser.StateManager} state - A reference to the State Manager, which controls state changes.
1490614936
*/
1490714937
this.state = null;
1490814938

@@ -22005,7 +22035,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
2200522035
* @property {number} [GameConfig.scaleV=1] - Vertical scaling factor for USER_SCALE scale mode.
2200622036
* @property {number} [GameConfig.seed] - Seed for {@link Phaser.RandomDataGenerator}.
2200722037
* @property {object} [GameConfig.state]
22008-
* @property {boolean} [GameConfig.transparent=false]
22038+
* @property {boolean|string} [GameConfig.transparent=false] - Sets {@link Phaser.Game#transparent}. `'notMultiplied'` disables the WebGL context attribute `premultipliedAlpha`.
2200922039
* @property {number} [GameConfig.trimH=0] - Horizontal trim for USER_SCALE scale mode.
2201022040
* @property {number} [GameConfig.trimV=0] - Vertical trim for USER_SCALE scale mode.
2201122041
* @property {number|string} [GameConfig.width=800]
@@ -23400,12 +23430,13 @@ Phaser.Input.prototype = {
2340023430
/**
2340123431
* Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.
2340223432
*
23403-
* The callback will be sent 4 parameters:
23433+
* The callback will be sent 5 parameters:
2340423434
*
23405-
* A reference to the Phaser.Pointer object that moved,
23406-
* The x position of the pointer,
23407-
* The y position,
23408-
* A boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down).
23435+
* - A reference to the Phaser.Pointer object that moved
23436+
* - The x position of the pointer
23437+
* - The y position
23438+
* - A boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down)
23439+
* - The DOM move event
2340923440
*
2341023441
* It will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best
2341123442
* to only use if you've limited input to a single pointer (i.e. mouse or touch).
@@ -26479,7 +26510,7 @@ Phaser.Pointer.prototype = {
2647926510

2648026511
while (i--)
2648126512
{
26482-
input.moveCallbacks[i].callback.call(input.moveCallbacks[i].context, this, this.x, this.y, fromClick);
26513+
input.moveCallbacks[i].callback.call(input.moveCallbacks[i].context, this, this.x, this.y, fromClick, event);
2648326514
}
2648426515

2648526516
// Easy out if we're dragging something and it still exists
@@ -40773,7 +40804,7 @@ Phaser.Animation.prototype = {
4077340804

4077440805
/**
4077540806
* Plays this animation.
40776-
*
40807+
*
4077740808
* If you need to jump to a specific frame of this animation, then call `play` and immediately after it,
4077840809
* set the frame you require (i.e. `animation.play(); animation.frame = 4`).
4077940810
*
@@ -41264,6 +41295,7 @@ Phaser.Animation.prototype = {
4126441295

4126541296
this._frameIndex = this._frames.length - 1;
4126641297
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
41298+
this.updateCurrentFrame(false);
4126741299

4126841300
this.isPlaying = false;
4126941301
this.isFinished = true;

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.

0 commit comments

Comments
 (0)