diff --git a/src/display/bounds/CenterOn.js b/src/display/bounds/CenterOn.js index c45c4107e..c96255204 100644 --- a/src/display/bounds/CenterOn.js +++ b/src/display/bounds/CenterOn.js @@ -2,23 +2,16 @@ var SetCenterX = require('./SetCenterX'); var SetCenterY = require('./SetCenterY'); /** -* The center x coordinate of the Game Object. -* This is the same as `(x - offsetX) + (width / 2)`. -* -* @property {number} centerX -*/ - -/** - * [description] + * Positions the Game Object so that it is centered on the given coordinates. * * @function Phaser.Display.Bounds.CenterOn * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} x - [description] - * @param {number} y - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} x - The horizontal coordinate to position the Game Object on. + * @param {number} y - The vertical coordinate to position the Game Object on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var CenterOn = function (gameObject, x, y) { diff --git a/src/display/bounds/GetBottom.js b/src/display/bounds/GetBottom.js index 094beb8e5..a0188c970 100644 --- a/src/display/bounds/GetBottom.js +++ b/src/display/bounds/GetBottom.js @@ -1,12 +1,12 @@ /** - * [description] + * Returns the bottom coordinate from the bounds of the Game Object. * * @function Phaser.Display.Bounds.GetBottom * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. * - * @return {number} [description] + * @return {number} The bottom coordinate of the bounds of the Game Object. */ var GetBottom = function (gameObject) { diff --git a/src/display/bounds/GetCenterX.js b/src/display/bounds/GetCenterX.js index 11df516d5..9ddd4e3e2 100644 --- a/src/display/bounds/GetCenterX.js +++ b/src/display/bounds/GetCenterX.js @@ -1,12 +1,12 @@ /** - * [description] + * Returns the center x coordinate from the bounds of the Game Object. * * @function Phaser.Display.Bounds.GetCenterX * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. * - * @return {number} [description] + * @return {number} The center x coordinate of the bounds of the Game Object. */ var GetCenterX = function (gameObject) { diff --git a/src/display/bounds/GetCenterY.js b/src/display/bounds/GetCenterY.js index a6f4d7844..fe3f0c598 100644 --- a/src/display/bounds/GetCenterY.js +++ b/src/display/bounds/GetCenterY.js @@ -1,12 +1,12 @@ /** - * [description] + * Returns the center y coordinate from the bounds of the Game Object. * * @function Phaser.Display.Bounds.GetCenterY * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. * - * @return {number} [description] + * @return {number} The center y coordinate of the bounds of the Game Object. */ var GetCenterY = function (gameObject) { diff --git a/src/display/bounds/GetLeft.js b/src/display/bounds/GetLeft.js index daad83405..eb6a81178 100644 --- a/src/display/bounds/GetLeft.js +++ b/src/display/bounds/GetLeft.js @@ -1,12 +1,12 @@ /** - * [description] + * Returns the left coordinate from the bounds of the Game Object. * * @function Phaser.Display.Bounds.GetLeft * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. * - * @return {number} [description] + * @return {number} The left coordinate of the bounds of the Game Object. */ var GetLeft = function (gameObject) { diff --git a/src/display/bounds/GetOffsetX.js b/src/display/bounds/GetOffsetX.js index 8900d7d1c..cc36d0611 100644 --- a/src/display/bounds/GetOffsetX.js +++ b/src/display/bounds/GetOffsetX.js @@ -1,12 +1,15 @@ /** -* The amount the Game Object is visually offset from its x coordinate. -* This is the same as `width * origin.x`. -* It will only be > 0 if origin.x is not equal to zero. -* -* @property {number} offsetX -* @readOnly -*/ - + * Returns the amount the Game Object is visually offset from its x coordinate. + * This is the same as `width * origin.x`. + * This value will only be > 0 if `origin.x` is not equal to zero. + * + * @function Phaser.Display.Bounds.GetOffsetX + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The horizontal offset of the Game Object. + */ var GetOffsetX = function (gameObject) { return gameObject.width * gameObject.originX; diff --git a/src/display/bounds/GetOffsetY.js b/src/display/bounds/GetOffsetY.js index e1a86ba36..92dfc30cf 100644 --- a/src/display/bounds/GetOffsetY.js +++ b/src/display/bounds/GetOffsetY.js @@ -1,12 +1,15 @@ /** -* The amount the Game Object is visually offset from its x coordinate. -* This is the same as `width * origin.x`. -* It will only be > 0 if origin.x is not equal to zero. -* -* @property {number} offsetX -* @readOnly -*/ - + * Returns the amount the Game Object is visually offset from its y coordinate. + * This is the same as `width * origin.y`. + * This value will only be > 0 if `origin.y` is not equal to zero. + * + * @function Phaser.Display.Bounds.GetOffsetY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. + * + * @return {number} The vertical offset of the Game Object. + */ var GetOffsetY = function (gameObject) { return gameObject.height * gameObject.originY; diff --git a/src/display/bounds/GetRight.js b/src/display/bounds/GetRight.js index ae29d1030..059594b0c 100644 --- a/src/display/bounds/GetRight.js +++ b/src/display/bounds/GetRight.js @@ -1,12 +1,12 @@ /** - * [description] + * Returns the right coordinate from the bounds of the Game Object. * * @function Phaser.Display.Bounds.GetRight * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. * - * @return {number} [description] + * @return {number} The right coordinate of the bounds of the Game Object. */ var GetRight = function (gameObject) { diff --git a/src/display/bounds/GetTop.js b/src/display/bounds/GetTop.js index 5f7a45537..5c3ee504e 100644 --- a/src/display/bounds/GetTop.js +++ b/src/display/bounds/GetTop.js @@ -1,12 +1,12 @@ /** - * [description] + * Returns the top coordinate from the bounds of the Game Object. * * @function Phaser.Display.Bounds.GetTop * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from. * - * @return {number} [description] + * @return {number} The top coordinate of the bounds of the Game Object. */ var GetTop = function (gameObject) { diff --git a/src/display/bounds/SetBottom.js b/src/display/bounds/SetBottom.js index f1f325744..dc5ee28cd 100644 --- a/src/display/bounds/SetBottom.js +++ b/src/display/bounds/SetBottom.js @@ -1,13 +1,13 @@ /** - * [description] + * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. * * @function Phaser.Display.Bounds.SetBottom * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} value - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var SetBottom = function (gameObject, value) { diff --git a/src/display/bounds/SetCenterX.js b/src/display/bounds/SetCenterX.js index e136b2230..21dc69416 100644 --- a/src/display/bounds/SetCenterX.js +++ b/src/display/bounds/SetCenterX.js @@ -1,13 +1,13 @@ /** - * [description] + * Positions the Game Object so that the center top of its bounds aligns with the given coordinate. * * @function Phaser.Display.Bounds.SetCenterX * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} x - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} x - The coordinate to position the Game Object bounds on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var SetCenterX = function (gameObject, x) { diff --git a/src/display/bounds/SetCenterY.js b/src/display/bounds/SetCenterY.js index b00b02225..dc03663f0 100644 --- a/src/display/bounds/SetCenterY.js +++ b/src/display/bounds/SetCenterY.js @@ -1,13 +1,13 @@ /** - * [description] + * Positions the Game Object so that the center top of its bounds aligns with the given coordinate. * * @function Phaser.Display.Bounds.SetCenterY * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} y - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} y - The coordinate to position the Game Object bounds on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var SetCenterY = function (gameObject, y) { diff --git a/src/display/bounds/SetLeft.js b/src/display/bounds/SetLeft.js index c9e390e3e..720bad462 100644 --- a/src/display/bounds/SetLeft.js +++ b/src/display/bounds/SetLeft.js @@ -1,13 +1,13 @@ /** - * [description] + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. * * @function Phaser.Display.Bounds.SetLeft * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} value - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var SetLeft = function (gameObject, value) { diff --git a/src/display/bounds/SetRight.js b/src/display/bounds/SetRight.js index d994496f4..1ff525348 100644 --- a/src/display/bounds/SetRight.js +++ b/src/display/bounds/SetRight.js @@ -1,13 +1,13 @@ /** - * [description] + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. * * @function Phaser.Display.Bounds.SetRight * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} value - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var SetRight = function (gameObject, value) { diff --git a/src/display/bounds/SetTop.js b/src/display/bounds/SetTop.js index 3c2f77700..d7028f893 100644 --- a/src/display/bounds/SetTop.js +++ b/src/display/bounds/SetTop.js @@ -1,13 +1,13 @@ /** - * [description] + * Positions the Game Object so that the top of its bounds aligns with the given coordinate. * * @function Phaser.Display.Bounds.SetTop * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {number} value - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. * - * @return {Phaser.GameObjects.GameObject} [description] + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. */ var SetTop = function (gameObject, value) {