xxxxxxxxxx
22
const size = 20;
let zoom = 0;
function setup() {
createCanvas(400, 400);
noStroke();
}
function draw() {
zoom = mouseX + mouseY;
background(220);
for (let x=0; x<width; x+=size) {
for (let y=0; y<height; y+=size) {
let c = noise(x/zoom, y/zoom, frameCount / 250) * 255;
fill(0, c, 127);
push();
translate(x, y);
rect(0, 0, size, size);
pop();
}
}
}