Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name | ### lightFalloff()
Examples |
    Coming soon...
Description | Sets the falloff rates for point lights, spot lights, and ambient lights. The parameters are used to determine the falloff with the following equation: d = distance from light position to vertex position falloff = 1 / (CONSTANT + d * LINEAR + (d*d) * QUADRATIC) Like fill(), it affects only the elements which are created after it in the code. The default value if LightFalloff(1.0, 0.0, 0.0). Thinking about an ambient light with a falloff can be tricky. It is used, for example, if you wanted a region of your scene to be lit ambiently one color and another region to be lit ambiently by another color, you would use an ambient light with location and falloff. You can think of it as a point light that doesn't care which direction a surface is facing.
Syntax |
    lightFalloff(constant, linear, quadratic)
Parameters |
constant | int or float: constant value for determining falloff
linear | int or float: linear value for determining falloff
quadratic | int or float: quadratic value for determining falloff
Returns | None
Usage | Web & Application
Related | lights() ambientLight() pointLight() spotLight() lightSpecular()

Updated on August 30, 2010 04:29:39pm EDT