OptionaladdOptionalflagUsed by the fromVerts shape. Flag internal edges (coincident part edges)
OptionalheightThe height of the body.
OptionalmaxThe max sizes of the body. Used by the circle shape.
OptionalminimumUsed by the fromVerts shape. During decomposition discard parts that have an area less than this.
OptionalradiusThe radius of the body. Used by circle and polygon shapes.
OptionalremoveUsed by the fromVerts shape. Whether Matter.js will discard collinear edges (to improve performance).
OptionalsidesUsed by the polygon shape. The number of sides the polygon will have.
OptionalslopeUsed by the trapezoid shape. The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.
OptionaltypeThe shape type. Either rectangle, circle, trapezoid, polygon, fromVertices, fromVerts or fromPhysicsEditor.
OptionalvertsUsed by the fromVerts shape. The vertices data. Either a path string or an array of vertices.
OptionalwidthThe width of the body.
OptionalxThe horizontal world position to place the body at.
OptionalyThe vertical world position to place the body at.
Should the new body be automatically added to the world?