xxxxxxxxxx
var ball;
function setup() {
createCanvas(windowWidth, windowHeight);
ball = {
x: width / 8,
y: height / 2,
diameter: 10,
col: color(31, 190, 190),
}
gsap.to(ball, {
x: width - width / 8,
y: height / 2,
diameter: height / 4,
col: color(255, 127, 31),
duration: 3,
delay: 1,
ease: "expo.inOut",
});
}
function draw() {
background(0);
noStroke();
fill(ball.col);
circle(ball.x, ball.y, ball.diameter);
}