Phaser API Documentation

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

Description:

Parses a body element from the given JSON data.

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 data.

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 Matter JS Body.

Type:
  • MatterJS.BodyType
Since: 3.22.0