xxxxxxxxxx
let g = 0.98;
let x, y;
let v = 0;
let f = 0.90;
function setup() {
createCanvas(windowWidth, windowHeight);
background(255,255,255);
x= width/2;
y = 25;
}
function draw(){
clear();
fill(0,0,255); noStroke();
textSize(20); text( y, 10 ,30);
circle(x, y, 50);
v += g;
y += v;
if ( y + (50/2) > height) {
y = height - 50/2;
v = v * f;
v = -v; }
}
function keyPressed(){
setup();
}