mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Updated type defs
This commit is contained in:
parent
120f2c87cb
commit
9aeb765696
3 changed files with 21 additions and 5 deletions
7
src/renderer/webgl/typedefs/WebGLConst.js
Normal file
7
src/renderer/webgl/typedefs/WebGLConst.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* @typedef {object} Phaser.Types.Renderer.WebGL.WebGLConst
|
||||
* @since 3.50.0
|
||||
*
|
||||
* @property {GLenum} enum - The data type of the attribute, i.e. `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.FLOAT`, etc.
|
||||
* @property {number} size - The size, in bytes, of the data type.
|
||||
*/
|
12
src/renderer/webgl/typedefs/WebGLPipelineAttribute.js
Normal file
12
src/renderer/webgl/typedefs/WebGLPipelineAttribute.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* @typedef {object} Phaser.Types.Renderer.WebGL.WebGLPipelineAttribute
|
||||
* @since 3.50.0
|
||||
*
|
||||
* @property {string} name - The name of the attribute as defined in the vertex shader.
|
||||
* @property {number} size - The number of components in the attribute, i.e. 1 for a float, 2 for a vec2, 3 for a vec3, etc.
|
||||
* @property {GLenum} type - The data type of the attribute. Either `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.UNSIGNED_SHORT` or `gl.FLOAT`.
|
||||
* @property {number} offset - The offset, in bytes, of this attribute data in the vertex array. Equivalent to `offsetof(vertex, attrib)` in C.
|
||||
* @property {boolean} normalized - Should the attribute data be normalized?
|
||||
* @property {boolean} enabled - You should set this to `false` by default. The pipeline will enable it on boot.
|
||||
* @property {number} location - You should set this to `-1` by default. The pipeline will set it on boot.
|
||||
*/
|
|
@ -4,9 +4,6 @@
|
|||
*
|
||||
* @property {string} name - The name of the attribute as defined in the vertex shader.
|
||||
* @property {number} size - The number of components in the attribute, i.e. 1 for a float, 2 for a vec2, 3 for a vec3, etc.
|
||||
* @property {GLenum} type - The data type of the attribute. Either `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.UNSIGNED_SHORT` or `gl.FLOAT`.
|
||||
* @property {number} offset - The offset, in bytes, of this attribute data in the vertex array. Equivalent to `offsetof(vertex, attrib)` in C.
|
||||
* @property {boolean} normalized - Should the attribute data be normalized?
|
||||
* @property {boolean} enabled - You should set this to `false` by default. The pipeline will enable it on boot.
|
||||
* @property {number} location - You should set this to `-1` by default. The pipeline will set it on boot.
|
||||
* @property {Phaser.Types.Renderer.WebGL.WebGLConst} type - The data type of the attribute, one of the `WEBGL_CONST` values, i.e. `WEBGL_CONST.FLOAT`, `WEBGL_CONST.UNSIGNED_BYTE`, etc.
|
||||
* @property {boolean} [normalized=false] - Should the attribute data be normalized?
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue