UNPKG

colliding_balls

Version:

This is simple module that will generate a canvas which will have balls that can collide and move randomly.

22 lines (15 loc) 351 B
# colliding_balls # Credits: https://spicyyoghurt.com/tutorials/html5-javascript-game-development/collision-detection-physics ## Example USage import { collidingBalls } from "colliding_balls"; collidingBalls({ $ele: notNavRef?.current, id: "collider", isStatic: false, count: 1000, size: 1, speed: 1, sameSize: true, }); # it will return canvas