new ShaderMaterial( shaderStrings ) → {ShaderMaterial}

Description
Creates a ShaderMaterial object
Parameters
Name Type Description
shaderStrings Object String representations of shaders {vertex: ~~, fragment: ~~}

Members


programInfo :ProgramInfo

Description
Information to send to gpu

textures :Object

Description
Object of WebglTextures

uniforms :Object

Description
Uniforms used in shader

shaderStrings :Object

Description
String representations of shaders {vertex: ~~, fragment: ~~}

isInit :boolean

Description
Has the ShaderMaterial been initialized in Webgl context

texturesLoaded :boolean

Description
Are the textures loaded onto the Webgl context

isReady :boolean

Description
Gets isReady status

Methods


init( gl )

Description
Initialize webgl program
Parameters
Name Type Description
gl WebglContext Webgl context

loadTextures( gl, textures, onLoadCB )

Description
Load textures onto webglcontext
Parameters
Name Type Description
gl WebglContext webgl context
textures * object describing each texture
onLoadCB * Callback to be fired when all textures are loaded

updateUniforms( uniforms )

Description
Updates uniforms for shader program
Parameters
Name Type Description
uniforms Object