JavaScript – Matter.js the 2D physics engine .

By | 31/07/2017

The tutorial today is about Matter.js – 2D physics engine for the web.
Let’s try one simple example.
You need a folder named project with index.html file and a js folder with index.js file.
The content of index.html is:

The content of index.js file from js folder is:

Let’s see the result of this script with codepen.io web tool.
You can try all demos.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.