xxxxxxxxxx
30
let drops = []
function setup() {
createCanvas(400, 800);
}
function mousePressed() {}
function addInk(x, y, r) {
let drop = new Dot(x, y, r)
for (let other of drops) {
other.marble(drop);
}
drops.push(drop);
}
function draw() {
let x = random(width);
let y = random(height);
let r = random(10, 50);
addInk(x, y, r)
background(220);
for(drop of drops) {
drop.show();
}
}