xxxxxxxxxx
45
let C = [];
let check;
let kitten;
let quality = 20000,
quantity = 50000;
function setup() {
createCanvas(605, 600);
pixelDensity(1);
kitten.loadPixels();
}
function preload() {
kitten = loadImage("b.jpg");
}
function draw() {
background(0);
if (C.length > quantity) {
console.log("END");
noLoop();
}
nCircle();
for (let i = 0; i < C.length; i++) {
C[i].show();
C[i].grow();
abc: for (let j = 0; j < C.length; j++) {
if (C[i].growing) {
if (C[i].edges()) {
C[i].stop();
} else {
if (C[i].intersect(C[j]) && i != j) {
C[i].stop();
C[j].stop();
break abc;
}
}
}
}
}
}