This is a simple demo of rigidbody physics.
Clicking within the dotted bordered canvas area creates a ball object that bounces within the dotted border until it comes to rest.
This is just a regular npm package so once cloned, run:
npm install && npm run dev
Once cloned and the dependencies have been installed you can create a minified version by running:
npm run build
defaultVx/defaultVy (Default for both is 1000) These represent the x and y speed range used as the initial values (the defaults for both are 1000)
maxFps (Default: 1/60) The maximum elapsed time used to calculate the updated Ball position
gravity Default: 9.8 The value for gravity
friction Default: 0.7 The value used to reduce the speed of the rigid body when it bounces off the canvas borders