xxxxxxxxxx
19
let ball = {
x: 100, y: 100,
diameter: 40,
r: 31, g: 127, b: 255
};
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(31);
noStroke();
fill(ball.r, ball.g, ball.b);
circle(ball.x, ball.y, ball.diameter);
ball.x = ball.x + 1.0;
ball.y = ball.y + 0.5;
ball.diameter = ball.diameter + 0.2;
}