Class to hold a mesh.
Kind: global class
Create the mesh object.
Param | Type | Description |
---|---|---|
positions | WebGLBuffer |
vertices positions buffer. |
textureCoords | WebGLBuffer |
vertices texture coords buffer. |
colorss | WebGLBuffer |
vertices colors buffer. |
indices | WebGLBuffer |
indices buffer. |
indicesCount | Number |
how many indices we have. |
Override the colors buffer, if possible.
Kind: instance method of Mesh
Param | Type | Description |
---|---|---|
gl | WebGl |
WebGL context. |
color | Color |
Color to set. |