xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
textSize(20);
fill(0);
text("Ctrl+Z to undo", 12, 30);
}
function draw(){
}
function mouseMoved() {
noStroke();
noCursor();
var count = random(100, 300);
var r = random(2, 10);
var D = sqrt(dist(pmouseX,pmouseY, mouseX, mouseY)) * 8;
for (var i = 0; i < count; i++) {
fill(100, random(100,200), random(180,250));
ellipse(mouseX + random(-1, 1), mouseY+random(-1, 1),r,r);
ellipse(mouseX + random(-1, 1), height-mouseY-random(-1, 1),r,r);
ellipse(width-mouseX-random(-1, 1), mouseY+random(-1, 1),r,r);
ellipse(width-mouseX-random(-1, 1), height-mouseY-random(-1, 1),r,r);
r = r * 0.8
}
}
function mousePressed(){
clear();
//background(0);
setup();
}