xxxxxxxxxx
19
function setup() {
createCanvas(400, 400);
noStroke();
}
function draw() {
drawShapes();
}
function drawShapes() {
if (mouseX < width/2) {
fill(random(255));
rect(random(0, width/2), random(height), random(10, 30), random(10, 30));
}
else {
fill(random(255), random(255), random(255));
circle(random(width/2, width), random(height), random(10, 30));
}
}