Skip to content

Commit c2bf1ef

Browse files
committed
Merge branch 'dev' of github.com:GGAlanSmithee/phaser into dev
2 parents 63c9d2e + 36c0645 commit c2bf1ef

16 files changed

Lines changed: 105 additions & 227 deletions

File tree

README.md

Lines changed: 12 additions & 193 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phaser",
3-
"version": "2.3.0",
4-
"release": "Tarabon",
3+
"version": "2.3.1",
4+
"release": "Katar",
55
"description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.",
66
"author": "Richard Davey <rdavey@gmail.com> (http://www.photonstorm.com)",
77
"logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png",

src/Phaser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
var Phaser = Phaser || {
1212

13-
VERSION: '2.3.0',
13+
VERSION: '2.3.1-dev',
1414
GAMES: [],
1515

1616
AUTO: 0,

src/core/State.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ Phaser.State.prototype = {
189189
paused: function () {
190190
},
191191

192+
/**
193+
* This method will be called when the core game loop resumes from a paused state.
194+
*
195+
* @method Phaser.State#resumed
196+
*/
197+
resumed: function () {
198+
},
199+
192200
/**
193201
* pauseUpdate is called while the game is paused instead of preUpdate, update and postUpdate.
194202
*

src/gameobjects/BitmapData.js

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,16 @@ Phaser.BitmapData = function (game, key, width, height) {
6464
this.imageData = this.context.getImageData(0, 0, width, height);
6565

6666
/**
67-
* @property {Uint8ClampedArray} data - A Uint8ClampedArray view into BitmapData.buffer.
67+
* A Uint8ClampedArray view into BitmapData.buffer.
68+
* Note that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)
69+
* @property {Uint8ClampedArray} data
6870
*/
69-
this.data = this.imageData.data;
71+
this.data = null;
72+
73+
if (this.imageData)
74+
{
75+
this.data = this.imageData.data;
76+
}
7077

7178
/**
7279
* @property {Uint32Array} pixels - An Uint32Array view into BitmapData.buffer.
@@ -76,21 +83,24 @@ Phaser.BitmapData = function (game, key, width, height) {
7683
/**
7784
* @property {ArrayBuffer} buffer - An ArrayBuffer the same size as the context ImageData.
7885
*/
79-
if (this.imageData.data.buffer)
86+
if (this.data)
8087
{
81-
this.buffer = this.imageData.data.buffer;
82-
this.pixels = new Uint32Array(this.buffer);
83-
}
84-
else
85-
{
86-
if (window['ArrayBuffer'])
88+
if (this.imageData.data.buffer)
8789
{
88-
this.buffer = new ArrayBuffer(this.imageData.data.length);
90+
this.buffer = this.imageData.data.buffer;
8991
this.pixels = new Uint32Array(this.buffer);
9092
}
9193
else
9294
{
93-
this.pixels = this.imageData.data;
95+
if (window['ArrayBuffer'])
96+
{
97+
this.buffer = new ArrayBuffer(this.imageData.data.length);
98+
this.pixels = new Uint32Array(this.buffer);
99+
}
100+
else
101+
{
102+
this.pixels = this.imageData.data;
103+
}
94104
}
95105
}
96106

src/gameobjects/Sprite.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
* @extends Phaser.Component.Delta
2525
* @extends Phaser.Component.Destroy
2626
* @extends Phaser.Component.FixedToCamera
27+
* @extends Phaser.Component.Health
28+
* @extends Phaser.Component.InCamera
2729
* @extends Phaser.Component.InputEnabled
2830
* @extends Phaser.Component.InWorld
2931
* @extends Phaser.Component.LifeSpan
@@ -77,6 +79,8 @@ Phaser.Component.Core.install.call(Phaser.Sprite.prototype, [
7779
'Delta',
7880
'Destroy',
7981
'FixedToCamera',
82+
'Health',
83+
'InCamera',
8084
'InputEnabled',
8185
'InWorld',
8286
'LifeSpan',

src/gameobjects/TileSprite.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
* @extends Phaser.Component.Animation
1717
* @extends Phaser.Component.AutoCull
1818
* @extends Phaser.Component.Bounds
19+
* @extends Phaser.Component.BringToTop
1920
* @extends Phaser.Component.Destroy
2021
* @extends Phaser.Component.FixedToCamera
22+
* @extends Phaser.Component.Health
23+
* @extends Phaser.Component.InCamera
2124
* @extends Phaser.Component.InputEnabled
2225
* @extends Phaser.Component.InWorld
26+
* @extends Phaser.Component.LifeSpan
2327
* @extends Phaser.Component.LoadTexture
2428
* @extends Phaser.Component.Overlap
2529
* @extends Phaser.Component.PhysicsBody
@@ -48,6 +52,12 @@ Phaser.TileSprite = function (game, x, y, width, height, key, frame) {
4852
*/
4953
this.type = Phaser.TILESPRITE;
5054

55+
/**
56+
* @property {number} physicsType - The const physics body type of this object.
57+
* @readonly
58+
*/
59+
this.physicsType = Phaser.SPRITE;
60+
5161
/**
5262
* @property {Phaser.Point} _scroll - Internal cache var.
5363
* @private
@@ -68,10 +78,14 @@ Phaser.Component.Core.install.call(Phaser.TileSprite.prototype, [
6878
'Animation',
6979
'AutoCull',
7080
'Bounds',
81+
'BringToTop',
7182
'Destroy',
7283
'FixedToCamera',
84+
'Health',
85+
'InCamera',
7386
'InputEnabled',
7487
'InWorld',
88+
'LifeSpan',
7589
'LoadTexture',
7690
'Overlap',
7791
'PhysicsBody',

src/gameobjects/components/LoadTexture.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ Phaser.Component.LoadTexture.prototype = {
8989
}
9090
}
9191

92-
if (!isRenderTexture)
93-
{
94-
this.texture.baseTexture.dirty();
95-
}
92+
// if (!isRenderTexture)
93+
// {
94+
// this.texture.baseTexture.dirty();
95+
// }
9696

9797
if (setFrame)
9898
{

src/geom/Line.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Object.defineProperty(Phaser.Line.prototype, "length", {
262262

263263
/**
264264
* @name Phaser.Line#angle
265-
* @property {number} angle - Gets the angle of the line.
265+
* @property {number} angle - Gets the angle of the line in radians.
266266
* @readonly
267267
*/
268268
Object.defineProperty(Phaser.Line.prototype, "angle", {

src/input/InputHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ Phaser.InputHandler.prototype = {
14021402
* @param {boolean} [onDrag=true] - If true the sprite will snap to the grid while being dragged.
14031403
* @param {boolean} [onRelease=false] - If true the sprite will snap to the grid when released.
14041404
* @param {number} [snapOffsetX=0] - Used to offset the top-left starting point of the snap grid.
1405-
* @param {number} [snapOffsetX=0] - Used to offset the top-left starting point of the snap grid.
1405+
* @param {number} [snapOffsetY=0] - Used to offset the top-left starting point of the snap grid.
14061406
*/
14071407
enableSnap: function (snapX, snapY, onDrag, onRelease, snapOffsetX, snapOffsetY) {
14081408

0 commit comments

Comments
 (0)