Updated type defs

This commit is contained in:
Richard Davey 2020-10-28 16:13:46 +00:00
parent 120f2c87cb
commit 9aeb765696
3 changed files with 21 additions and 5 deletions

View 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.
*/

View 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.
*/

View file

@ -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?
*/