This class that allows changes to light parameters if the object is of type 'light'.
Properties
type |
The type of light as a string, either "point", "spot" or "directional". |
attenuation0 |
Floating point parameter for the calculation of lighting. |
attenuation1 |
Floating point parameter for the calculation of lighting. |
attenuation2 |
Floating point parameter for the calculation of lighting. |
range |
Floating point maximum distance over which the light has effect. |
theta |
Outer cone angle in radians. |
phi |
Cone angle in radians. |
falloff |
Amount of falloff between inner and outer cones. |
useLighting |
Use this light in basic lighting. |
useShadows |
Use this light for calculating shadows. |
usePRT |
Use this light for calculating Pre-computed Radiance Transfer. |
Examples
object.light.type="point"; // set the light type of the current object to 'point'.
Remarks
Having too many lights can slow down the rendering, so try to keep them to a minimum.
See Also


