xxxxxxxxxx
19
function setup() {
createCanvas(100, 100, WEBGL);
noStroke();
}
function draw() {
background(0);
ambientLight(60);
// add point light to showcase specular material
let locX = mouseX - width / 2;
let locY = mouseY - height / 2;
pointLight(255, 255, 255, locX, locY, 50);
specularMaterial(250);
shininess(50);
torus(30, 10, 64, 64);
}