mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Various readonly Body properties flagged as 'readonly' in the jsdocs (#1643)
This commit is contained in:
parent
53b1562eb6
commit
2483cd5df4
2 changed files with 6 additions and 0 deletions
|
@ -202,6 +202,7 @@ We've also removed functions and properties from Pixi classes that Phaser doesn'
|
|||
* A TweenData wouldn't take into account the `repeatDelay` property when repeating the tween, but now does. A TweenData also has a new property `yoyoDelay` which controls the delay before the yoyo will start, allowing you to set both independently (thanks @DreadKnight #1469)
|
||||
* Animation.update skips ahead frames when the system is lagging, however it failed to set the animation to the final frame in the sequence if the animation skipped ahead too far (thanks @richpixel #1628)
|
||||
* Loader.preloadSprite had an extra guard added to ensure it didn't try to updateCrop a non-existent sprite (thanks @noidexe #1636)
|
||||
* The `TilemapParser` has had its row / column calculations updated to account for margins and and spacing on all sides of the tileset (thanks @zekoff #1642)
|
||||
|
||||
### Pixi 2.2.7 Bug Fixes
|
||||
|
||||
|
|
|
@ -83,26 +83,31 @@ Phaser.Physics.Arcade.Body = function (sprite) {
|
|||
|
||||
/**
|
||||
* @property {number} width - The calculated width of the physics body.
|
||||
* @readonly
|
||||
*/
|
||||
this.width = sprite.width;
|
||||
|
||||
/**
|
||||
* @property {number} height - The calculated height of the physics body.
|
||||
* @readonly
|
||||
*/
|
||||
this.height = sprite.height;
|
||||
|
||||
/**
|
||||
* @property {number} halfWidth - The calculated width / 2 of the physics body.
|
||||
* @readonly
|
||||
*/
|
||||
this.halfWidth = Math.abs(sprite.width / 2);
|
||||
|
||||
/**
|
||||
* @property {number} halfHeight - The calculated height / 2 of the physics body.
|
||||
* @readonly
|
||||
*/
|
||||
this.halfHeight = Math.abs(sprite.height / 2);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} center - The center coordinate of the Physics Body.
|
||||
* @readonly
|
||||
*/
|
||||
this.center = new Phaser.Point(sprite.x + this.halfWidth, sprite.y + this.halfHeight);
|
||||
|
||||
|
|
Loading…
Reference in a new issue