Phaser API Documentation

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


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


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.


The original composite that was passed to this method.

  • MatterJS.CompositeType
Since: 3.0.0