Skip to content

Commit d80ec1a

Browse files
committed
Phaser 2.3 Release Candidate 2.
1 parent 83adc51 commit d80ec1a

13 files changed

Lines changed: 211 additions & 79 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ We've rolled our own fixes into our version of Pixi, ensuring we keep it as bug-
143143
* Emitter.flow now works in a slightly different (and more useful!) way. You can now specify a `quantity` and a `total`. The `quantity` controls how many particles are emitted every time the flow frequency is met. The `total` controls how many particles will be emitted in total. You can set `total` to be -1 and it will carry on emitting at the given frequency forever (also fixes #1598 thanks @brianbunch)
144144
* ArraySet.removeAll allows you to remove all members of an ArraySet and optionally call `destroy` on them as well.
145145
* GameObject.input.dragStartPoint now stores the coordinates the object was at when the drag started. This value is populated when the drag starts. It can be used to return an object to its pre-drag position, for example if it was dropped in an invalid place in-game.
146-
* Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions (#1561 #1518)
146+
* Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. Allows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions (#1561 #1518)
147147
* P2 Capsule Shapes now support BodyDebug drawing (thanks @englercj #1686)
148-
* Game Objects now have a new `physicsType` property. This maps to a Phaser const such as `SPRITE` or `GROUP` and has allowed us sort out pairings for collision checks in the core World collide handler much quicker than before.
148+
* Game Objects now have a new `physicsType` property. This maps to a Phaser const such as `SPRITE` or `GROUP` and allows Phaser to sort out pairings for collision checks in the core World collide handler much quicker than before.
149149
* BitmapText objects can now have physics enabled on them. When the physics body is first created it will use the dimensions of the BitmapText at the time you enable it. If you update the text it will adjust the body width and height as well, however any applied offset will be retained.
150150
* BitmapText objects now have an `anchor` property. This works in a similar way to Sprite.anchor except that it offsets the position of each letter of the BitmapText by the given amount, based on the overall BitmapText width - whereas Sprite.anchor offsets the position the texture is drawn at.
151151

build/custom/phaser-arcade-physics.js

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.3.0 "Tarabon" - Built: Tue Mar 24 2015 16:05:22
10+
* v2.3.0 "Tarabon" - Built: Tue Mar 24 2015 21:33:54
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -12288,7 +12288,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
1228812288
*/
1228912289
var Phaser = Phaser || {
1229012290

12291-
VERSION: '2.3.0-RC1',
12291+
VERSION: '2.3.0-RC2',
1229212292
GAMES: [],
1229312293

1229412294
AUTO: 0,
@@ -34264,6 +34264,11 @@ Phaser.Component.Core.init = function (game, x, y, key, frame) {
3426434264
this.loadTexture(key, frame);
3426534265
}
3426634266

34267+
if (this.components.FixedToCamera)
34268+
{
34269+
this.cameraOffset = new Phaser.Point(x, y);
34270+
}
34271+
3426734272
};
3426834273

3426934274
Phaser.Component.Core.preUpdate = function () {
@@ -35050,6 +35055,12 @@ Phaser.Component.FixedToCamera.postUpdate = function () {
3505035055

3505135056
Phaser.Component.FixedToCamera.prototype = {
3505235057

35058+
/**
35059+
* @property {boolean} _fixedToCamera
35060+
* @private
35061+
*/
35062+
_fixedToCamera: false,
35063+
3505335064
/**
3505435065
* A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.
3505535066
*
@@ -35067,7 +35078,29 @@ Phaser.Component.FixedToCamera.prototype = {
3506735078
*
3506835079
* @property {boolean} fixedToCamera
3506935080
*/
35070-
fixedToCamera: false,
35081+
fixedToCamera: {
35082+
35083+
get: function () {
35084+
35085+
return this._fixedToCamera;
35086+
35087+
},
35088+
35089+
set: function (value) {
35090+
35091+
if (value)
35092+
{
35093+
this._fixedToCamera = true;
35094+
this.cameraOffset.set(this.x, this.y);
35095+
}
35096+
else
35097+
{
35098+
this._fixedToCamera = false;
35099+
}
35100+
35101+
}
35102+
35103+
},
3507135104

3507235105
/**
3507335106
* The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.
@@ -35357,7 +35390,7 @@ Phaser.Component.InWorld.prototype = {
3535735390
*/
3535835391
inWorld: {
3535935392

35360-
get: function() {
35393+
get: function () {
3536135394

3536235395
return this.game.world.bounds.intersects(this.getBounds());
3536335396

@@ -35444,7 +35477,7 @@ Phaser.Component.LifeSpan.prototype = {
3544435477
* @param {number} [health=1] - The health to give the Game Object. Only set if the GameObject has the Health component.
3544535478
* @return {PIXI.DisplayObject} This instance.
3544635479
*/
35447-
revive: function(health) {
35480+
revive: function (health) {
3544835481

3544935482
if (typeof health === 'undefined') { health = 1; }
3545035483

@@ -35479,7 +35512,7 @@ Phaser.Component.LifeSpan.prototype = {
3547935512
* @method
3548035513
* @return {PIXI.DisplayObject} This instance.
3548135514
*/
35482-
kill: function() {
35515+
kill: function () {
3548335516

3548435517
this.alive = false;
3548535518
this.exists = false;
@@ -35669,7 +35702,7 @@ Phaser.Component.LoadTexture.prototype = {
3566935702
*
3567035703
* @method
3567135704
*/
35672-
resetFrame: function() {
35705+
resetFrame: function () {
3567335706

3567435707
if (this._frame)
3567535708
{
@@ -35941,7 +35974,7 @@ Phaser.Component.Reset = function () {};
3594135974
* @param {number} [health=1] - The health to give the Game Object if it has the Health component.
3594235975
* @return {PIXI.DisplayObject} This instance.
3594335976
*/
35944-
Phaser.Component.Reset.prototype.reset = function(x, y, health) {
35977+
Phaser.Component.Reset.prototype.reset = function (x, y, health) {
3594535978

3594635979
if (typeof health === 'undefined') { health = 1; }
3594735980

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: 11 additions & 11 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: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.3.0 "Tarabon" - Built: Tue Mar 24 2015 16:05:30
10+
* v2.3.0 "Tarabon" - Built: Tue Mar 24 2015 21:34:03
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -12288,7 +12288,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
1228812288
*/
1228912289
var Phaser = Phaser || {
1229012290

12291-
VERSION: '2.3.0-RC1',
12291+
VERSION: '2.3.0-RC2',
1229212292
GAMES: [],
1229312293

1229412294
AUTO: 0,
@@ -31772,6 +31772,11 @@ Phaser.Component.Core.init = function (game, x, y, key, frame) {
3177231772
this.loadTexture(key, frame);
3177331773
}
3177431774

31775+
if (this.components.FixedToCamera)
31776+
{
31777+
this.cameraOffset = new Phaser.Point(x, y);
31778+
}
31779+
3177531780
};
3177631781

3177731782
Phaser.Component.Core.preUpdate = function () {
@@ -32558,6 +32563,12 @@ Phaser.Component.FixedToCamera.postUpdate = function () {
3255832563

3255932564
Phaser.Component.FixedToCamera.prototype = {
3256032565

32566+
/**
32567+
* @property {boolean} _fixedToCamera
32568+
* @private
32569+
*/
32570+
_fixedToCamera: false,
32571+
3256132572
/**
3256232573
* A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.
3256332574
*
@@ -32575,7 +32586,29 @@ Phaser.Component.FixedToCamera.prototype = {
3257532586
*
3257632587
* @property {boolean} fixedToCamera
3257732588
*/
32578-
fixedToCamera: false,
32589+
fixedToCamera: {
32590+
32591+
get: function () {
32592+
32593+
return this._fixedToCamera;
32594+
32595+
},
32596+
32597+
set: function (value) {
32598+
32599+
if (value)
32600+
{
32601+
this._fixedToCamera = true;
32602+
this.cameraOffset.set(this.x, this.y);
32603+
}
32604+
else
32605+
{
32606+
this._fixedToCamera = false;
32607+
}
32608+
32609+
}
32610+
32611+
},
3257932612

3258032613
/**
3258132614
* The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.
@@ -32865,7 +32898,7 @@ Phaser.Component.InWorld.prototype = {
3286532898
*/
3286632899
inWorld: {
3286732900

32868-
get: function() {
32901+
get: function () {
3286932902

3287032903
return this.game.world.bounds.intersects(this.getBounds());
3287132904

@@ -32952,7 +32985,7 @@ Phaser.Component.LifeSpan.prototype = {
3295232985
* @param {number} [health=1] - The health to give the Game Object. Only set if the GameObject has the Health component.
3295332986
* @return {PIXI.DisplayObject} This instance.
3295432987
*/
32955-
revive: function(health) {
32988+
revive: function (health) {
3295632989

3295732990
if (typeof health === 'undefined') { health = 1; }
3295832991

@@ -32987,7 +33020,7 @@ Phaser.Component.LifeSpan.prototype = {
3298733020
* @method
3298833021
* @return {PIXI.DisplayObject} This instance.
3298933022
*/
32990-
kill: function() {
33023+
kill: function () {
3299133024

3299233025
this.alive = false;
3299333026
this.exists = false;
@@ -33177,7 +33210,7 @@ Phaser.Component.LoadTexture.prototype = {
3317733210
*
3317833211
* @method
3317933212
*/
33180-
resetFrame: function() {
33213+
resetFrame: function () {
3318133214

3318233215
if (this._frame)
3318333216
{
@@ -33449,7 +33482,7 @@ Phaser.Component.Reset = function () {};
3344933482
* @param {number} [health=1] - The health to give the Game Object if it has the Health component.
3345033483
* @return {PIXI.DisplayObject} This instance.
3345133484
*/
33452-
Phaser.Component.Reset.prototype.reset = function(x, y, health) {
33485+
Phaser.Component.Reset.prototype.reset = function (x, y, health) {
3345333486

3345433487
if (typeof health === 'undefined') { health = 1; }
3345533488

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: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/custom/phaser-no-physics.js

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Phaser - http://phaser.io
99
*
10-
* v2.3.0 "Tarabon" - Built: Tue Mar 24 2015 16:05:26
10+
* v2.3.0 "Tarabon" - Built: Tue Mar 24 2015 21:33:59
1111
*
1212
* By Richard Davey http://www.photonstorm.com @photonstorm
1313
*
@@ -12288,7 +12288,7 @@ PIXI.AbstractFilter.prototype.apply = function(frameBuffer)
1228812288
*/
1228912289
var Phaser = Phaser || {
1229012290

12291-
VERSION: '2.3.0-RC1',
12291+
VERSION: '2.3.0-RC2',
1229212292
GAMES: [],
1229312293

1229412294
AUTO: 0,
@@ -34264,6 +34264,11 @@ Phaser.Component.Core.init = function (game, x, y, key, frame) {
3426434264
this.loadTexture(key, frame);
3426534265
}
3426634266

34267+
if (this.components.FixedToCamera)
34268+
{
34269+
this.cameraOffset = new Phaser.Point(x, y);
34270+
}
34271+
3426734272
};
3426834273

3426934274
Phaser.Component.Core.preUpdate = function () {
@@ -35050,6 +35055,12 @@ Phaser.Component.FixedToCamera.postUpdate = function () {
3505035055

3505135056
Phaser.Component.FixedToCamera.prototype = {
3505235057

35058+
/**
35059+
* @property {boolean} _fixedToCamera
35060+
* @private
35061+
*/
35062+
_fixedToCamera: false,
35063+
3505335064
/**
3505435065
* A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.
3505535066
*
@@ -35067,7 +35078,29 @@ Phaser.Component.FixedToCamera.prototype = {
3506735078
*
3506835079
* @property {boolean} fixedToCamera
3506935080
*/
35070-
fixedToCamera: false,
35081+
fixedToCamera: {
35082+
35083+
get: function () {
35084+
35085+
return this._fixedToCamera;
35086+
35087+
},
35088+
35089+
set: function (value) {
35090+
35091+
if (value)
35092+
{
35093+
this._fixedToCamera = true;
35094+
this.cameraOffset.set(this.x, this.y);
35095+
}
35096+
else
35097+
{
35098+
this._fixedToCamera = false;
35099+
}
35100+
35101+
}
35102+
35103+
},
3507135104

3507235105
/**
3507335106
* The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.
@@ -35357,7 +35390,7 @@ Phaser.Component.InWorld.prototype = {
3535735390
*/
3535835391
inWorld: {
3535935392

35360-
get: function() {
35393+
get: function () {
3536135394

3536235395
return this.game.world.bounds.intersects(this.getBounds());
3536335396

@@ -35444,7 +35477,7 @@ Phaser.Component.LifeSpan.prototype = {
3544435477
* @param {number} [health=1] - The health to give the Game Object. Only set if the GameObject has the Health component.
3544535478
* @return {PIXI.DisplayObject} This instance.
3544635479
*/
35447-
revive: function(health) {
35480+
revive: function (health) {
3544835481

3544935482
if (typeof health === 'undefined') { health = 1; }
3545035483

@@ -35479,7 +35512,7 @@ Phaser.Component.LifeSpan.prototype = {
3547935512
* @method
3548035513
* @return {PIXI.DisplayObject} This instance.
3548135514
*/
35482-
kill: function() {
35515+
kill: function () {
3548335516

3548435517
this.alive = false;
3548535518
this.exists = false;
@@ -35669,7 +35702,7 @@ Phaser.Component.LoadTexture.prototype = {
3566935702
*
3567035703
* @method
3567135704
*/
35672-
resetFrame: function() {
35705+
resetFrame: function () {
3567335706

3567435707
if (this._frame)
3567535708
{
@@ -35941,7 +35974,7 @@ Phaser.Component.Reset = function () {};
3594135974
* @param {number} [health=1] - The health to give the Game Object if it has the Health component.
3594235975
* @return {PIXI.DisplayObject} This instance.
3594335976
*/
35944-
Phaser.Component.Reset.prototype.reset = function(x, y, health) {
35977+
Phaser.Component.Reset.prototype.reset = function (x, y, health) {
3594535978

3594635979
if (typeof health === 'undefined') { health = 1; }
3594735980

build/custom/phaser-no-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-no-physics.min.js

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

0 commit comments

Comments
 (0)