xxxxxxxxxx
let tentacles;
function setup() {
createCanvas(windowWidth, windowHeight);
background(2, 2, 12);
frameRate(60);
tentacles = [];
for (let i = 0; i < 10; i++) {
tentacles.push(new Tentacle(25));
}
}
function draw() {
// background(2, 2, 12);
if (true) {
for (const t of tentacles) {
t.show();
t.update();
}
return;
}
for (const t of tentacles) {
t.init();
}
let finished = false;
while(!finished) {
finished = true;
for (const t of tentacles) {
t.show();
finished = finished && t.update();
}
}
}