Class: LightShader

LightShader(vertexShaderPath, fragmentShaderPath) → {LightShader}

new LightShader(vertexShaderPath, fragmentShaderPath) → {LightShader}

Default Constructor

Subclass from SpriteShader

Supports light illumination

Parameters:
Name Type Description
vertexShaderPath String Vertex Shader file path
fragmentShaderPath String Fragment shader file path
Source:
Returns:
New instance of LightShader
Type
LightShader

Methods

activateShader(pixelColor, aCamera) → {void}

Activate the shader for rendering.
Parameters:
Name Type Description
pixelColor Array.<float> [R, G, B, A] Sets the shader pixel color.
aCamera Camera Camera to draw to
Source:
Returns:
Type
void

setLights(l) → {void}

Set the Shader lights
Parameters:
Name Type Description
l Array.<Light> Shader lights
Source:
Returns:
Type
void