Create a new composite containing Matter Image objects created in a grid arrangement. This function uses the body bounds to prevent overlaps.
name | type | arguments | description |
---|---|---|---|
key | string |
The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. |
|
frame | string | number |
An optional frame from the Texture this Game Object is rendering with. Set to |
|
x | number |
The horizontal position of this composite in the world. |
|
y | number |
The vertical position of this composite in the world. |
|
columns | number |
The number of columns in the grid. |
|
rows | number |
The number of rows in the grid. |
|
columnGap | number | <optional> |
The distance between each column. |
rowGap | number | <optional> |
The distance between each row. |
options | Phaser.Types.Physics.Matter.MatterBodyConfig | <optional> |
An optional Body configuration object that is used to set initial Body properties on creation. |
A Matter JS Composite Stack.