mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
Added jsdocs comments to WebGL utils
This commit is contained in:
parent
d2da10c1a9
commit
e85c66a2fd
1 changed files with 21 additions and 18 deletions
|
@ -12,15 +12,15 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [pending]
|
* Packs four floats on a range from 0.0 to 1.0 into a single Uint32
|
||||||
*
|
*
|
||||||
* @function Phaser.Renderer.WebGL.Utils.getTintFromFloats
|
* @function Phaser.Renderer.WebGL.Utils.getTintFromFloats
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {number} r - [pending] - what's the range?
|
* @param {number} r - Red component in a range from 0.0 to 1.0
|
||||||
* @param {number} g - [description]
|
* @param {number} g - [description]
|
||||||
* @param {number} b - [description]
|
* @param {number} b - [description]
|
||||||
* @param {number} a - [pending] - what's the range?
|
* @param {number} a - Alpha component in a range from 0.0 to 1.0
|
||||||
*
|
*
|
||||||
* @return {number} [description]
|
* @return {number} [description]
|
||||||
*/
|
*/
|
||||||
|
@ -35,15 +35,16 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [pending]
|
* Packs a Uint24, representing RGB components, with a Float32, representing
|
||||||
|
* the alpha component, with a range between 0.0 and 1.0 and return a Uint32
|
||||||
*
|
*
|
||||||
* @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha
|
* @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {number} rgb - [pending] - what's the range?
|
* @param {number} rgb - Uint24 representing RGB components
|
||||||
* @param {number} a - [pending] - what's the range?
|
* @param {number} a - Float32 representing Alpha component
|
||||||
*
|
*
|
||||||
* @return {number} [pending]
|
* @return {number} Packed RGBA as Uint32
|
||||||
*/
|
*/
|
||||||
getTintAppendFloatAlpha: function (rgb, a)
|
getTintAppendFloatAlpha: function (rgb, a)
|
||||||
{
|
{
|
||||||
|
@ -52,15 +53,17 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [pending]
|
* Packs a Uint24, representing RGB components, with a Float32, representing
|
||||||
|
* the alpha component, with a range between 0.0 and 1.0 and return a
|
||||||
|
* swizzled Uint32
|
||||||
*
|
*
|
||||||
* @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap
|
* @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {number} rgb - [pending] - what's the range?
|
* @param {number} rgb - Uint24 representing RGB components
|
||||||
* @param {number} a - [pending] - what's the range?
|
* @param {number} a - Float32 representing Alpha component
|
||||||
*
|
*
|
||||||
* @return {number} [pending]
|
* @return {number} Packed RGBA as Uint32
|
||||||
*/
|
*/
|
||||||
getTintAppendFloatAlphaAndSwap: function (rgb, a)
|
getTintAppendFloatAlphaAndSwap: function (rgb, a)
|
||||||
{
|
{
|
||||||
|
@ -73,14 +76,14 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [pending]
|
* Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0
|
||||||
*
|
*
|
||||||
* @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB
|
* @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {number} rgb - [pending]
|
* @param {number} rgb - RGB packed as a Uint24
|
||||||
*
|
*
|
||||||
* @return {number} [pending]
|
* @return {array} Array of floats representing each component as a float
|
||||||
*/
|
*/
|
||||||
getFloatsFromUintRGB: function (rgb)
|
getFloatsFromUintRGB: function (rgb)
|
||||||
{
|
{
|
||||||
|
@ -92,15 +95,15 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [pending]
|
* Counts how many attributes of 32 bits a vertex has
|
||||||
*
|
*
|
||||||
* @function Phaser.Renderer.WebGL.Utils.getComponentCount
|
* @function Phaser.Renderer.WebGL.Utils.getComponentCount
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {number} attributes - [pending]
|
* @param {array} attributes - Array of attributes
|
||||||
* @param {WebGLRenderingContext} glContext - [pending]
|
* @param {WebGLRenderingContext} glContext - WebGLContext used for check types
|
||||||
*
|
*
|
||||||
* @return {number} [pending]
|
* @return {number} Count of 32 bit attributes in vertex
|
||||||
*/
|
*/
|
||||||
getComponentCount: function (attributes, glContext)
|
getComponentCount: function (attributes, glContext)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue