jsdoc fixes

This commit is contained in:
Richard Davey 2018-03-28 14:11:46 +01:00
parent f10efda8f0
commit 15c4334dc7
9 changed files with 57 additions and 46 deletions

View file

@ -223,11 +223,10 @@ var Group = new Class({
* @method Phaser.GameObjects.Group#create
* @since 3.0.0
*
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {number} [x=0] - The horizontal position of this Game Object in the world.
* @param {number} [y=0] - The vertical position of this Game Object in the world.
* @param {string} [key=defaultKey] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame=defaultFrame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of this Game Object.
* @param {boolean} [active=true] - The {@link Phaser.GameObjects.GameObject#active} state of this Game Object.
*
@ -235,6 +234,8 @@ var Group = new Class({
*/
create: function (x, y, key, frame, visible, active)
{
if (x === undefined) { x = 0; }
if (y === undefined) { y = 0; }
if (key === undefined) { key = this.defaultKey; }
if (frame === undefined) { frame = this.defaultFrame; }
if (visible === undefined) { visible = true; }
@ -622,11 +623,11 @@ var Group = new Class({
*
* @param {boolean} [state=false] - [description]
* @param {boolean} [createIfNull=false] - [description]
* @param {number} [x] - The horizontal position of this Game Object in the world.
* @param {number} [y] - The vertical position of this Game Object in the world.
* @param {string} [texture] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible] - [description]
* @param {number} [x=0] - The horizontal position of this Game Object in the world.
* @param {number} [y=0] - The vertical position of this Game Object in the world.
* @param {string} [key=defaultKey] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame=defaultFrame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of this Game Object.
*
* @return {?Phaser.GameObjects.GameObject} [description]
*/
@ -671,16 +672,19 @@ var Group = new Class({
},
/**
* [description]
* Scans the Group for the first child that has an `active` state set to `false` and returns it.
*
* If no child is found then it will create a new one using the arguments given to this method.
* Unless a new child is being created the arguments are ignored.
*
* @method Phaser.GameObjects.Group#get
* @since 3.0.0
*
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} visible - [description]
* @param {number} [x=0] - The horizontal position of this Game Object in the world.
* @param {number} [y=0] - The vertical position of this Game Object in the world.
* @param {string} [key=defaultKey] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame=defaultFrame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of this Game Object.
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
@ -690,17 +694,20 @@ var Group = new Class({
},
/**
* [description]
* Scans the Group for the first child that has an `active` state set to `true` and returns it.
*
* If no child is found, and `createIfNull` is `true`, then it will create a new one using the arguments given to this method.
* Unless a new child is being created the arguments are ignored.
*
* @method Phaser.GameObjects.Group#getFirstAlive
* @since 3.0.0
*
* @param {boolean} createIfNull - [description]
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} visible - [description]
* @param {number} [x=0] - The horizontal position of this Game Object in the world.
* @param {number} [y=0] - The vertical position of this Game Object in the world.
* @param {string} [key=defaultKey] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame=defaultFrame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of this Game Object.
*
* @return {Phaser.GameObjects.GameObject} [description]
*/
@ -710,17 +717,20 @@ var Group = new Class({
},
/**
* [description]
* Scans the Group for the first child that has an `active` state set to `false` and returns it.
*
* If no child is found, and `createIfNull` is `true`, then it will create a new one using the arguments given to this method.
* Unless a new child is being created the arguments are ignored.
*
* @method Phaser.GameObjects.Group#getFirstDead
* @since 3.0.0
*
* @param {boolean} createIfNull - [description]
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} visible - [description]
* @param {number} [x=0] - The horizontal position of this Game Object in the world.
* @param {number} [y=0] - The vertical position of this Game Object in the world.
* @param {string} [key=defaultKey] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame=defaultFrame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of this Game Object.
*
* @return {Phaser.GameObjects.GameObject} [description]
*/

View file

@ -16,7 +16,7 @@ var Triangle = require('./Triangle');
* @generic {Phaser.Geom.Triangle[]} O - [out,$return]
*
* @param {array} data - A flat array of vertice coordinates like [x0,y0, x1,y1, x2,y2, ...]
* @param {array} [?holes] - An array of hole indices if any (e.g. [5, 8] for a 12-vertice input would mean one hole with vertices 57 and another with 811).
* @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertice input would mean one hole with vertices 57 and another with 811).
* @param {float} [scaleX=1] - [description]
* @param {float} [scaleY=1] - [description]
* @param {(array|Phaser.Geom.Triangle[])} [out] - [description]

View file

@ -405,13 +405,14 @@ var ArcadePhysics = new Class({
*
* @param {number} angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)
* @param {number} [speed=60] - The speed it will move, in pixels per second sq.
* @param {Phaser.Math.Vector2} vec2 - The Vector2 in which the x and y properties will be set to the calculated velocity.
* @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.
*
* @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.
*/
velocityFromAngle: function (angle, speed, vec2)
{
if (speed === undefined) { speed = 60; }
if (vec2 === undefined) { vec2 = new Vector2(); }
return vec2.setToPolar(DegToRad(angle), speed);
},
@ -425,13 +426,14 @@ var ArcadePhysics = new Class({
*
* @param {number} rotation - The angle in radians.
* @param {number} [speed=60] - The speed it will move, in pixels per second sq.
* @param {Phaser.Math.Vector2} vec2 - The Vector2 in which the x and y properties will be set to the calculated velocity.
* @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.
*
* @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.
*/
velocityFromRotation: function (rotation, speed, vec2)
{
if (speed === undefined) { speed = 60; }
if (vec2 === undefined) { vec2 = new Vector2(); }
return vec2.setToPolar(rotation, speed);
},

View file

@ -17,7 +17,7 @@ var DefaultDefs = require('./DefaultDefs');
* @since 3.0.0
*
* @param {integer} [tilesize=32] - [description]
* @param {array} data - [description]
* @param {array} [data] - [description]
*/
var CollisionMap = new Class({

View file

@ -185,14 +185,14 @@ var Factory = new Class({
* @since 3.0.0
*
* @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} frame - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
* @param {number} x - The horizontal position of this composite in the world.
* @param {number} y - The vertical position of this composite in the world.
* @param {number} columns - The number of columns in the grid.
* @param {number} rows - The number of rows in the grid.
* @param {number} columnGap - The distance between each column.
* @param {number} rowGap - The distance between each row.
* @param {object} options - [description]
* @param {number} [columnGap=0] - The distance between each column.
* @param {number} [rowGap=0] - The distance between each row.
* @param {object} [options] - [description]
*
* @return {Matter.Composite} A Matter JS Composite Stack.
*/
@ -527,8 +527,8 @@ var Factory = new Class({
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {object} options - [description]
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
* @param {object} [options={}] - [description]
*
* @return {Phaser.Physics.Matter.MatterImage} [description]
*/
@ -568,8 +568,8 @@ var Factory = new Class({
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {object} options - [description]
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
* @param {object} [options={}] - [description]
*
* @return {Phaser.Physics.Matter.MatterSprite} [description]
*/

View file

@ -68,7 +68,6 @@ var MatterGameObject = function (world, gameObject, options)
// First let's inject all of the components into the Game Object
mixins.forEach(function (mixin)
{
for (var key in mixin)
{
if (hasGetterOrSetter(mixin[key]))

View file

@ -60,7 +60,7 @@ var Vector2 = require('../../math/Vector2');
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {object} options - [description]
* @param {object} [options={}] - Matter.js configuration object.
*/
var MatterImage = new Class({

View file

@ -65,7 +65,7 @@ var Vector2 = require('../../math/Vector2');
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {object} options - [description]
* @param {object} [options={}] - Matter.js configuration object.
*/
var MatterSprite = new Class({
@ -102,7 +102,7 @@ var MatterSprite = new Class({
/**
* [description]
*
* @name Phaser.Physics.Matter.Image#world
* @name Phaser.Physics.Matter.Sprite#world
* @type {Phaser.Physics.Matter.World}
* @since 3.0.0
*/
@ -111,7 +111,7 @@ var MatterSprite = new Class({
/**
* [description]
*
* @name Phaser.Physics.Matter.Image#_tempVec2
* @name Phaser.Physics.Matter.Sprite#_tempVec2
* @type {Phaser.Math.Vector2}
* @private
* @since 3.0.0

View file

@ -306,7 +306,7 @@ var MatterTileBody = new Class({
/**
* Removes the current body from the tile and the world.
*
* @method Phaser.Physics.Matter.TileBody#removeBody
* @method Phaser.Physics.Matter.TileBody#destroy
* @since 3.0.0
*
* @return {Phaser.Physics.Matter.TileBody} This TileBody object.