xxxxxxxxxx
let dt, t;
function setup() {
createCanvas(windowWidth, windowHeight);
t = 0;
dt = 0.5;
p = new particella(0, 0, 1.5, 2.7, 1, 1, 20);
p1 = new particella(width, height, 2, 0.5, 0.3, 1, 20);
}
function draw() {
background(200);
p.aggiorna(dt);
p.disegna();
p.scatola(dt);
p1.aggiorna(dt);
p1.disegna();
p1.scatola(dt);
}