Phaser API Documentation

  Version: 
mesh(composite, columns, rows, crossBrace, [options])

Description:

Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.

Parameters:

name type arguments description
composite MatterJS.CompositeType

The composite in which all bodies will be chained together.

columns number

The number of columns in the mesh.

rows number

The number of rows in the mesh.

crossBrace boolean

Create cross braces for the mesh as well?

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

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

Returns:
Description:

The original composite that was passed to this method.

Type:
  • MatterJS.CompositeType
Since: 3.0.0