StaticcarCreates a composite with simple car setup of bodies and constraints.
A new composite car body
StaticchainChains all bodies in the given composite together using constraints.
A new composite containing objects chained together with constraints
StaticmeshConnects bodies in the composite with constraints in a grid pattern, with optional cross braces.
The composite containing objects meshed together with constraints
StaticnewtonsCreates a composite with a Newton's Cradle setup of bodies and constraints.
A new composite newtonsCradle body
StaticpyramidCreate a new composite containing bodies created in the callback in a pyramid arrangement. This function uses the body's bounds to prevent overlaps.
A new composite containing objects created in the callback
StaticsoftCreates a simple soft body like object.
A new composite softBody
StaticstackCreate a new composite containing bodies created in the callback in a grid arrangement. This function uses the body's bounds to prevent overlaps.
Starting position in X.
Starting position in Y.
A new composite containing objects created in the callback
The
Matter.Compositesmodule contains factory methods for creating composite bodies with commonly used configurations (such as stacks and chains).See the included usage examples.
Composites