xxxxxxxxxx
let container = [];
let num = 70;
function setup() {
createCanvas(windowWidth, windowHeight);
for(let i = 0; i < num; i++) {
let rndCl = color(random(255),random(255),random(255),random(255));
let sz = random(50,120);
// declare object
let obj = new Face(rndCl, sz);
// Add the object inside the array container
container.push(obj);
container[i].x = random(0,width);
container[i].y = random(0,height);
}
}
function draw() {
for(let i = 0; i < num; i++) {
container[i].display();
}
}