Patching back into 2.0.4 master release a couple of important updates.

Tilemap.getTile and getTileXY used to return `null` in 2.0.3 but returned a Tile object in 2.0.4 (with an index of -1), they now return `null` again.
ScaleManager seeds _check private var with null to avoid later comparison check (thanks @jflowers45, fix #782)
P2.Body.applyForce should have used pxmi instead of pxm (thanks @Trufi, fix #776)
P2 fixed creation of RevoluteConstraint by passing maxForce in the options (thanks @woutercommandeur, fix #783)
Merge pull request #783 from woutercommandeur/dev

fix creation of RevoluteConstraint by passing maxForce in the options
This commit is contained in:
photonstorm 2014-04-29 22:35:30 +01:00
parent 1c92caad42
commit 26b2aa42ab
15 changed files with 89 additions and 37 deletions

View file

@ -6,7 +6,7 @@ There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/bl
### Updates
* Updated to [Pixi.js 1.5.3](https://github.com/GoodBoyDigital/pixi.js/releases/tag/v1.5.3)
* Updated to [Pixi.js 1.5.3](https://github.com/GoodBoyDigital/pixi.js/releases/tag/1.5.3)
* Updated to latest [p2.js](https://github.com/schteppe/p2.js/commits/master) - all commits from 0.5.0 to Apr 27th 2014.
* TypeScript definitions fixes and updates (thanks @clark-stevenson @metrofun @killalau)
* Timer has removed all use of local temporary vars in the core update loop.

File diff suppressed because one or more lines are too long

View file

@ -14149,7 +14149,7 @@ Phaser.Physics.P2.Body.prototype = {
*/
applyForce: function (force, worldX, worldY) {
this.data.applyForce(force, [this.world.pxm(worldX), this.world.pxm(worldY)]);
this.data.applyForce(force, [this.world.pxmi(worldX), this.world.pxmi(worldY)]);
},
@ -16334,7 +16334,7 @@ Phaser.Physics.P2.RevoluteConstraint = function (world, bodyA, pivotA, bodyB, pi
pivotA = [ world.pxmi(pivotA[0]), world.pxmi(pivotA[1]) ];
pivotB = [ world.pxmi(pivotB[0]), world.pxmi(pivotB[1]) ];
p2.RevoluteConstraint.call(this, bodyA, pivotA, bodyB, pivotB, maxForce);
p2.RevoluteConstraint.call(this, bodyA, pivotA, bodyB, pivotB, {maxForce: maxForce});
};

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.0.4 "Mos Shirare" - Built: Tue Apr 29 2014 15:39:24
* v2.0.5 "Tanchico" - Built: Tue Apr 29 2014 21:59:33
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -9764,7 +9764,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
*
* Phaser - http://phaser.io
*
* v2.0.4 "Mos Shirare" - Built: Tue Apr 29 2014 15:39:24
* v2.0.5 "Tanchico" - Built: Tue Apr 29 2014 21:59:33
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -9807,7 +9807,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
*/
var Phaser = Phaser || {
VERSION: '2.0.4',
VERSION: '2.0.5',
GAMES: [],
AUTO: 0,
@ -18534,6 +18534,12 @@ Phaser.ScaleManager = function (game, width, height) {
*/
this._height = 0;
/**
* @property {number} _check - Cached size interval var.
* @private
*/
this._check = null;
var _this = this;
window.addEventListener('orientationchange', function (event) {
@ -52719,7 +52725,14 @@ Phaser.Tilemap.prototype = {
if (x >= 0 && x < this.layers[layer].width && y >= 0 && y < this.layers[layer].height)
{
return this.layers[layer].data[y][x];
if (this.layers[layer].data[y][x].index === -1)
{
return null;
}
else
{
return this.layers[layer].data[y][x];
}
}
},

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.0.4 "Mos Shirare" - Built: Tue Apr 29 2014 15:39:24
* v2.0.5 "Tanchico" - Built: Tue Apr 29 2014 21:59:33
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -50,7 +50,7 @@
*/
var Phaser = Phaser || {
VERSION: '2.0.4',
VERSION: '2.0.5',
GAMES: [],
AUTO: 0,
@ -8777,6 +8777,12 @@ Phaser.ScaleManager = function (game, width, height) {
*/
this._height = 0;
/**
* @property {number} _check - Cached size interval var.
* @private
*/
this._check = null;
var _this = this;
window.addEventListener('orientationchange', function (event) {
@ -42962,7 +42968,14 @@ Phaser.Tilemap.prototype = {
if (x >= 0 && x < this.layers[layer].width && y >= 0 && y < this.layers[layer].height)
{
return this.layers[layer].data[y][x];
if (this.layers[layer].data[y][x].index === -1)
{
return null;
}
else
{
return this.layers[layer].data[y][x];
}
}
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@
*
* Phaser - http://phaser.io
*
* v2.0.4 "Mos Shirare" - Built: Tue Apr 29 2014 15:39:24
* v2.0.5 "Tanchico" - Built: Tue Apr 29 2014 21:59:33
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -9764,7 +9764,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
*
* Phaser - http://phaser.io
*
* v2.0.4 "Mos Shirare" - Built: Tue Apr 29 2014 15:39:24
* v2.0.5 "Tanchico" - Built: Tue Apr 29 2014 21:59:33
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -9807,7 +9807,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
*/
var Phaser = Phaser || {
VERSION: '2.0.4',
VERSION: '2.0.5',
GAMES: [],
AUTO: 0,
@ -18534,6 +18534,12 @@ Phaser.ScaleManager = function (game, width, height) {
*/
this._height = 0;
/**
* @property {number} _check - Cached size interval var.
* @private
*/
this._check = null;
var _this = this;
window.addEventListener('orientationchange', function (event) {
@ -52719,7 +52725,14 @@ Phaser.Tilemap.prototype = {
if (x >= 0 && x < this.layers[layer].width && y >= 0 && y < this.layers[layer].height)
{
return this.layers[layer].data[y][x];
if (this.layers[layer].data[y][x].index === -1)
{
return null;
}
else
{
return this.layers[layer].data[y][x];
}
}
},
@ -74327,7 +74340,7 @@ Phaser.Physics.P2.Body.prototype = {
*/
applyForce: function (force, worldX, worldY) {
this.data.applyForce(force, [this.world.pxm(worldX), this.world.pxm(worldY)]);
this.data.applyForce(force, [this.world.pxmi(worldX), this.world.pxmi(worldY)]);
},
@ -76512,7 +76525,7 @@ Phaser.Physics.P2.RevoluteConstraint = function (world, bodyA, pivotA, bodyB, pi
pivotA = [ world.pxmi(pivotA[0]), world.pxmi(pivotA[1]) ];
pivotB = [ world.pxmi(pivotB[0]), world.pxmi(pivotB[1]) ];
p2.RevoluteConstraint.call(this, bodyA, pivotA, bodyB, pivotB, maxForce);
p2.RevoluteConstraint.call(this, bodyA, pivotA, bodyB, pivotB, {maxForce: maxForce});
};

File diff suppressed because one or more lines are too long

10
build/phaser.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -218,6 +218,12 @@ Phaser.ScaleManager = function (game, width, height) {
*/
this._height = 0;
/**
* @property {number} _check - Cached size interval var.
* @private
*/
this._check = null;
var _this = this;
window.addEventListener('orientationchange', function (event) {

View file

@ -425,7 +425,7 @@ Phaser.Physics.P2.Body.prototype = {
*/
applyForce: function (force, worldX, worldY) {
this.data.applyForce(force, [this.world.pxm(worldX), this.world.pxm(worldY)]);
this.data.applyForce(force, [this.world.pxmi(worldX), this.world.pxmi(worldY)]);
},

View file

@ -1184,7 +1184,14 @@ Phaser.Tilemap.prototype = {
if (x >= 0 && x < this.layers[layer].width && y >= 0 && y < this.layers[layer].height)
{
return this.layers[layer].data[y][x];
if (this.layers[layer].data[y][x].index === -1)
{
return null;
}
else
{
return this.layers[layer].data[y][x];
}
}
},