xxxxxxxxxx
32
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background('white');
noStroke();
let inte=map(mouseY,0,width,5,100)
for (x=20; x<width; x+=40) {
for (y=20; y<height; y+=inte) {
fill(x,y,(mouseX-266));
// if (mouseX > 255 || mouseY > 255) {
// mouseX = mouseX-255;
// mouseY = mouseY - 255;
// }
if (mouseIsPressed == true) {
newColor = int(random(255));
fill(mouseX, newColor, x,y);
}
mapDist = dist(x, y, mouseX, mouseY);
circle(x,y,mapDist/2);
}
}
}