4 ms·
A few months back I tried - and failed - to write a basic 2d physics engine for my JS canvas library. Before then, I tried to use existing JS physics engines wi
by rikroots 6y ago
A few months back I tried - and failed - to write a basic 2d physics engine for my JS canvas library. Before then, I tried to use existing JS physics engines with the library ... but none of them integrated nicely; the closest I got to making something useful was with Matter.js (see Codepen demo[1]).
Rapier has a WASM version, and JS bindings. I'm already looking forward to see if I can get the engine working with my code. Is there a JS-focussed community around Rapier where I can ask questions if I get stuck?
[1] - https://codepen.io/kaliedarik/pen/zYvbwBy https://codepen.io/kaliedarik/pen/zYvbwBy
- teraku 6y agoThey have a discord, the link is on their github: https://github.com/dimforge/rapier https://github.com/dimforge/rapier
- sebcrozet 6y agoAuthor of Rapier here. The best way to get help would be to join our discord server [1]. There is a channel dedicated to rapier.js. So far most of us are Rust devs but we want to grow our JS community progressively. You can also ask questions/post issues on the rapier.js repository [2]. You will also find a WIP user-guide on the rapier website: [3]. Right now the JS bindings are not complete, so a couple of months of work is still needed to expose all the capabilities of Rapier through JS. [1]: https://discord.gg/vt9DJSW https://discord.gg/vt9DJSW [2]: https://github.com/dimforge/rapier.js https://github.com/dimforge/rapier.js [3]: https://www.rapier.rs/docs/user_guides/javascript/getting_started https://www.rapier.rs/docs/user_guides/javascript/getting_st...
- rikroots 6y agoMany thanks! I've joined the discord and will have a go at setting up a Rapier-driven demo in a canvas element this weekend.
- panzerklein 6y agoI've used Matter.js in a project with custom canvas renderer and it performed great. The only issue that I've had to patch up was tunnelling at high speeds. But this is a common problem with many engines.