From bdbf2a1f96cc9b4e196ef7fd6158d80507dda7b3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 12 Oct 2017 01:24:01 +0100 Subject: [PATCH] Adding jsdocs --- v3/src/display/align/in/BottomCenter.js | 13 +++++++++++++ v3/src/display/align/in/BottomLeft.js | 13 +++++++++++++ v3/src/display/align/in/BottomRight.js | 13 +++++++++++++ v3/src/display/align/in/Center.js | 13 +++++++++++++ v3/src/display/align/in/LeftCenter.js | 13 +++++++++++++ v3/src/display/align/in/RightCenter.js | 13 +++++++++++++ v3/src/display/align/in/TopCenter.js | 13 +++++++++++++ v3/src/display/align/in/TopLeft.js | 13 +++++++++++++ v3/src/display/align/in/TopRight.js | 13 +++++++++++++ v3/src/display/align/to/BottomCenter.js | 13 +++++++++++++ v3/src/display/align/to/BottomLeft.js | 13 +++++++++++++ v3/src/display/align/to/BottomRight.js | 13 +++++++++++++ v3/src/display/align/to/LeftBottom.js | 13 +++++++++++++ v3/src/display/align/to/LeftCenter.js | 13 +++++++++++++ v3/src/display/align/to/LeftTop.js | 13 +++++++++++++ v3/src/display/align/to/RightBottom.js | 13 +++++++++++++ v3/src/display/align/to/RightCenter.js | 13 +++++++++++++ v3/src/display/align/to/RightTop.js | 13 +++++++++++++ v3/src/display/align/to/TopCenter.js | 13 +++++++++++++ v3/src/display/align/to/TopLeft.js | 13 +++++++++++++ v3/src/display/align/to/TopRight.js | 13 +++++++++++++ v3/src/display/bounds/CenterOn.js | 12 ++++++++++++ v3/src/display/bounds/GetBottom.js | 15 +++++++++------ v3/src/display/bounds/GetCenterX.js | 15 +++++++++------ v3/src/display/bounds/GetCenterY.js | 15 +++++++++------ v3/src/display/bounds/GetLeft.js | 15 +++++++++------ v3/src/display/bounds/GetRight.js | 15 +++++++++------ v3/src/display/bounds/GetTop.js | 15 +++++++++------ v3/src/display/bounds/SetBottom.js | 16 ++++++++++------ v3/src/display/bounds/SetCenterX.js | 21 ++++++++++----------- v3/src/display/bounds/SetCenterY.js | 21 ++++++++++----------- v3/src/display/bounds/SetLeft.js | 16 ++++++++++------ v3/src/display/bounds/SetRight.js | 16 ++++++++++------ v3/src/display/bounds/SetTop.js | 16 ++++++++++------ v3/src/display/color/RGBToString.js | 14 ++++++++++++++ v3/src/display/color/index.js | 2 +- 36 files changed, 414 insertions(+), 83 deletions(-) diff --git a/v3/src/display/align/in/BottomCenter.js b/v3/src/display/align/in/BottomCenter.js index ec166cef5..edc95a6d2 100644 --- a/v3/src/display/align/in/BottomCenter.js +++ b/v3/src/display/align/in/BottomCenter.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetCenterX = require('../../bounds/SetCenterX'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.In.BottomCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX] - [description] + * @param {number} [offsetY] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var BottomCenter = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/BottomLeft.js b/v3/src/display/align/in/BottomLeft.js index c3b8725b2..b720808b6 100644 --- a/v3/src/display/align/in/BottomLeft.js +++ b/v3/src/display/align/in/BottomLeft.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetLeft = require('../../bounds/SetLeft'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.In.BottomLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX] - [description] + * @param {number} [offsetY] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var BottomLeft = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/BottomRight.js b/v3/src/display/align/in/BottomRight.js index 3fedf09f0..04eabbb56 100644 --- a/v3/src/display/align/in/BottomRight.js +++ b/v3/src/display/align/in/BottomRight.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetRight = require('../../bounds/SetRight'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.In.BottomRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX] - [description] + * @param {number} [offsetY] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var BottomRight = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/Center.js b/v3/src/display/align/in/Center.js index 4830f6cf9..27ec0396b 100644 --- a/v3/src/display/align/in/Center.js +++ b/v3/src/display/align/in/Center.js @@ -2,6 +2,19 @@ var GetCenterX = require('../../bounds/GetCenterX'); var GetCenterY = require('../../bounds/GetCenterY'); var CenterOn = require('../../bounds/CenterOn'); +/** + * [description] + * + * @function Phaser.Display.Align.In.Center + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var Center = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/LeftCenter.js b/v3/src/display/align/in/LeftCenter.js index 63aa36479..0efc84e10 100644 --- a/v3/src/display/align/in/LeftCenter.js +++ b/v3/src/display/align/in/LeftCenter.js @@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY'); var SetLeft = require('../../bounds/SetLeft'); var SetCenterY = require('../../bounds/SetCenterY'); +/** + * [description] + * + * @function Phaser.Display.Align.In.LeftCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var LeftCenter = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/RightCenter.js b/v3/src/display/align/in/RightCenter.js index 154946156..0a102ba06 100644 --- a/v3/src/display/align/in/RightCenter.js +++ b/v3/src/display/align/in/RightCenter.js @@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY'); var SetRight = require('../../bounds/SetRight'); var SetCenterY = require('../../bounds/SetCenterY'); +/** + * [description] + * + * @function Phaser.Display.Align.In.RightCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var RightCenter = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/TopCenter.js b/v3/src/display/align/in/TopCenter.js index b7acec655..64c9a8605 100644 --- a/v3/src/display/align/in/TopCenter.js +++ b/v3/src/display/align/in/TopCenter.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetCenterX = require('../../bounds/SetCenterX'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.In.TopCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var TopCenter = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/TopLeft.js b/v3/src/display/align/in/TopLeft.js index b1e953c23..5a417cd9c 100644 --- a/v3/src/display/align/in/TopLeft.js +++ b/v3/src/display/align/in/TopLeft.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetLeft = require('../../bounds/SetLeft'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.In.TopLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var TopLeft = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/in/TopRight.js b/v3/src/display/align/in/TopRight.js index 44517912b..e12c38393 100644 --- a/v3/src/display/align/in/TopRight.js +++ b/v3/src/display/align/in/TopRight.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetRight = require('../../bounds/SetRight'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.In.TopRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var TopRight = function (gameObject, container, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/BottomCenter.js b/v3/src/display/align/to/BottomCenter.js index 93376bacc..518094c77 100644 --- a/v3/src/display/align/to/BottomCenter.js +++ b/v3/src/display/align/to/BottomCenter.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetCenterX = require('../../bounds/SetCenterX'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.To.BottomCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var BottomCenter = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/BottomLeft.js b/v3/src/display/align/to/BottomLeft.js index 7fdebc66d..488d69f6f 100644 --- a/v3/src/display/align/to/BottomLeft.js +++ b/v3/src/display/align/to/BottomLeft.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetLeft = require('../../bounds/SetLeft'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.To.BottomLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var BottomLeft = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/BottomRight.js b/v3/src/display/align/to/BottomRight.js index b62c580bb..c69d26310 100644 --- a/v3/src/display/align/to/BottomRight.js +++ b/v3/src/display/align/to/BottomRight.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetRight = require('../../bounds/SetRight'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.To.BottomRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var BottomRight = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/LeftBottom.js b/v3/src/display/align/to/LeftBottom.js index 53941adca..23d3266cf 100644 --- a/v3/src/display/align/to/LeftBottom.js +++ b/v3/src/display/align/to/LeftBottom.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetRight = require('../../bounds/SetRight'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.To.LeftBottom + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var LeftBottom = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/LeftCenter.js b/v3/src/display/align/to/LeftCenter.js index ca2a120fa..a5d552940 100644 --- a/v3/src/display/align/to/LeftCenter.js +++ b/v3/src/display/align/to/LeftCenter.js @@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY'); var SetRight = require('../../bounds/SetRight'); var SetCenterY = require('../../bounds/SetCenterY'); +/** + * [description] + * + * @function Phaser.Display.Align.To.LeftCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var LeftCenter = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/LeftTop.js b/v3/src/display/align/to/LeftTop.js index 58bcb41d2..040fe0d96 100644 --- a/v3/src/display/align/to/LeftTop.js +++ b/v3/src/display/align/to/LeftTop.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetRight = require('../../bounds/SetRight'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.To.LeftTop + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var LeftTop = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/RightBottom.js b/v3/src/display/align/to/RightBottom.js index 19e16e4a6..113465da6 100644 --- a/v3/src/display/align/to/RightBottom.js +++ b/v3/src/display/align/to/RightBottom.js @@ -3,6 +3,19 @@ var GetBottom = require('../../bounds/GetBottom'); var SetLeft = require('../../bounds/SetLeft'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.To.RightBottom + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var RightBottom = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/RightCenter.js b/v3/src/display/align/to/RightCenter.js index 825fc5e37..20d2fb848 100644 --- a/v3/src/display/align/to/RightCenter.js +++ b/v3/src/display/align/to/RightCenter.js @@ -3,6 +3,19 @@ var GetCenterY = require('../../bounds/GetCenterY'); var SetLeft = require('../../bounds/SetLeft'); var SetCenterY = require('../../bounds/SetCenterY'); +/** + * [description] + * + * @function Phaser.Display.Align.To.RightTop + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var RightTop = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/RightTop.js b/v3/src/display/align/to/RightTop.js index d24c34385..10312795e 100644 --- a/v3/src/display/align/to/RightTop.js +++ b/v3/src/display/align/to/RightTop.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetLeft = require('../../bounds/SetLeft'); var SetTop = require('../../bounds/SetTop'); +/** + * [description] + * + * @function Phaser.Display.Align.To.RightTop + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var RightTop = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/TopCenter.js b/v3/src/display/align/to/TopCenter.js index 91c8b7276..2d7d6bf27 100644 --- a/v3/src/display/align/to/TopCenter.js +++ b/v3/src/display/align/to/TopCenter.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetCenterX = require('../../bounds/SetCenterX'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.To.TopCenter + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var TopCenter = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/TopLeft.js b/v3/src/display/align/to/TopLeft.js index 715e4b031..7705063fe 100644 --- a/v3/src/display/align/to/TopLeft.js +++ b/v3/src/display/align/to/TopLeft.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetLeft = require('../../bounds/SetLeft'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.To.TopLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var TopLeft = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/align/to/TopRight.js b/v3/src/display/align/to/TopRight.js index 8b1152d8c..cee236540 100644 --- a/v3/src/display/align/to/TopRight.js +++ b/v3/src/display/align/to/TopRight.js @@ -3,6 +3,19 @@ var GetTop = require('../../bounds/GetTop'); var SetRight = require('../../bounds/SetRight'); var SetBottom = require('../../bounds/SetBottom'); +/** + * [description] + * + * @function Phaser.Display.Align.To.TopRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {Phaser.GameObjects.GameObject} container - [description] + * @param {number} [offsetX=0] - [description] + * @param {number} [offsetY=0] - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var TopRight = function (gameObject, parent, offsetX, offsetY) { if (offsetX === undefined) { offsetX = 0; } diff --git a/v3/src/display/bounds/CenterOn.js b/v3/src/display/bounds/CenterOn.js index 4af24f95e..c45c4107e 100644 --- a/v3/src/display/bounds/CenterOn.js +++ b/v3/src/display/bounds/CenterOn.js @@ -8,6 +8,18 @@ var SetCenterY = require('./SetCenterY'); * @property {number} centerX */ +/** + * [description] + * + * @function Phaser.Display.Bounds.CenterOn + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var CenterOn = function (gameObject, x, y) { SetCenterX(gameObject, x); diff --git a/v3/src/display/bounds/GetBottom.js b/v3/src/display/bounds/GetBottom.js index 62e55c3c8..094beb8e5 100644 --- a/v3/src/display/bounds/GetBottom.js +++ b/v3/src/display/bounds/GetBottom.js @@ -1,10 +1,13 @@ /** -* The left coordinate of the Game Object. -* This is the same as `x - offsetX`. -* -* @property {number} left -*/ - + * [description] + * + * @function Phaser.Display.Bounds.GetBottom + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * + * @return {number} [description] + */ var GetBottom = function (gameObject) { return (gameObject.y + gameObject.height) - (gameObject.height * gameObject.originY); diff --git a/v3/src/display/bounds/GetCenterX.js b/v3/src/display/bounds/GetCenterX.js index ac959d990..11df516d5 100644 --- a/v3/src/display/bounds/GetCenterX.js +++ b/v3/src/display/bounds/GetCenterX.js @@ -1,10 +1,13 @@ /** -* The center x coordinate of the Game Object. -* This is the same as `(x - offsetX) + (width / 2)`. -* -* @property {number} centerX -*/ - + * [description] + * + * @function Phaser.Display.Bounds.GetCenterX + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * + * @return {number} [description] + */ var GetCenterX = function (gameObject) { return gameObject.x - (gameObject.width * gameObject.originX) + (gameObject.width * 0.5); diff --git a/v3/src/display/bounds/GetCenterY.js b/v3/src/display/bounds/GetCenterY.js index 1a7237d54..a6f4d7844 100644 --- a/v3/src/display/bounds/GetCenterY.js +++ b/v3/src/display/bounds/GetCenterY.js @@ -1,10 +1,13 @@ /** -* The center x coordinate of the Game Object. -* This is the same as `(x - offsetX) + (width / 2)`. -* -* @property {number} centerX -*/ - + * [description] + * + * @function Phaser.Display.Bounds.GetCenterY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * + * @return {number} [description] + */ var GetCenterY = function (gameObject) { return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5); diff --git a/v3/src/display/bounds/GetLeft.js b/v3/src/display/bounds/GetLeft.js index bba7c17fd..daad83405 100644 --- a/v3/src/display/bounds/GetLeft.js +++ b/v3/src/display/bounds/GetLeft.js @@ -1,10 +1,13 @@ /** -* The left coordinate of the Game Object. -* This is the same as `x - offsetX`. -* -* @property {number} left -*/ - + * [description] + * + * @function Phaser.Display.Bounds.GetLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * + * @return {number} [description] + */ var GetLeft = function (gameObject) { return gameObject.x - (gameObject.width * gameObject.originX); diff --git a/v3/src/display/bounds/GetRight.js b/v3/src/display/bounds/GetRight.js index 4f30384df..ae29d1030 100644 --- a/v3/src/display/bounds/GetRight.js +++ b/v3/src/display/bounds/GetRight.js @@ -1,10 +1,13 @@ /** -* The left coordinate of the Game Object. -* This is the same as `x - offsetX`. -* -* @property {number} left -*/ - + * [description] + * + * @function Phaser.Display.Bounds.GetRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * + * @return {number} [description] + */ var GetRight = function (gameObject) { return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX); diff --git a/v3/src/display/bounds/GetTop.js b/v3/src/display/bounds/GetTop.js index 96ce951af..5f7a45537 100644 --- a/v3/src/display/bounds/GetTop.js +++ b/v3/src/display/bounds/GetTop.js @@ -1,10 +1,13 @@ /** -* The y coordinate of the Game Object. -* This is the same as `y - offsetY`. -* -* @property {number} top -*/ - + * [description] + * + * @function Phaser.Display.Bounds.GetTop + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * + * @return {number} [description] + */ var GetTop = function (gameObject) { return gameObject.y - (gameObject.height * gameObject.originY); diff --git a/v3/src/display/bounds/SetBottom.js b/v3/src/display/bounds/SetBottom.js index 08715b128..f1f325744 100644 --- a/v3/src/display/bounds/SetBottom.js +++ b/v3/src/display/bounds/SetBottom.js @@ -1,10 +1,14 @@ /** -* The left coordinate of the Game Object. -* This is the same as `x - offsetX`. -* -* @property {number} left -*/ - + * [description] + * + * @function Phaser.Display.Bounds.SetBottom + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} value - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var SetBottom = function (gameObject, value) { gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); diff --git a/v3/src/display/bounds/SetCenterX.js b/v3/src/display/bounds/SetCenterX.js index df88629af..e136b2230 100644 --- a/v3/src/display/bounds/SetCenterX.js +++ b/v3/src/display/bounds/SetCenterX.js @@ -1,15 +1,14 @@ /** -* The center x coordinate of the Game Object. -* This is the same as `(x - offsetX) + (width / 2)`. -* -* @property {number} centerX -*/ - -// Phaser.Utils.Bounds.GetCenterX(bob) -// Phaser.Utils.Bounds.CenterOn(bob, x, y) -// Phaser.Utils.Bounds.CenterX(bob, x) -// Phaser.Utils.Bounds.CenterY(bob, x) - + * [description] + * + * @function Phaser.Display.Bounds.SetCenterX + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} x - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var SetCenterX = function (gameObject, x) { var offsetX = gameObject.width * gameObject.originX; diff --git a/v3/src/display/bounds/SetCenterY.js b/v3/src/display/bounds/SetCenterY.js index 10fc1e1df..b00b02225 100644 --- a/v3/src/display/bounds/SetCenterY.js +++ b/v3/src/display/bounds/SetCenterY.js @@ -1,15 +1,14 @@ /** -* The center x coordinate of the Game Object. -* This is the same as `(x - offsetX) + (width / 2)`. -* -* @property {number} centerX -*/ - -// Phaser.Utils.Bounds.GetCenterX(bob) -// Phaser.Utils.Bounds.CenterOn(bob, x, y) -// Phaser.Utils.Bounds.CenterX(bob, x) -// Phaser.Utils.Bounds.CenterY(bob, x) - + * [description] + * + * @function Phaser.Display.Bounds.SetCenterY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} y - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var SetCenterY = function (gameObject, y) { var offsetY = gameObject.height * gameObject.originY; diff --git a/v3/src/display/bounds/SetLeft.js b/v3/src/display/bounds/SetLeft.js index fbbc100eb..c9e390e3e 100644 --- a/v3/src/display/bounds/SetLeft.js +++ b/v3/src/display/bounds/SetLeft.js @@ -1,10 +1,14 @@ /** -* The left coordinate of the Game Object. -* This is the same as `x - offsetX`. -* -* @property {number} left -*/ - + * [description] + * + * @function Phaser.Display.Bounds.SetLeft + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} value - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var SetLeft = function (gameObject, value) { gameObject.x = value + (gameObject.width * gameObject.originX); diff --git a/v3/src/display/bounds/SetRight.js b/v3/src/display/bounds/SetRight.js index fc039319d..d994496f4 100644 --- a/v3/src/display/bounds/SetRight.js +++ b/v3/src/display/bounds/SetRight.js @@ -1,10 +1,14 @@ /** -* The left coordinate of the Game Object. -* This is the same as `x - offsetX`. -* -* @property {number} left -*/ - + * [description] + * + * @function Phaser.Display.Bounds.SetRight + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} value - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var SetRight = function (gameObject, value) { gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX); diff --git a/v3/src/display/bounds/SetTop.js b/v3/src/display/bounds/SetTop.js index d72d167b5..3c2f77700 100644 --- a/v3/src/display/bounds/SetTop.js +++ b/v3/src/display/bounds/SetTop.js @@ -1,10 +1,14 @@ /** -* The y coordinate of the Game Object. -* This is the same as `y - offsetY`. -* -* @property {number} top -*/ - + * [description] + * + * @function Phaser.Display.Bounds.SetTop + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {number} value - [description] + * + * @return {Phaser.GameObjects.GameObject} [description] + */ var SetTop = function (gameObject, value) { gameObject.y = value + (gameObject.height * gameObject.originY); diff --git a/v3/src/display/color/RGBToString.js b/v3/src/display/color/RGBToString.js index f62ab8cf3..76f95e2aa 100644 --- a/v3/src/display/color/RGBToString.js +++ b/v3/src/display/color/RGBToString.js @@ -1,5 +1,19 @@ var ComponentToHex = require('./ComponentToHex'); +/** + * [description] + * + * @function Phaser.Display.Color.RGBToString + * @since 3.0.0 + * + * @param {integer} r - [description] + * @param {integer} g - [description] + * @param {integer} b - [description] + * @param {integer} [a=255] - [description] + * @param {string} [prefix=#] - [description] + * + * @return {string} [description] + */ var RGBToString = function (r, g, b, a, prefix) { if (a === undefined) { a = 255; } diff --git a/v3/src/display/color/index.js b/v3/src/display/color/index.js index c5122af0d..c2af3e32c 100644 --- a/v3/src/display/color/index.js +++ b/v3/src/display/color/index.js @@ -1,4 +1,4 @@ -// Phaser.Graphics.Color +// Phaser.Display.Color var Color = require('./Color');