Creates a rectangle Matter body and adds it to the world.
name | type | description |
---|---|---|
x | number |
The horizontal position of the body in the world. |
y | number |
The vertical position of the body in the world. |
width | number |
The width of the body. |
height | number |
The height of the body. |
options | object |
Optional Matter configuration object. |
The Matter.js body that was created.