JavaScript – Matter.js the 2D physics engine .

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 web tool.
You can try all demos.