[][src]Static p5_sys::global::noLights

pub static noLights: NoLightsInternalType

This function will remove all the lights from the sketch for the subsequent materials rendered. It affects all the subsequent methods. Calls to lighting methods made after noLights() will re-enable lights in the sketch.

Examples

function setup() {
  createCanvas(100, 100, WEBGL);
}
function draw() {
  background(0);
  noStroke();

  ambientLight(150, 0, 0);
  translate(-25, 0, 0);
  ambientMaterial(250);
  sphere(20);

  noLights();
  ambientLight(0, 150, 0);
  translate(50, 0, 0);
  ambientMaterial(250);
  sphere(20);
}