how to make a rectangle in matter.js

JavaScript
Matter.Bodies.rectangle(x, y, width, height, [options]);
Source

Also in JavaScript: