glissario / bootcamp-schedule

bootcamp progress
0 stars 0 forks source link

Intro to Programming with P5: Comet #60

Closed codingbootcampseu closed 3 years ago

codingbootcampseu commented 3 years ago

Start with a new p5 sketch.

Hints

You can use global variables to save the current position of the comet which can be incremented in the draw() function.

let posX = 0;

function draw() {
  circle(posX, 100, 30);
  posX = posX + 1;
}

Bonus

The comet should get bigger while it moves through the canvas.

The comet should have a fading tail.

Example Solution

glissario commented 3 years ago

done