Create a new composite containing bodies created in the callback in a grid arrangement.
This function uses the body bounds to prevent overlaps.
name | type | description |
---|---|---|
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 |
The distance between each column. |
rowGap | number |
The distance between each row. |
callback | function |
The callback that creates the stack. |
A new composite containing objects created in the callback.