Material Class
Module: Light
Material class
Constructor
Material
(
-
settings
Parameters:
-
settingsObjectOptions for the material
Item Index
Properties
Methods
draw
()
Draw material
setCube
(
-
tex
Set cube environment texture
Parameters:
-
texTextureTexture to set on environment channel
setDiffuse
(
-
channel -
tex -
name
Set diffuse texture
Parameters:
-
channelStringtexture channel ( "diffuse", "specular", "bump", "cube" )
-
texTextureTexture to set on diffuse channel
-
nameStringrequired if texture is atlas
uniforms
(
-
uniforms
Set Material shader uniforms
Parameters:
-
uniformsDictDictionary 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
}}
Docs for Version: 1.0a