Static p5_sys::global::normalMaterial[][src]

pub static normalMaterial: NormalMaterialInternalType
Expand description

Normal material for geometry is a material that is not affected by light. It is not reflective and is a placeholder material often used for debugging. Surfaces facing the X-axis, become red, those facing the Y-axis, become green and those facing the Z-axis, become blue. You can view all possible materials in this example.

Examples

function setup() {
  createCanvas(100, 100, WEBGL);
}

function draw() {
  background(200);
  normalMaterial();
  sphere(40);
}