xxxxxxxxxx
var people;
var user;
var panel;
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
user = new User();
people = [];
panel = new Panel(people, user);
}
function draw() {
background(200, 100, 100);
//Display side panel
panel.display();
panel.addPerson();
panel.printConnections()
//Iterate through the people and update their display
for(let i = 0; i<people.length; i++){
let p = people[i];
p.move();
p.interactiveConnection();
p.display();
}
//Update the connections
for(let i = 0; i<people.length; i++){
let p = people[i];
p.formConnection();
}
//Update the user
user.update();
}