xxxxxxxxxx
22
let a = 0;
function setup() {
createCanvas(400, 400);
rectMode(CENTER);
angleMode(DEGREES);
}
function draw() {
for (let x = 0; x < width; x += 100) {
for (let y = 0; y < height; y += 100) {
stroke(mouseY, mouseX, random(50,300),random(0,150));
strokeWeight(random(0,30-mouseX));
push();
translate(width/2,height/2);
rotate(a);
rect(x,y,40,40);
pop();
}
}
a = a + 1;
}