Reference lights()

lights()

Places an ambient and directional light in the scene. The lights are set to ambientLight(128, 128, 128) and directionalLight(128, 128, 128, 0, 0, -1).

Note: lights need to be called (whether directly or indirectly) within draw() to remain persistent in a looping program. Placing them in setup() will cause them to only have an effect the first time through the loop.

Examples

This page is generated from the comments in src/webgl/light.js . Please feel free to edit it and submit a pull request!

Related References