Adds a Matter JS object, or array of objects, to the world.
The objects should be valid Matter JS entities, such as a Body, Composite or Constraint.
Triggers beforeAdd
and afterAdd
events.
name | type | description |
---|---|---|
object | object | Array.<object> |
Can be single object, or an array, and can be a body, composite or constraint. |
This Matter World object.