Skip to content

Commit 9aeb765

Browse files
committed
Updated type defs
1 parent 120f2c8 commit 9aeb765

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* @typedef {object} Phaser.Types.Renderer.WebGL.WebGLConst
3+
* @since 3.50.0
4+
*
5+
* @property {GLenum} enum - The data type of the attribute, i.e. `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.FLOAT`, etc.
6+
* @property {number} size - The size, in bytes, of the data type.
7+
*/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @typedef {object} Phaser.Types.Renderer.WebGL.WebGLPipelineAttribute
3+
* @since 3.50.0
4+
*
5+
* @property {string} name - The name of the attribute as defined in the vertex shader.
6+
* @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.
7+
* @property {GLenum} type - The data type of the attribute. Either `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.UNSIGNED_SHORT` or `gl.FLOAT`.
8+
* @property {number} offset - The offset, in bytes, of this attribute data in the vertex array. Equivalent to `offsetof(vertex, attrib)` in C.
9+
* @property {boolean} normalized - Should the attribute data be normalized?
10+
* @property {boolean} enabled - You should set this to `false` by default. The pipeline will enable it on boot.
11+
* @property {number} location - You should set this to `-1` by default. The pipeline will set it on boot.
12+
*/

src/renderer/webgl/typedefs/WebGLPipelineAttributesConfig.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
*
55
* @property {string} name - The name of the attribute as defined in the vertex shader.
66
* @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.
7-
* @property {GLenum} type - The data type of the attribute. Either `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.UNSIGNED_SHORT` or `gl.FLOAT`.
8-
* @property {number} offset - The offset, in bytes, of this attribute data in the vertex array. Equivalent to `offsetof(vertex, attrib)` in C.
9-
* @property {boolean} normalized - Should the attribute data be normalized?
10-
* @property {boolean} enabled - You should set this to `false` by default. The pipeline will enable it on boot.
11-
* @property {number} location - You should set this to `-1` by default. The pipeline will set it on boot.
7+
* @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.
8+
* @property {boolean} [normalized=false] - Should the attribute data be normalized?
129
*/

0 commit comments

Comments
 (0)