This project contains the implementation of the bouncing ball coding challenge, requiring to generate a ball at a random direction each time the user clicks on the screen (canvas). Whenever the ball reaches the ground it should bounce back untill it fully stops.
In addition to initial requirements i have also implemented ball collision detection and simulation of reaction to the collision. The bouncing factor has also been aded to all the limiting areas of the screen and physics effects such as gravity, tractiong and damping have also been included into the movement of the balls and the collision simulation.
I should warn you that the balls are in constant state of color change so BE PREPARED FOR THE RAINBOW BALL FLOW. Also resizing the screen with multiple balls bouncing is quite fun to watch.
Trying to improve my development skills, using different tools to learn as much as possible and practice implementing best coding practices and trying to get a better job :).
To run this project simply:
- Clone the repository or download the zip containing the code and unzip this to your desired working folder.
- Open a console in your working folder where the code was unzipped.
- Run
npm installto gather all the required dependencies. - Run
npm startto initialize the project, a new window will pop up showing the project execution.
You need to have Node.js installed in your computer in order to run this project.
To run the project tests type npm test on the console where the project resides.
This project is licensed under the MIT license.
Armando Bracho