1.2

| home | graph lib | utility lib | custom lib | auxiliary lib | tutorials |

   Axis
   Blend
   Color
   ColorBar
   Fog
   Freetype
   Light
   Line
   Material
   Node
   Point
   Plot
   Polygon
   Render
   Scene
   Stencil
   TexCoord
   Text
   Texture
   Vertex

zeMaterial

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

:set(table)

table - a Lua table.

Sets material properties. Valid key-value paris are listed in the table.

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 or disables the object.