xxxxxxxxxx
29
let value = 5
function setup() {
createCanvas(400, 400, WEBGL);
frameRate(28);
}
function draw() {
background(220, 78, 95);
orbitControl();
fill(250,67,250);
rotateX(frameCount * 0.25);
rotateY(frameCount * 0.25);
rotateZ(frameCount * 0.25);
ellipsoid(58, 96, 28);
fill(0, 150, 0);
tint(255, 126);
cone(-100, 200);
fill(value);
torus((mouseX, 0, mouseX, 100));
ambientLight(5);
cylinder(58, 65);
}
function mouseClicked() {
if (value === 5) {
value = 255;
} else {
value = 5;
}
}