Skip to content

Commit 29fde68

Browse files
committed
Added jsdocs.
1 parent 3488ad6 commit 29fde68

17 files changed

Lines changed: 266 additions & 64 deletions

src/geom/circle/Circle.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ var Circle = new Class({
99
initialize:
1010

1111
/**
12-
* [description]
12+
* A Circle object.
13+
*
14+
* This is a geometry object, containing numerical values and related methods to inspect and modify them.
15+
* It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
16+
* To render a Circle you should look at the capabilities of the Graphics class.
1317
*
1418
* @class Circle
1519
* @memberOf Phaser.Geom

src/geom/ellipse/Area.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* [description]
2+
* Calculates the area of the Ellipse.
33
*
44
* @function Phaser.Geom.Ellipse.Area
55
* @since 3.0.0
66
*
7-
* @param {Phaser.Geom.Ellipse} ellipse - [description]
7+
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the area of.
88
*
9-
* @return {number} [description]
9+
* @return {number} The area of the Ellipse.
1010
*/
1111
var Area = function (ellipse)
1212
{

src/geom/ellipse/Circumference.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* [description]
2+
* Returns the circumference of the given Ellipse.
33
*
44
* @function Phaser.Geom.Ellipse.Circumference
55
* @since 3.0.0
66
*
7-
* @param {Phaser.Geom.Ellipse} ellipse - [description]
7+
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference of.
88
*
9-
* @return {number} [description]
9+
* @return {number} The circumference of th Ellipse.
1010
*/
1111
var Circumference = function (ellipse)
1212
{

src/geom/ellipse/CircumferencePoint.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
var Point = require('../point/Point');
22

33
/**
4-
* Given an angle this will return a Point object containing the coordinates of the point
5-
* on the circumference of the ellipse.
4+
* Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle.
65
*
76
* @function Phaser.Geom.Ellipse.CircumferencePoint
87
* @since 3.0.0
98
*
10-
* @param {Phaser.Geom.Ellipse} ellipse - [description]
11-
* @param {float} angle - [description]
12-
* @param {Phaser.Geom.Point|object} [out] - [description]
9+
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.
10+
* @param {number} angle - The angle from the center of the Ellipse to the circumference to return the point from. Given in radians.
11+
* @param {Phaser.Geom.Point|object} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.
1312
*
14-
* @return {Phaser.Geom.Point|object} [description]
13+
* @return {Phaser.Geom.Point|object} A Point object where the `x` and `y` properties are the point on the circumference.
1514
*/
1615
var CircumferencePoint = function (ellipse, angle, out)
1716
{

src/geom/ellipse/Clone.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
var Ellipse = require('./Ellipse');
22

33
/**
4-
* [description]
4+
* Creates a new Ellipse instance based on the values contained in the given source.
55
*
66
* @function Phaser.Geom.Ellipse.Clone
77
* @since 3.0.0
88
*
9-
* @param {Phaser.Geom.Ellipse} source - [description]
9+
* @param {Phaser.Geom.Ellipse} source - The Ellipse to be cloned. Can be an instance of an Ellipse or a ellipse-like object, with x, y, width and height properties.
1010
*
11-
* @return {Phaser.Geom.Ellipse} [description]
11+
* @return {Phaser.Geom.Ellipse} A clone of the source Ellipse.
1212
*/
1313
var Clone = function (source)
1414
{

src/geom/ellipse/Contains.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
2-
* [description]
2+
* Check to see if the Ellipse contains the given x / y coordinates.
33
*
44
* @function Phaser.Geom.Ellipse.Contains
55
* @since 3.0.0
66
*
7-
* @param {Phaser.Geom.Ellipse} ellipse - [description]
8-
* @param {number} x - [description]
9-
* @param {number} y - [description]
7+
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.
8+
* @param {number} x - The x coordinate to check within the ellipse.
9+
* @param {number} y - The y coordinate to check within the ellipse.
1010
*
11-
* @return {boolean} [description]
11+
* @return {boolean} True if the coordinates are within the ellipse, otherwise false.
1212
*/
1313
var Contains = function (ellipse, x, y)
1414
{

src/geom/ellipse/ContainsPoint.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
var Contains = require('./Contains');
22

33
/**
4-
* [description]
4+
* Check to see if the Ellipse contains the given Point object.
55
*
66
* @function Phaser.Geom.Ellipse.ContainsPoint
77
* @since 3.0.0
88
*
9-
* @param {Phaser.Geom.Ellipse} ellipse - [description]
10-
* @param {Phaser.Geom.Point|object} point - [description]
9+
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.
10+
* @param {Phaser.Geom.Point|object} point - The Point object to check if it's within the Circle or not.
1111
*
12-
* @return {boolean} [description]
12+
* @return {boolean} True if the Point coordinates are within the circle, otherwise false.
1313
*/
1414
var ContainsPoint = function (ellipse, point)
1515
{

src/geom/ellipse/ContainsRect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
var Contains = require('./Contains');
22

33
/**
4-
* [description]
4+
* Check to see if the Ellipse contains all four points of the given Rectangle object.
55
*
66
* @function Phaser.Geom.Ellipse.ContainsRect
77
* @since 3.0.0
88
*
99
* @param {Phaser.Geom.Ellipse} ellipse - [description]
10-
* @param {Phaser.Geom.Rectangle|object} rect - [description]
10+
* @param {Phaser.Geom.Rectangle|object} rect - The Rectangle object to check if it's within the Ellipse or not.
1111
*
12-
* @return {boolean} [description]
12+
* @return {boolean} True if all of the Rectangle coordinates are within the ellipse, otherwise false.
1313
*/
1414
var ContainsRect = function (ellipse, rect)
1515
{

src/geom/ellipse/CopyFrom.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/**
2-
* [description]
2+
* Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse
3+
* into the given `dest` Ellipse, then returns the `dest` Ellipse.
34
*
45
* @function Phaser.Geom.Ellipse.CopyFrom
56
* @since 3.0.0
67
*
7-
* @param {Phaser.Geom.Ellipse} source - [description]
8-
* @param {Phaser.Geom.Ellipse} dest - [description]
8+
* @param {Phaser.Geom.Ellipse} source - The source Ellipse to copy the values from.
9+
* @param {Phaser.Geom.Ellipse} dest - The destination Ellipse to copy the values to.
910
*
10-
* @return {Phaser.Geom.Ellipse} [description]
11+
* @return {Phaser.Geom.Ellipse} The dest Ellipse.
1112
*/
1213
var CopyFrom = function (source, dest)
1314
{

0 commit comments

Comments
 (0)