p5-matter-examples icon indicating copy to clipboard operation
p5-matter-examples copied to clipboard

Examples showing how to combine p5.js and matter.js.

Results 5 p5-matter-examples issues
Sort by recently updated
recently updated
newest added

We (@b-g and me) used the magnet class in the ["attractor duo" example](https://b-g.github.io/p5-matter-examples/5-attractor-duo/) and noticed that it might not behave like an actual magnet 😆 I think in reality once...

https://codepen.io/csims314/pen/goZQvG

like https://github.com/liabru/matter-js/blob/master/src/body/Body.js#L109 ```js /** * Returns the next unique group index for which bodies will collide. * If `isNonColliding` is `true`, returns the next unique group index for which bodies...

The fix [here](https://github.com/b-g/p5-matter-examples/commit/31590fc4f8ab17e65cb3f999bf173a672c76e978#diff-bb06aa1173e9b664c5643cdedc2f2566b25ecc52b6b4ca1c528f31572f7e2488) causes a bug where shapes imported via SVGs are placed at 0/0 instead of the position they should be. **Desired position:** ![grafik](https://github.com/b-g/p5-matter-examples/assets/7897006/b8c7577e-a00d-4bbb-8a08-8d9cb0f34abf) **Resulting position:** ![grafik](https://github.com/b-g/p5-matter-examples/assets/7897006/9d90741b-18e3-4380-a932-5f32a1d8f94b) **Example project:**...

bug

Would be nice to have a soft body example eg. https://mstdn.social/@golan/109886915779931595 https://user-images.githubusercontent.com/480224/221512044-d3d75876-938a-4dba-bc7b-13b3c1925819.mp4