Create a new composite containing bodies created in the callback in a pyramid 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 pyramid. |
rows | number |
The number of rows in the pyramid. |
columnGap | number |
The distance between each column. |
rowGap | number |
The distance between each row. |
callback | function |
The callback function to be invoked. |
A Matter JS Composite pyramid.