mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
jsdocs updates.
This commit is contained in:
parent
4fbb7d2a7e
commit
3f30a3d0d2
2 changed files with 17 additions and 15 deletions
|
@ -1009,10 +1009,10 @@ Phaser.Math = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Generate a sine and cosine table simultaneously and extremely quickly. Based on research by Franky of scene.at
|
||||
*
|
||||
* The parameters allow you to specify the length, amplitude and frequency of the wave. Once you have called this function
|
||||
* you should get the results via getSinTable() and getCosTable(). This generator is fast enough to be used in real-time.
|
||||
* Generate a sine and cosine table simultaneously and extremely quickly.
|
||||
* The parameters allow you to specify the length, amplitude and frequency of the wave.
|
||||
* This generator is fast enough to be used in real-time.
|
||||
* Code based on research by Franky of scene.at
|
||||
*
|
||||
* @method Phaser.Math#sinCosGenerator
|
||||
* @param {number} length - The length of the wave
|
||||
|
|
|
@ -59,7 +59,9 @@ Phaser.Physics.Arcade.Body = function (sprite) {
|
|||
this.allowRotation = true;
|
||||
|
||||
/**
|
||||
* @property {number} rotation - The amount the Body is rotated.
|
||||
* An Arcade Physics Body can have angularVelocity and angularAcceleration. Please understand that the collision Body
|
||||
* itself never rotates, it is always axis-aligned. However these values are passed up to the parent Sprite and updates its rotation.
|
||||
* @property {number} rotation
|
||||
*/
|
||||
this.rotation = sprite.rotation;
|
||||
|
||||
|
@ -112,12 +114,12 @@ Phaser.Physics.Arcade.Body = function (sprite) {
|
|||
this.center = new Phaser.Point(sprite.x + this.halfWidth, sprite.y + this.halfHeight);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} velocity - The velocity in pixels per second sq. of the Body.
|
||||
* @property {Phaser.Point} velocity - The velocity, or rate of change in speed of the Body. Measured in pixels per second.
|
||||
*/
|
||||
this.velocity = new Phaser.Point();
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} newVelocity - New velocity.
|
||||
* @property {Phaser.Point} newVelocity - The new velocity. Calculated during the Body.preUpdate and applied to its position.
|
||||
* @readonly
|
||||
*/
|
||||
this.newVelocity = new Phaser.Point(0, 0);
|
||||
|
@ -128,7 +130,7 @@ Phaser.Physics.Arcade.Body = function (sprite) {
|
|||
this.deltaMax = new Phaser.Point(0, 0);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} acceleration - The velocity in pixels per second sq. of the Body.
|
||||
* @property {Phaser.Point} acceleration - The acceleration is the rate of change of the velocity. Measured in pixels per second squared.
|
||||
*/
|
||||
this.acceleration = new Phaser.Point();
|
||||
|
||||
|
@ -149,7 +151,7 @@ Phaser.Physics.Arcade.Body = function (sprite) {
|
|||
this.gravity = new Phaser.Point(0, 0);
|
||||
|
||||
/**
|
||||
* @property {Phaser.Point} bounce - The elasticitiy of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.
|
||||
* @property {Phaser.Point} bounce - The elasticity of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.
|
||||
*/
|
||||
this.bounce = new Phaser.Point();
|
||||
|
||||
|
@ -165,37 +167,37 @@ Phaser.Physics.Arcade.Body = function (sprite) {
|
|||
this.friction = new Phaser.Point(1, 0);
|
||||
|
||||
/**
|
||||
* @property {number} angularVelocity - The angular velocity in pixels per second sq. of the Body.
|
||||
* @property {number} angularVelocity - The angular velocity controls the rotation speed of the Body. It is measured in radians per second.
|
||||
* @default
|
||||
*/
|
||||
this.angularVelocity = 0;
|
||||
|
||||
/**
|
||||
* @property {number} angularAcceleration - The angular acceleration in pixels per second sq. of the Body.
|
||||
* @property {number} angularAcceleration - The angular acceleration is the rate of change of the angular velocity. Measured in radians per second squared.
|
||||
* @default
|
||||
*/
|
||||
this.angularAcceleration = 0;
|
||||
|
||||
/**
|
||||
* @property {number} angularDrag - The angular drag applied to the rotation of the Body.
|
||||
* @property {number} angularDrag - The drag applied during the rotation of the Body.
|
||||
* @default
|
||||
*/
|
||||
this.angularDrag = 0;
|
||||
|
||||
/**
|
||||
* @property {number} maxAngular - The maximum angular velocity in pixels per second sq. that the Body can reach.
|
||||
* @property {number} maxAngular - The maximum angular velocity in radians per second that the Body can reach.
|
||||
* @default
|
||||
*/
|
||||
this.maxAngular = 1000;
|
||||
|
||||
/**
|
||||
* @property {number} mass - The mass of the Body.
|
||||
* @property {number} mass - The mass of the Body. When two bodies collide their mass is used in the calculation to determine the exchange of velocity.
|
||||
* @default
|
||||
*/
|
||||
this.mass = 1;
|
||||
|
||||
/**
|
||||
* @property {number} angle - The angle of the Body in radians as calculated by its velocity, rather than its visual angle.
|
||||
* @property {number} angle - The angle of the Body in radians, as calculated by its angularVelocity.
|
||||
* @readonly
|
||||
*/
|
||||
this.angle = 0;
|
||||
|
|
Loading…
Reference in a new issue