Matter.Composites
The Matter.Composites
module contains factory methods for creating composite bodies
with commonly used configurations (such as stacks and chains).
See the included usage examples.
Methods
Matter.Composites.car
This has now moved to the car example, follow that instead as this function is deprecated here.
Parameters
Returns
A new composite car body
Matter.Composites.chain
Chains all bodies in the given composite together using constraints.
Parameters
Returns
A new composite containing objects chained together with constraints
Matter.Composites.mesh
Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.
Returns
The composite containing objects meshed together with constraints
Matter.Composites.newtonsCradle
This has now moved to the newtonsCradle example, follow that instead as this function is deprecated here.
Parameters
Returns
A new composite newtonsCradle body
Matter.Composites.pyramid
Create a new composite containing bodies created in the callback in a pyramid arrangement. This function uses the body's bounds to prevent overlaps.
Parameters
Returns
A new composite containing objects created in the callback
Matter.Composites.softBody
This has now moved to the softBody example and the cloth example, follow those instead as this function is deprecated here.
Parameters
Returns
A new composite softBody
Matter.Composites.stack
Create a new composite containing bodies created in the callback in a grid arrangement. This function uses the body's bounds to prevent overlaps.
Parameters
Returns
A new composite containing objects created in the callback