Phaser API Documentation

  Version: 
<static> parseBody(x, y, config, [options])

Description:

Parses a body element exported by PhysicsEditor.

Parameters:

name type arguments description
x number

The horizontal world location of the body.

y number

The vertical world location of the body.

config object

The body configuration and fixture (child body) definitions, as exported by PhysicsEditor.

options Phaser.Types.Physics.Matter.MatterBodyConfig <optional>

An optional Body configuration object that is used to set initial Body properties on creation.

Returns:
Description:

A compound Matter JS Body.

Type:
  • MatterJS.BodyType
Since: 3.10.0