Display Types

This commit is contained in:
Richard Davey 2019-05-09 11:53:08 +01:00
parent e7f091b20d
commit dc3b3ecb03
14 changed files with 18 additions and 18 deletions

View file

@ -1087,7 +1087,7 @@ var BaseCamera = new Class({
* @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor
* @since 3.0.0
*
* @param {(string|number|Phaser.Display.Types.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation.
* @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation.
*
* @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.
*/

View file

@ -262,7 +262,7 @@ var Color = new Class({
* @method Phaser.Display.Color#setFromRGB
* @since 3.0.0
*
* @param {Phaser.Display.Types.InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255.
* @param {Phaser.Types.Display.InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255.
*
* @return {Phaser.Display.Color} This Color object.
*/

View file

@ -12,7 +12,7 @@
*
* @param {number} color - A color value, optionally including the alpha value.
*
* @return {Phaser.Display.Types.ColorObject} An object containing the parsed color values.
* @return {Phaser.Types.Display.ColorObject} An object containing the parsed color values.
*/
var ColorToRGBA = function (color)
{

View file

@ -15,7 +15,7 @@ var HSVToRGB = require('./HSVToRGB');
* @param {number} [s=1] - The saturation, in the range 0 - 1.
* @param {number} [v=1] - The value, in the range 0 - 1.
*
* @return {Phaser.Display.Types.ColorObject[]} An array containing 360 elements, where each contains a single numeric value corresponding to the color at that point in the HSV color wheel.
* @return {Phaser.Types.Display.ColorObject[]} An array containing 360 elements, where each contains a single numeric value corresponding to the color at that point in the HSV color wheel.
*/
var HSVColorWheel = function (s, v)
{

View file

@ -18,9 +18,9 @@ var GetColor = require('./GetColor');
* @param {number} h - The hue, in the range 0 - 1. This is the base color.
* @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.
* @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.
* @param {(Phaser.Display.Types.ColorObject|Phaser.Display.Color)} [out] - A Color object to store the results in. If not given a new ColorObject will be created.
* @param {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} [out] - A Color object to store the results in. If not given a new ColorObject will be created.
*
* @return {(Phaser.Display.Types.ColorObject|Phaser.Display.Color)} An object with the red, green and blue values set in the r, g and b properties.
* @return {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} An object with the red, green and blue values set in the r, g and b properties.
*/
var HSVToRGB = function (h, s, v, out)
{

View file

@ -14,7 +14,7 @@
*
* @param {integer} input - The color value to convert into a Color object.
*
* @return {Phaser.Display.Types.ColorObject} An object with the red, green and blue values set in the r, g and b properties.
* @return {Phaser.Types.Display.ColorObject} An object with the red, green and blue values set in the r, g and b properties.
*/
var IntegerToRGB = function (color)
{

View file

@ -29,7 +29,7 @@ var Linear = require('../../math/Linear');
* @param {number} [length=100] - Distance to interpolate over.
* @param {number} [index=0] - Index to start from.
*
* @return {Phaser.Display.Types.ColorObject} An object containing the interpolated color values.
* @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.
*/
var RGBWithRGB = function (r1, g1, b1, r2, g2, b2, length, index)
{
@ -58,7 +58,7 @@ var RGBWithRGB = function (r1, g1, b1, r2, g2, b2, length, index)
* @param {number} [length=100] - Distance to interpolate over.
* @param {number} [index=0] - Index to start from.
*
* @return {Phaser.Display.Types.ColorObject} An object containing the interpolated color values.
* @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.
*/
var ColorWithColor = function (color1, color2, length, index)
{
@ -83,7 +83,7 @@ var ColorWithColor = function (color1, color2, length, index)
* @param {number} [length=100] - Distance to interpolate over.
* @param {number} [index=0] - Index to start from.
*
* @return {Phaser.Display.Types.ColorObject} An object containing the interpolated color values.
* @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.
*/
var ColorWithRGB = function (color, r, g, b, length, index)
{

View file

@ -12,7 +12,7 @@ var Color = require('./Color');
* @function Phaser.Display.Color.ObjectToColor
* @since 3.0.0
*
* @param {Phaser.Display.Types.InputColorObject} input - An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255.
* @param {Phaser.Types.Display.InputColorObject} input - An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255.
*
* @return {Phaser.Display.Color} A Color object.
*/

View file

@ -16,9 +16,9 @@
* @param {integer} r - The red color value. A number between 0 and 255.
* @param {integer} g - The green color value. A number between 0 and 255.
* @param {integer} b - The blue color value. A number between 0 and 255.
* @param {(Phaser.Display.Types.HSVColorObject|Phaser.Display.Color)} [out] - An object to store the color values in. If not given an HSV Color Object will be created.
* @param {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} [out] - An object to store the color values in. If not given an HSV Color Object will be created.
*
* @return {(Phaser.Display.Types.HSVColorObject|Phaser.Display.Color)} An object with the properties `h`, `s` and `v` set.
* @return {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} An object with the properties `h`, `s` and `v` set.
*/
var RGBToHSV = function (r, g, b, out)
{

View file

@ -16,7 +16,7 @@ var RGBStringToColor = require('./RGBStringToColor');
* @function Phaser.Display.Color.ValueToColor
* @since 3.0.0
*
* @param {(string|number|Phaser.Display.Types.InputColorObject)} input - The source color value to convert.
* @param {(string|number|Phaser.Types.Display.InputColorObject)} input - The source color value to convert.
*
* @return {Phaser.Display.Color} A Color object.
*/

View file

@ -1,5 +1,5 @@
/**
* @typedef {object} Phaser.Display.Types.ColorObject
* @typedef {object} Phaser.Types.Display.ColorObject
* @since 3.0.0
*
* @property {number} r - The red color value in the range 0 to 255.

View file

@ -1,5 +1,5 @@
/**
* @typedef {object} Phaser.Display.Types.HSVColorObject
* @typedef {object} Phaser.Types.Display.HSVColorObject
* @since 3.0.0
*
* @property {number} h - The hue color value. A number between 0 and 1

View file

@ -1,5 +1,5 @@
/**
* @typedef {object} Phaser.Display.Types.InputColorObject
* @typedef {object} Phaser.Types.Display.InputColorObject
* @since 3.0.0
*
* @property {number} [r] - The red color value in the range 0 to 255.

View file

@ -1,3 +1,3 @@
/**
* @namespace Phaser.Display.Types
* @namespace Phaser.Types.Display
*/