Skip to content

Commit 1304eab

Browse files
committed
Added jsdocs
1 parent b415a19 commit 1304eab

15 files changed

Lines changed: 69 additions & 70 deletions

src/display/bounds/CenterOn.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,16 @@ var SetCenterX = require('./SetCenterX');
22
var SetCenterY = require('./SetCenterY');
33

44
/**
5-
* The center x coordinate of the Game Object.
6-
* This is the same as `(x - offsetX) + (width / 2)`.
7-
*
8-
* @property {number} centerX
9-
*/
10-
11-
/**
12-
* [description]
5+
* Positions the Game Object so that it is centered on the given coordinates.
136
*
147
* @function Phaser.Display.Bounds.CenterOn
158
* @since 3.0.0
169
*
17-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
18-
* @param {number} x - [description]
19-
* @param {number} y - [description]
10+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.
11+
* @param {number} x - The horizontal coordinate to position the Game Object on.
12+
* @param {number} y - The vertical coordinate to position the Game Object on.
2013
*
21-
* @return {Phaser.GameObjects.GameObject} [description]
14+
* @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.
2215
*/
2316
var CenterOn = function (gameObject, x, y)
2417
{

src/display/bounds/GetBottom.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 bottom coordinate from the bounds of the Game Object.
33
*
44
* @function Phaser.Display.Bounds.GetBottom
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
88
*
9-
* @return {number} [description]
9+
* @return {number} The bottom coordinate of the bounds of the Game Object.
1010
*/
1111
var GetBottom = function (gameObject)
1212
{

src/display/bounds/GetCenterX.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 center x coordinate from the bounds of the Game Object.
33
*
44
* @function Phaser.Display.Bounds.GetCenterX
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
88
*
9-
* @return {number} [description]
9+
* @return {number} The center x coordinate of the bounds of the Game Object.
1010
*/
1111
var GetCenterX = function (gameObject)
1212
{

src/display/bounds/GetCenterY.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 center y coordinate from the bounds of the Game Object.
33
*
44
* @function Phaser.Display.Bounds.GetCenterY
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
88
*
9-
* @return {number} [description]
9+
* @return {number} The center y coordinate of the bounds of the Game Object.
1010
*/
1111
var GetCenterY = function (gameObject)
1212
{

src/display/bounds/GetLeft.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 left coordinate from the bounds of the Game Object.
33
*
44
* @function Phaser.Display.Bounds.GetLeft
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
88
*
9-
* @return {number} [description]
9+
* @return {number} The left coordinate of the bounds of the Game Object.
1010
*/
1111
var GetLeft = function (gameObject)
1212
{

src/display/bounds/GetOffsetX.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
/**
2-
* The amount the Game Object is visually offset from its x coordinate.
3-
* This is the same as `width * origin.x`.
4-
* It will only be > 0 if origin.x is not equal to zero.
5-
*
6-
* @property {number} offsetX
7-
* @readOnly
8-
*/
9-
2+
* Returns the amount the Game Object is visually offset from its x coordinate.
3+
* This is the same as `width * origin.x`.
4+
* This value will only be > 0 if `origin.x` is not equal to zero.
5+
*
6+
* @function Phaser.Display.Bounds.GetOffsetX
7+
* @since 3.0.0
8+
*
9+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
10+
*
11+
* @return {number} The horizontal offset of the Game Object.
12+
*/
1013
var GetOffsetX = function (gameObject)
1114
{
1215
return gameObject.width * gameObject.originX;

src/display/bounds/GetOffsetY.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
/**
2-
* The amount the Game Object is visually offset from its x coordinate.
3-
* This is the same as `width * origin.x`.
4-
* It will only be > 0 if origin.x is not equal to zero.
5-
*
6-
* @property {number} offsetX
7-
* @readOnly
8-
*/
9-
2+
* Returns the amount the Game Object is visually offset from its y coordinate.
3+
* This is the same as `width * origin.y`.
4+
* This value will only be > 0 if `origin.y` is not equal to zero.
5+
*
6+
* @function Phaser.Display.Bounds.GetOffsetY
7+
* @since 3.0.0
8+
*
9+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
10+
*
11+
* @return {number} The vertical offset of the Game Object.
12+
*/
1013
var GetOffsetY = function (gameObject)
1114
{
1215
return gameObject.height * gameObject.originY;

src/display/bounds/GetRight.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 right coordinate from the bounds of the Game Object.
33
*
44
* @function Phaser.Display.Bounds.GetRight
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
88
*
9-
* @return {number} [description]
9+
* @return {number} The right coordinate of the bounds of the Game Object.
1010
*/
1111
var GetRight = function (gameObject)
1212
{

src/display/bounds/GetTop.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 top coordinate from the bounds of the Game Object.
33
*
44
* @function Phaser.Display.Bounds.GetTop
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.
88
*
9-
* @return {number} [description]
9+
* @return {number} The top coordinate of the bounds of the Game Object.
1010
*/
1111
var GetTop = function (gameObject)
1212
{

src/display/bounds/SetBottom.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* [description]
2+
* Positions the Game Object so that the bottom of its bounds aligns with the given coordinate.
33
*
44
* @function Phaser.Display.Bounds.SetBottom
55
* @since 3.0.0
66
*
7-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
8-
* @param {number} value - [description]
7+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.
8+
* @param {number} value - The coordinate to position the Game Object bounds on.
99
*
10-
* @return {Phaser.GameObjects.GameObject} [description]
10+
* @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.
1111
*/
1212
var SetBottom = function (gameObject, value)
1313
{

0 commit comments

Comments
 (0)