Merge pull request #3597 from Fabadiculous/docs

Filling out some docs in for Line, Point, PlayAnimation and  Random
This commit is contained in:
Richard Davey 2018-04-19 14:27:26 +01:00 committed by GitHub
commit 4cd2713bd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 26 deletions

View file

@ -5,7 +5,7 @@
*/
/**
* [description]
* Play an animation with the given key, starting at the given startFrame on all Game Objects in items.
*
* @function Phaser.Actions.PlayAnimation
* @since 3.0.0
@ -13,8 +13,8 @@
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} key - [description]
* @param {(string|integer)} [startFrame] - [description]
* @param {string} key - The name of the animation to play.
* @param {(string|integer)} [startFrame] - The starting frame of the animation with the given key.
*
* @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
*/

View file

@ -19,10 +19,10 @@ var Vector2 = require('../../math/Vector2');
* @constructor
* @since 3.0.0
*
* @param {number} [x1=0] - [description]
* @param {number} [y1=0] - [description]
* @param {number} [x2=0] - [description]
* @param {number} [y2=0] - [description]
* @param {number} [x1=0] - The x coordinate of the lines starting point.
* @param {number} [y1=0] - The y coordinate of the lines starting point.
* @param {number} [x2=0] - The x coordinate of the lines ending point.
* @param {number} [y2=0] - The y coordinate of the lines ending point.
*/
var Line = new Class({
@ -36,7 +36,7 @@ var Line = new Class({
if (y2 === undefined) { y2 = 0; }
/**
* [description]
* The x coordinate of the lines starting point.
*
* @name Phaser.Geom.Line#x1
* @type {number}
@ -45,7 +45,7 @@ var Line = new Class({
this.x1 = x1;
/**
* [description]
* The y coordinate of the lines starting point.
*
* @name Phaser.Geom.Line#y1
* @type {number}
@ -54,7 +54,7 @@ var Line = new Class({
this.y1 = y1;
/**
* [description]
* The x coordinate of the lines ending point.
*
* @name Phaser.Geom.Line#x2
* @type {number}
@ -63,7 +63,7 @@ var Line = new Class({
this.x2 = x2;
/**
* [description]
* The y coordinate of the lines ending point.
*
* @name Phaser.Geom.Line#y2
* @type {number}
@ -83,7 +83,7 @@ var Line = new Class({
* @param {float} position - [description]
* @param {(Phaser.Geom.Point|object)} [output] - [description]
*
* @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.
* @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.
*/
getPoint: function (position, output)
{
@ -110,16 +110,16 @@ var Line = new Class({
},
/**
* [description]
* Get a random Point on the Line.
*
* @method Phaser.Geom.Line#getRandomPoint
* @since 3.0.0
*
* @generic {Phaser.Geom.Point} O - [point,$return]
*
* @param {(Phaser.Geom.Point|object)} [point] - [description]
* @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.
*
* @return {Phaser.Geom.Point} [description]
* @return {Phaser.Geom.Point} A random Point on the Line.
*/
getRandomPoint: function (point)
{
@ -127,15 +127,15 @@ var Line = new Class({
},
/**
* [description]
* Set new coordinates for the line endpoints.
*
* @method Phaser.Geom.Line#setTo
* @since 3.0.0
*
* @param {number} [x1=0] - [description]
* @param {number} [y1=0] - [description]
* @param {number} [x2=0] - [description]
* @param {number} [y2=0] - [description]
* @param {number} [x1=0] - The x coordinate of the lines starting point.
* @param {number} [y1=0] - The y coordinate of the lines starting point.
* @param {number} [x2=0] - The x coordinate of the lines ending point.
* @param {number} [y2=0] - The y coordinate of the lines ending point.
*
* @return {Phaser.Geom.Line} This Line object.
*/

View file

@ -7,17 +7,17 @@
var Point = require('../point/Point');
/**
* [description]
* Returns a random point on a given Line.
*
* @function Phaser.Geom.Line.Random
* @since 3.0.0
*
* @generic {Phaser.Geom.Point} O - [out,$return]
*
* @param {Phaser.Geom.Line} line - [description]
* @param {(Phaser.Geom.Point|object)} [out] - [description]
* @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.
* @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.
*
* @return {(Phaser.Geom.Point|object)} [description]
* @return {(Phaser.Geom.Point|object)} A random Point on the Line.
*/
var Random = function (line, out)
{

View file

@ -8,7 +8,7 @@ var Class = require('../../utils/Class');
/**
* @classdesc
* [description]
* Defines a Point in 2D space, with an x and y component.
*
* @class Point
* @memberOf Phaser.Geom
@ -49,7 +49,7 @@ var Point = new Class({
},
/**
* [description]
* Set the x and y coordinates of the point to the given values.
*
* @method Phaser.Geom.Point#setTo
* @since 3.0.0