Web BaeWB
Web Bae3y ago
3 replies
Israel

Matter.js matter-wrap plugin

I'm currently working on a portfolio for web design/development work and I want to modify the template from the "Better Boilerplate for Matter.js" video with the matter-wrap plugin to create a looping canvas (example provided in the documentation link).

Basically I want walls on the top and bottom of the screen that objects can't pass through, but to make it so that objects that float off the right side appear on the left and vice versa.

Thanks in advance :)))

https://github.com/liabru/matter-wrap/tree/master
@Web Bae

P.S. I've noticed that if thrown hard enough Matter.js objects can clip through walls and disappear from the screen.... is this something that is fixable or just the way things are with physics engines.
GitHub
a coordinate wrapping plugin for matter-js. Contribute to liabru/matter-wrap development by creating an account on GitHub.
GitHub - liabru/matter-wrap: a coordinate wrapping plugin for matte...
Was this page helpful?