[][src]Static p5_sys::global::shininess

pub static shininess: ShininessInternalType

Sets the amount of gloss in the surface of shapes. Used in combination with specularMaterial() in setting the material properties of shapes. The default and minimum value is 1.

Examples

function setup() {
  createCanvas(100, 100, WEBGL);
}
function draw() {
  background(0);
  noStroke();
  let locX = mouseX - width / 2;
  let locY = mouseY - height / 2;
  ambientLight(60, 60, 60);
  pointLight(255, 255, 255, locX, locY, 50);
  specularMaterial(250);
  translate(-25, 0, 0);
  shininess(1);
  sphere(20);
  translate(50, 0, 0);
  shininess(20);
  sphere(20);
}

Parameters

shine Degree of Shininess. Defaults to 1.