xxxxxxxxxx
// posizione
let x, y;
// velocità
let vx, vy;
// raggio
let r = 20;
// tempo
let t, dt;
function setup() {
createCanvas(windowWidth, windowHeight);
t = 0;
dt = 0.5;
p = new Particle(width/2, height/2, 1.2, -2.7, 20);
}
function draw() {
background(100);
fill(0,255,0);
textSize(15);
text("tempo: " + t, 10, 25);
p.muovi(dt);
p.disegna();
p.collidi();
}