Class: UnlitSpriteShader

UnlitSpriteShader(vertexShaderPath, fragmentShaderPath) → {UnlitSpriteShader}

new UnlitSpriteShader(vertexShaderPath, fragmentShaderPath) → {UnlitSpriteShader}

Default Constructor

Implements a Textured ShaderProgram object where texture coordinate can be changed

Parameters:
Name Type Description
vertexShaderPath String filepath of the Vertex Shader.
fragmentShaderPath String filepath of the Fragment Shader.
Source:
Returns:
An intsnace of UnlitSpriteShader.
Type
UnlitSpriteShader

Methods

cleanUp() → {void}

Detaches and removes the shader from the Shader Program
Source:
Returns:
Type
void

setTextureCoordinate(texCoord) → {void}

Sets the texture coordinate that identifies the proper sprite element to be displayed. texCoord is in UV space.
Parameters:
Name Type Description
texCoord Array.<Float> Shader texture coordinate in UV space
Source:
Returns:
Type
void