Skip to content

Commit 7de3cc2

Browse files
committed
Phaser 2.7.0 Beta 2 Release.
1 parent 3ba00bb commit 7de3cc2

20 files changed

Lines changed: 4664 additions & 3687 deletions

build/custom/p2.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/p2.min.js

Lines changed: 4 additions & 4 deletions
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: 1477 additions & 1178 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: 20 additions & 20 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: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.6.2 "Kore Springs" - Built: Mon Jul 18 2016 23:41:16
10+
* v2.6.2 "Kore Springs" - Built: Fri Jul 22 2016 17:03:35
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -7848,7 +7848,7 @@ var Phaser = Phaser || {
78487848
* @constant
78497849
* @type {string}
78507850
*/
7851-
VERSION: '2.7.0 Beta',
7851+
VERSION: '2.7.0 Beta 2',
78527852

78537853
/**
78547854
* An array of Phaser game instances.
@@ -10508,7 +10508,7 @@ Phaser.Line.intersects = function (a, b, asSegment, result) {
1050810508
*
1050910509
* The for the purposes of this function rectangles are considered 'solid'.
1051010510
*
10511-
* @method intersectsRectangle
10511+
* @method Phaser.Line.intersectsRectangle
1051210512
* @param {Phaser.Line} line - The line to check for intersection with.
1051310513
* @param {Phaser.Rectangle|object} rect - The rectangle, or rectangle-like object, to check for intersection with.
1051410514
* @return {boolean} True if the line intersects with the rectangle edges, or starts or ends within the rectangle.
@@ -17836,7 +17836,7 @@ Phaser.Group.prototype.updateZ = function () {
1783617836
* the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have
1783717837
* this.
1783817838
*
17839-
* The grid dimensions are determined by the first four arguments. The `rows` and `columns` arguments
17839+
* The grid dimensions are determined by the first four arguments. The `width` and `height` arguments
1784017840
* relate to the width and height of the grid respectively.
1784117841
*
1784217842
* For example if the Group had 100 children in it:
@@ -17850,13 +17850,13 @@ Phaser.Group.prototype.updateZ = function () {
1785017850
*
1785117851
* This will align the children into a grid of 25x4, again using 32 pixels per grid cell.
1785217852
*
17853-
* You can choose to set _either_ the `rows` or `columns` value to -1. Doing so tells the method
17853+
* You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method
1785417854
* to keep on aligning children until there are no children left. For example if this Group had
1785517855
* 48 children in it, the following:
1785617856
*
1785717857
* `Group.align(-1, 8, 32, 32)`
1785817858
*
17859-
* ... will align the children so that there are 8 columns vertically (the second argument),
17859+
* ... will align the children so that there are 8 children vertically (the second argument),
1786017860
* and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)
1786117861
*
1786217862
* You can also do:
@@ -17874,26 +17874,27 @@ Phaser.Group.prototype.updateZ = function () {
1787417874
* The final argument; `offset` lets you start the alignment from a specific child index.
1787517875
*
1787617876
* @method Phaser.Group#align
17877-
* @param {integer} rows - The number of rows, or width, of the grid. Set to -1 for a dynamic width.
17878-
* @param {integer} columns - The number of columns, or height, of the grid. Set to -1 for a dynamic height.
17877+
* @param {integer} width - The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value.
17878+
* @param {integer} height - The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value.
1787917879
* @param {integer} cellWidth - The width of each grid cell, in pixels.
1788017880
* @param {integer} cellHeight - The height of each grid cell, in pixels.
1788117881
* @param {integer} [position] - The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.
1788217882
* @param {integer} [offset=0] - Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value.
17883+
* @return {boolean} True if the Group children were aligned, otherwise false.
1788317884
*/
17884-
Phaser.Group.prototype.align = function (rows, columns, cellWidth, cellHeight, position, offset) {
17885+
Phaser.Group.prototype.align = function (width, height, cellWidth, cellHeight, position, offset) {
1788517886

1788617887
if (position === undefined) { position = Phaser.TOP_LEFT; }
1788717888
if (offset === undefined) { offset = 0; }
1788817889

17889-
if (this.children.length === 0 || offset > this.children.length || (rows === -1 && columns === -1))
17890+
if (this.children.length === 0 || offset > this.children.length || (width === -1 && height === -1))
1789017891
{
17891-
return;
17892+
return false;
1789217893
}
1789317894

1789417895
var r = new Phaser.Rectangle(0, 0, cellWidth, cellHeight);
17895-
var w = (rows * cellWidth);
17896-
var h = (columns * cellHeight);
17896+
var w = (width * cellWidth);
17897+
var h = (height * cellHeight);
1789717898

1789817899
for (var i = offset; i < this.children.length; i++)
1789917900
{
@@ -17908,7 +17909,7 @@ Phaser.Group.prototype.align = function (rows, columns, cellWidth, cellHeight, p
1790817909
continue;
1790917910
}
1791017911

17911-
if (rows === -1)
17912+
if (width === -1)
1791217913
{
1791317914
// We keep laying them out horizontally until we've done them all
1791417915
r.y += cellHeight;
@@ -17919,7 +17920,7 @@ Phaser.Group.prototype.align = function (rows, columns, cellWidth, cellHeight, p
1791917920
r.y = 0;
1792017921
}
1792117922
}
17922-
else if (columns === -1)
17923+
else if (height === -1)
1792317924
{
1792417925
// We keep laying them out vertically until we've done them all
1792517926
r.x += cellWidth;
@@ -17943,12 +17944,14 @@ Phaser.Group.prototype.align = function (rows, columns, cellWidth, cellHeight, p
1794317944
if (r.y === h)
1794417945
{
1794517946
// We've hit the column limit, so return, even if there are children left
17946-
return;
17947+
return true;
1794717948
}
1794817949
}
1794917950
}
1795017951
}
1795117952

17953+
return true;
17954+
1795217955
};
1795317956

1795417957
/**
@@ -42328,12 +42331,23 @@ Phaser.Loader = function (game) {
4232842331
* Used to map the application mime-types to to the Accept header in XHR requests.
4232942332
* If you don't require these mappings, or they cause problems on your server, then
4233042333
* remove them from the headers object and the XHR request will not try to use them.
42334+
*
42335+
* This object can also be used to set the `X-Requested-With` header to
42336+
* `XMLHttpRequest` (or any other value you need). To enable this do:
42337+
*
42338+
* `this.load.headers.requestedWith = 'XMLHttpRequest'`
42339+
*
42340+
* before adding anything to the Loader. The XHR loader will then call:
42341+
*
42342+
* `setRequestHeader('X-Requested-With', this.headers['requestedWith'])`
42343+
*
4233142344
* @property {object} headers
4233242345
* @default
4233342346
*/
4233442347
this.headers = {
42335-
json: "application/json",
42336-
xml: "application/xml"
42348+
"requestedWith": false,
42349+
"json": "application/json",
42350+
"xml": "application/xml"
4233742351
};
4233842352

4233942353
/**
@@ -43257,7 +43271,7 @@ Phaser.Loader.prototype = {
4325743271
*
4325843272
* The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.
4325943273
*
43260-
* @method Phaser.Loader#audiosprite
43274+
* @method Phaser.Loader#audioSprite
4326143275
* @param {string} key - Unique asset key of the audio file.
4326243276
* @param {Array|string} urls - An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.
4326343277
* @param {string} [jsonURL=null] - The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null.
@@ -44552,9 +44566,14 @@ Phaser.Loader.prototype = {
4455244566
xhr.open("GET", url, true);
4455344567
xhr.responseType = type;
4455444568

44569+
if (this.headers['requestedWith'] !== false)
44570+
{
44571+
xhr.setRequestHeader('X-Requested-With', this.headers['requestedWith']);
44572+
}
44573+
4455544574
if (this.headers[file.type])
4455644575
{
44557-
xhr.setRequestHeader("Accept", this.headers[file.type]);
44576+
xhr.setRequestHeader('Accept', this.headers[file.type]);
4455844577
}
4455944578

4456044579
onerror = onerror || this.fileError;
@@ -45688,6 +45707,18 @@ Phaser.ScaleManager = function (game, width, height) {
4568845707
*/
4568945708
this.leaveIncorrectOrientation = new Phaser.Signal();
4569045709

45710+
/**
45711+
* This boolean provides you with a way to determine if the browser is in Full Screen
45712+
* mode (via the Full Screen API), and Phaser was the one responsible for activating it.
45713+
*
45714+
* It's possible that ScaleManager.isFullScreen returns `true` even if Phaser wasn't the
45715+
* one that made the browser go full-screen, so this flag lets you determine that.
45716+
*
45717+
* @property {boolean} hasPhaserSetFullScreen
45718+
* @default
45719+
*/
45720+
this.hasPhaserSetFullScreen = false;
45721+
4569145722
/**
4569245723
* If specified, this is the DOM element on which the Fullscreen API enter request will be invoked.
4569345724
* The target element must have the correct CSS styling and contain the Display canvas.
@@ -47228,9 +47259,11 @@ Phaser.ScaleManager.prototype = {
4722847259
{
4722947260
// Error is called in timeout to emulate the real fullscreenerror event better
4723047261
var _this = this;
47262+
4723147263
setTimeout(function () {
4723247264
_this.fullScreenError();
4723347265
}, 10);
47266+
4723447267
return;
4723547268
}
4723647269

@@ -47247,7 +47280,7 @@ Phaser.ScaleManager.prototype = {
4724747280
}
4724847281
}
4724947282

47250-
if (typeof antialias !== 'undefined' && this.game.renderType === Phaser.CANVAS)
47283+
if (antialias !== undefined && this.game.renderType === Phaser.CANVAS)
4725147284
{
4725247285
this.game.stage.smoothed = antialias;
4725347286
}
@@ -47266,6 +47299,8 @@ Phaser.ScaleManager.prototype = {
4726647299
targetElement: fsTarget
4726747300
};
4726847301

47302+
this.hasPhaserSetFullScreen = true;
47303+
4726947304
this.onFullScreenInit.dispatch(this, initData);
4727047305

4727147306
if (this._createdFullScreenTarget)
@@ -47305,6 +47340,8 @@ Phaser.ScaleManager.prototype = {
4730547340
return false;
4730647341
}
4730747342

47343+
this.hasPhaserSetFullScreen = false;
47344+
4730847345
document[this.game.device.cancelFullscreen]();
4730947346

4731047347
return true;
@@ -47551,14 +47588,17 @@ Phaser.ScaleManager.prototype.constructor = Phaser.ScaleManager;
4755147588
Object.defineProperty(Phaser.ScaleManager.prototype, "boundingParent", {
4755247589

4755347590
get: function () {
47591+
4755447592
if (this.parentIsWindow ||
47555-
(this.isFullScreen && !this._createdFullScreenTarget))
47593+
(this.isFullScreen && this.hasPhaserSetFullScreen && !this._createdFullScreenTarget))
4755647594
{
4755747595
return null;
4755847596
}
4755947597

4756047598
var parentNode = this.game.canvas && this.game.canvas.parentNode;
47599+
4756147600
return parentNode || null;
47601+
4756247602
}
4756347603

4756447604
});

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.

build/custom/phaser-minimum.min.js

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

0 commit comments

Comments
 (0)