xxxxxxxxxx
23
let mover;
function setup() {
background(51);
createCanvas(640, 360);
mover = new Mover();
}
function draw() {
background(51);
if(mouseIsPressed){
let gravity = createVector(0, 1);
mover.applyForce(gravity);
}
mover.update();
mover.edges();
mover.display();
}