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
GitHub - liabru/matter-wrap: a coordinate wrapping plugin for matte...
a coordinate wrapping plugin for matter-js. Contribute to liabru/matter-wrap development by creating an account on GitHub.
3 Replies
@Israel peep this: https://youtu.be/W8rT2jAKZ6c
Web Bae
YouTube
Getting started with matter-wrap plugin for matter.js
In this video I'll show you how to quickly get your matter.js world bodies to wrap around the screen using the matter-wrap plugin for the matterjs physics engine. This is the same effect used in games like Asteroids and Pacman.
// CLONE IT
π―ββοΈ https://webflow.grsm.io/cloneable-is-bae?sub1=matter-wrap-example-yt
// CLONE THE BETTER BOILERPLAT...
special shoutout to my patreon subscribers like @heather @lovebrian649 and @dianneiam.eth who make videos like this possible. π
yes awesome, got it working, thanks soooo much π π