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

Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/light.js and open a pull request!

Related References