Bouncing Ball Activity
- Jayden Croutch
- Dec 10, 2021
- 1 min read
Doing this assignment took more time than usual. I can say that trying to figure out code on p5js is difficult for me. I did many attempts and they didn't work, but then I went on to get help from some friends. The code that I have lets the ball know to bounce on the walls of the canvas. The canvas is measured (X-500, Y-600). Every time I restarted it, it changes color, red, blue, purple, green, yellow. It bounces, bottom, left, right, top, left, right, bottom. I create the ball using the Ellipse code (ellipse (ballX, ballY, 50, 50), and the RBP is 225 for each. As a result, this was a success altogether.
https://editor.p5js.org/Jcroutch_22/sketches/h6IR_pM_C
留言