Class Material2

Represents a Material for use in 2D graphics

Export

Hierarchy

  • Material2

Constructors

Properties

color: Color

Controls the color of the material (defaults to white)

Memberof

Material2

colorAttribute: number
colorUniform: null | WebGLUniformLocation
drawMode: number

Controls the draw mode of the material (one of gl.POINTS, gl.LINES, gl.LINE_STRIP, gl.LINE_LOOP, gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN)

Memberof

Material2

gl: WebGL2RenderingContext
layerUniform: null | WebGLUniformLocation
modelUniform: null | WebGLUniformLocation
positionAttribute: number
texCoordAttribute: number
texture: null | Texture

Controls the texture of the material. Can be null, meaning no texture.

Memberof

Material2

textureUniform: null | WebGLUniformLocation
useTextureUniform: null | WebGLUniformLocation
visible: boolean

Controls the visibility of the material (false = hidden)

Memberof

Material2

shader: ShaderProgram = ...

Shaders to use for all materials

Memberof

Material2

Static

Methods

Generated using TypeDoc