xxxxxxxxxx
17
function setup() {
createCanvas(300, 380, WEBGL)
noStroke()
}
function draw() {
background('white')
ambientMaterial('cyan')
const dx = map(mouseX, 0, width, 1, -1)
const dy = map(mouseY, 0, height, 1, -1)
directionalLight(255, 255, 255, dx, dy, -.5)
rotateX(frameCount * 0.01)
rotateY(frameCount * 0.01)
rotateZ(frameCount * 0.01)
torus(75, 30, 48, 32)
}