name | type | arguments | Default | description |
---|---|---|---|---|
type | string | <optional> | 'rectangle' |
The shape type. Either |
x | number | <optional> |
The horizontal world position to place the body at. |
|
y | number | <optional> |
The vertical world position to place the body at. |
|
width | number | <optional> |
The width of the body. |
|
height | number | <optional> |
The height of the body. |
|
radius | number | <optional> |
The radius of the body. Used by |
|
maxSides | number | <optional> | 25 |
The max sizes of the body. Used by the |
slope | number | <optional> | 0.5 |
Used by the |
sides | number | <optional> | 5 |
Used by the |
verts | string | array | <optional> |
Used by the |
|
flagInternal | boolean | <optional> | false |
Used by the |
removeCollinear | number | <optional> | 0.01 |
Used by the |
minimumArea | number | <optional> | 10 |
Used by the |
addToWorld | boolean | <optional> | true |
Should the new body be automatically added to the world? |