Update JSDoc on "Arcade" physics

This commit is contained in:
orblazer 2018-03-19 00:29:46 +01:00
parent edeb63ebbd
commit af3c03a3cb
17 changed files with 92 additions and 92 deletions

View file

@ -188,7 +188,7 @@ var ArcadePhysics = new Class({
* @method Phaser.Physics.Arcade.ArcadePhysics#pause
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Physics.Arcade.World} [description]
*/
pause: function ()
{
@ -201,7 +201,7 @@ var ArcadePhysics = new Class({
* @method Phaser.Physics.Arcade.ArcadePhysics#resume
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Physics.Arcade.World} [description]
*/
resume: function ()
{
@ -210,9 +210,9 @@ var ArcadePhysics = new Class({
/**
* Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)
*
*
* You must give a maximum speed value, beyond which the game object won't go any faster.
*
*
* Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
* Note: The game object doesn't stop moving once it reaches the destination coordinates.
*
@ -246,9 +246,9 @@ var ArcadePhysics = new Class({
/**
* Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)
*
*
* You must give a maximum speed value, beyond which the game object won't go any faster.
*
*
* Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
* Note: The game object doesn't stop moving once it reaches the destination coordinates.
*

View file

@ -315,7 +315,7 @@ var Body = new Class({
* [description]
*
* @name Phaser.Physics.Arcade.Body#worldBounce
* @type {?[type]}
* @type {?Phaser.Math.Vector2}
* @default null
* @since 3.0.0
*/

View file

@ -1531,7 +1531,7 @@ var World = new Class({
* @since 3.0.0
*
* @param {Phaser.GameObjects.Group} group - [description]
* @param {[type]} tilemapLayer - [description]
* @param {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} tilemapLayer - [description]
* @param {function} collideCallback - [description]
* @param {function} processCallback - [description]
* @param {object} callbackContext - [description]
@ -1571,7 +1571,7 @@ var World = new Class({
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject} sprite - [description]
* @param {[type]} tilemapLayer - [description]
* @param {Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer} tilemapLayer - [description]
* @param {function} collideCallback - [description]
* @param {function} processCallback - [description]
* @param {object} callbackContext - [description]

View file

@ -18,10 +18,10 @@ var Acceleration = {
* @method Phaser.Physics.Arcade.Components.Acceleration#setAcceleration
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - The horizontal acceleration
* @param {number} [y=x] - The vertical acceleration
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setAcceleration: function (x, y)
{
@ -36,9 +36,9 @@ var Acceleration = {
* @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationX
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - The horizontal acceleration
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setAccelerationX: function (value)
{
@ -53,9 +53,9 @@ var Acceleration = {
* @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationY
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - The vertical acceleration
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setAccelerationY: function (value)
{

View file

@ -18,9 +18,9 @@ var Angular = {
* @method Phaser.Physics.Arcade.Components.Angular#setAngularVelocity
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setAngularVelocity: function (value)
{
@ -35,9 +35,9 @@ var Angular = {
* @method Phaser.Physics.Arcade.Components.Angular#setAngularAcceleration
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setAngularAcceleration: function (value)
{
@ -52,9 +52,9 @@ var Angular = {
* @method Phaser.Physics.Arcade.Components.Angular#setAngularDrag
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setAngularDrag: function (value)
{

View file

@ -18,10 +18,10 @@ var Bounce = {
* @method Phaser.Physics.Arcade.Components.Bounce#setBounce
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setBounce: function (x, y)
{
@ -36,9 +36,9 @@ var Bounce = {
* @method Phaser.Physics.Arcade.Components.Bounce#setBounceX
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setBounceX: function (value)
{
@ -53,9 +53,9 @@ var Bounce = {
* @method Phaser.Physics.Arcade.Components.Bounce#setBounceY
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setBounceY: function (value)
{
@ -70,9 +70,9 @@ var Bounce = {
* @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setCollideWorldBounds: function (value)
{

View file

@ -18,11 +18,11 @@ var Debug = {
* @method Phaser.Physics.Arcade.Components.Debug#setDebug
* @since 3.0.0
*
* @param {[type]} showBody - [description]
* @param {[type]} showVelocity - [description]
* @param {[type]} bodyColor - [description]
* @param {boolean} showBody - [description]
* @param {boolean} showVelocity - [description]
* @param {number} bodyColor - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setDebug: function (showBody, showVelocity, bodyColor)
{
@ -39,9 +39,9 @@ var Debug = {
* @method Phaser.Physics.Arcade.Components.Debug#setDebugBodyColor
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setDebugBodyColor: function (value)
{
@ -54,7 +54,7 @@ var Debug = {
* [description]
*
* @name Phaser.Physics.Arcade.Components.Debug#debugShowBody
* @type {[type]}
* @type {boolean}
* @since 3.0.0
*/
debugShowBody: {
@ -75,7 +75,7 @@ var Debug = {
* [description]
*
* @name Phaser.Physics.Arcade.Components.Debug#debugShowVelocity
* @type {[type]}
* @type {boolean}
* @since 3.0.0
*/
debugShowVelocity: {
@ -96,7 +96,7 @@ var Debug = {
* [description]
*
* @name Phaser.Physics.Arcade.Components.Debug#debugBodyColor
* @type {[type]}
* @type {number}
* @since 3.0.0
*/
debugBodyColor: {

View file

@ -18,10 +18,10 @@ var Drag = {
* @method Phaser.Physics.Arcade.Components.Drag#setDrag
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setDrag: function (x, y)
{
@ -36,9 +36,9 @@ var Drag = {
* @method Phaser.Physics.Arcade.Components.Drag#setDragX
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setDragX: function (value)
{
@ -53,9 +53,9 @@ var Drag = {
* @method Phaser.Physics.Arcade.Components.Drag#setDragY
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setDragY: function (value)
{

View file

@ -18,10 +18,10 @@ var Friction = {
* @method Phaser.Physics.Arcade.Components.Friction#setFriction
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setFriction: function (x, y)
{
@ -36,9 +36,9 @@ var Friction = {
* @method Phaser.Physics.Arcade.Components.Friction#setFrictionX
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {number} x - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setFrictionX: function (x)
{
@ -53,9 +53,9 @@ var Friction = {
* @method Phaser.Physics.Arcade.Components.Friction#setFrictionY
* @since 3.0.0
*
* @param {[type]} y - [description]
* @param {number} y - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setFrictionY: function (y)
{

View file

@ -18,10 +18,10 @@ var Gravity = {
* @method Phaser.Physics.Arcade.Components.Gravity#setGravity
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setGravity: function (x, y)
{
@ -36,9 +36,9 @@ var Gravity = {
* @method Phaser.Physics.Arcade.Components.Gravity#setGravityX
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {number} x - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setGravityX: function (x)
{
@ -53,9 +53,9 @@ var Gravity = {
* @method Phaser.Physics.Arcade.Components.Gravity#setGravityY
* @since 3.0.0
*
* @param {[type]} y - [description]
* @param {number} y - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setGravityY: function (y)
{

View file

@ -18,9 +18,9 @@ var Immovable = {
* @method Phaser.Physics.Arcade.Components.Immovable#setImmovable
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {boolean} [value=true] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setImmovable: function (value)
{

View file

@ -18,9 +18,9 @@ var Mass = {
* @method Phaser.Physics.Arcade.Components.Mass#setMass
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setMass: function (value)
{

View file

@ -18,10 +18,10 @@ var Size = {
* @method Phaser.Physics.Arcade.Components.Size#setOffset
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setOffset: function (x, y)
{
@ -36,11 +36,11 @@ var Size = {
* @method Phaser.Physics.Arcade.Components.Size#setSize
* @since 3.0.0
*
* @param {[type]} width - [description]
* @param {[type]} height - [description]
* @param {[type]} center - [description]
* @param {number} width - [description]
* @param {number} height - [description]
* @param {boolean} [center=true] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setSize: function (width, height, center)
{
@ -55,11 +55,11 @@ var Size = {
* @method Phaser.Physics.Arcade.Components.Size#setCircle
* @since 3.0.0
*
* @param {[type]} radius - [description]
* @param {[type]} offsetX - [description]
* @param {[type]} offsetY - [description]
* @param {number} radius - [description]
* @param {number} [offsetX] - [description]
* @param {number} [offsetY] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setCircle: function (radius, offsetX, offsetY)
{

View file

@ -18,10 +18,10 @@ var Velocity = {
* @method Phaser.Physics.Arcade.Components.Velocity#setVelocity
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setVelocity: function (x, y)
{
@ -36,9 +36,9 @@ var Velocity = {
* @method Phaser.Physics.Arcade.Components.Velocity#setVelocityX
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {number} x - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setVelocityX: function (x)
{
@ -53,9 +53,9 @@ var Velocity = {
* @method Phaser.Physics.Arcade.Components.Velocity#setVelocityY
* @since 3.0.0
*
* @param {[type]} y - [description]
* @param {number} y - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setVelocityY: function (y)
{
@ -70,15 +70,13 @@ var Velocity = {
* @method Phaser.Physics.Arcade.Components.Velocity#setMaxVelocity
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setMaxVelocity: function (x, y)
{
if (y === undefined) { y = x; }
this.body.maxVelocity.set(x, y);
return this;

View file

@ -4,7 +4,9 @@
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
// Phaser.Physics.Arcade.Body.Components
/**
* @namespace Phaser.Physics.Arcade.Body.Components
*/
module.exports = {

View file

@ -10,7 +10,7 @@
* @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks
* @since 3.0.0
*
* @param {[type]} tile - [description]
* @param {Phaser.Tilemaps.Tilemap} tile - [description]
* @param {Phaser.GameObjects.Sprite} sprite - [description]
*
* @return {boolean} [description]

View file

@ -10,8 +10,8 @@
* @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody
* @since 3.0.0
*
* @param {[type]} tileWorldRect - [description]
* @param {[type]} body - [description]
* @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - [description]
* @param {Phaser.Physics.Arcade.Body} body - [description]
*
* @return {boolean} [description]
*/