Marked width/height as readonly and added docs. Fix #4806

This commit is contained in:
Richard Davey 2020-01-14 22:45:55 +00:00
parent 178a4929ab
commit fb7f66838a

View file

@ -190,7 +190,7 @@ var Body = new Class({
this.rotation = gameObject.angle;
/**
* The Body's rotation, in degrees, during the previous step.
* The Body rotation, in degrees, during the previous step.
*
* @name Phaser.Physics.Arcade.Body#preRotation
* @type {number}
@ -199,22 +199,26 @@ var Body = new Class({
this.preRotation = gameObject.angle;
/**
* The width of the Body's boundary, in pixels.
* If the Body is circular, this is also the Body's diameter.
* The width of the Body boundary, in pixels.
* If the Body is circular, this is also the diameter.
* If you wish to change the width use the `Body.setSize` method.
*
* @name Phaser.Physics.Arcade.Body#width
* @type {number}
* @readonly
* @default 64
* @since 3.0.0
*/
this.width = width;
/**
* The height of the Body's boundary, in pixels.
* If the Body is circular, this is also the Body's diameter.
* The height of the Body boundary, in pixels.
* If the Body is circular, this is also the diameter.
* If you wish to change the height use the `Body.setSize` method.
*
* @name Phaser.Physics.Arcade.Body#height
* @type {number}
* @readonly
* @default 64
* @since 3.0.0
*/