xxxxxxxxxx
22
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
let block_width = width / 16;
let block_height = height / 16;
// noStroke()
for (let i = 0; i < block_width; i++) {
for (let j = 0; j < block_height; j++) {
colorMode(HSL, 360, 255, 255);
fill(map((i+frameCount) % block_width, 0, block_width, 0, 360), 255, map(j, 0, block_height, 0, 255));
rect(i * 16, j * 16, 16, 16);
}
}
}