Material Class
Module: Light
Material class
Constructor
Material
(
-
settings
Parameters:
-
settings
ObjectOptions for the material
Item Index
Properties
Methods
draw
()
Draw material
setCube
(
-
tex
Set cube environment texture
Parameters:
-
tex
TextureTexture to set on environment channel
setDiffuse
(
-
channel
-
tex
-
name
Set diffuse texture
Parameters:
-
channel
Stringtexture channel ( "diffuse", "specular", "bump", "cube" )
-
tex
TextureTexture to set on diffuse channel
-
name
Stringrequired if texture is atlas
uniforms
(
-
uniforms
Set Material shader uniforms
Parameters:
-
uniforms
DictDictionary of uniforms of shader
Properties
settings
Object
Example:
mat = new Material()
mat.settings{{
color: [1.0,0.0,0.0],
specularWeight: 1.0,
reflectionWeight: 1.0,
alpha:1.0
}}