5 ms·
I had fun building a TypeScript demo about this topic, involving balls that can bounce and collide. I learned a lot. Code: https://github.com/vandrieu/canvas-b
by mike31fr 2y ago
I had fun building a TypeScript demo about this topic, involving balls that can bounce and collide. I learned a lot.
Code: https://github.com/vandrieu/canvas-bouncing-ball https://github.com/vandrieu/canvas-bouncing-ball
(the collision logic is in src/collision.ts)
Result/Demo: https://vandrieu.github.io/canvas-bouncing-ball/ https://vandrieu.github.io/canvas-bouncing-ball/
- bfelbo 2y agoThis is a really nice demo, great job! I might turn it into a little multiplayer game if you don’t mind? If so, could you add a license?
- mike31fr 2y agoI don't know anything about licences, but no problem, help yourself, take the code, do whatever you want with it, sell it if you want, I would be pleased. Let me know what you built with it, it would be nice for me to see my code used in a game :)