xxxxxxxxxx
30
let strokeColor = 0;
function setup() {
createCanvas(400, 400);
background(0);
}
function draw() {
background(0);
stroke(strokeColor);
strokeWeight(3);
for(let x = 25; x < mouseX; x += 50)
{
for(let y = 25; y < mouseY; y += 50)
{
let r = random(255);
let b = random(255);
fill(r, 0, b);
ellipse(x, y, 25, 25);
}
}
}
function mousePressed()
{
strokeColor = (strokeColor + 50) % 256;
}