Phaser API Documentation

  Version: 
add(object)

Description:

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.

Parameters:

name type description
object object | Array.<object>

Can be single object, or an array, and can be a body, composite or constraint.

Returns:
Description:

This Matter World object.

Since: 3.0.0