xxxxxxxxxx
48
let x=0;
let y;
let star;
let swan;
let thisT;
let tig;
let car;
function setup() {
createCanvas(400, 400);
y = height
}
function preload() {
star = loadImage('star.png');
swan = loadImage('swan.png');
thisT = loadImage('this.png');
tig = loadImage('tig.png');
car = loadImage('car.png');
}
function draw() {
background(220);
print(x, "x")
print(width,"w")
// if (x > width-10){
// x = 0
// } else {
// ellipse(x, height/2, 50);
// x = lerp(x,width,0.01);
// }
if (y < 10){
y = height
} else {
imageMode(CENTER)
image(star, width/2, y, 100, 100)
//ellipse(width/2, y, 50);
y = lerp(y,0, 0.005);
}
}