| Home | zeGraph lib | Lua lib | Custom lib | Tutorials | Notes | XML Script | C-Talk | Z-Script |
Graph
   axis
   blend
   color
   color bar
   fog
   freetype
   light
   line
   material
   node
   point
   plot
   polygon
   render
   scene
   stencil
   texcoord
   text
   texture
   vertex
Utility
   array
   bio
   hdf
   make
   math
   netcdf
Auxiliary
   curl
   expact
   sqlite
   window

zeMaterial

Use .new("material") to create the object. A zeLight object should precede a material object; otherwise the object has no effect.

:set{...}

Sets material properties with a Lua table. Valid key-value pairs in the Lua table are listed as follows.

Key Value Type Remark
ambient {r, g, b, a, side} Numbers in table Sets the ambient color components of red, green, blue, and alpha. The last paremeter determines front (side > 0), back (side < 0), or both (side = 0).
diffuse {r, g, b, a, side} Numbers in table Sets the diffuse color components of red, green, blue, and alpha. The last paremeter determines front (side > 0), back (side < 0), or both (side = 0).
emission {r, g, b, a, side} Numbers in table Sets the emission color components of red, green, blue, and alpha. The last paremeter determines front (side > 0), back (side < 0), or both (side = 0).
specular {r, g, b, a, side} Numbers in table Sets the specular color components of red, green, blue, and alpha. The last paremeter determines front (side > 0), back (side < 0), or both (side = 0).
shininess {shininess, side} Numbers in table Sets the shininess of material. The second paremeter determines front (side > 0), back (side < 0), or both (side = 0).
enable flag Boolean Enables (default) or disables the object.