pub static ambientLight: AmbientLightInternalTypeExpand description
Creates an ambient light with a color. Ambient light is light that comes from everywhere on the canvas. It has no particular source.
Examples
createCanvas(100, 100, WEBGL);
ambientLight(0);
ambientMaterial(250);
sphere(40);function setup() {
createCanvas(100, 100, WEBGL);
}
function draw() {
background(51);
ambientLight(100); // white light
ambientMaterial(255, 102, 94); // magenta material
box(30);
}Overloads
v1 red or hue value relative to
the current color range
v2 green or saturation value
relative to the current color range
v3 blue or brightness value
relative to the current color range
alpha? the alpha value
value a color string
gray a gray value
alpha? the alpha value
values an array containing the red,green,blue &
and alpha components of the color
color the ambient light color