xxxxxxxxxx
31
let isLit = false;
function setup() {
fill("black")
createCanvas(400, 400,WEBGL);
}
function draw() {
fill("brown")
background(220);
describe('A blue sphere on a gray background.')
// Enable orbiting with the mouse
orbitControl();
rotateZ(frameCount * 0.009)
// Draw the sphere.
// Set its radius to 30.
sphere(50)
rotateZ(frameCount * 0.01)
fill("yellow")
// Enable orbiting with the mouse.
orbitControl(0.1);
// Draw the torus.
torus(80);
ambientLight(400)
}