phaser - v4.0.0-rc.4
    Preparing search index...
    type MatterSetBodyConfig = {
        addToWorld?: boolean;
        flagInternal?: boolean;
        height?: number;
        maxSides?: number;
        minimumArea?: number;
        radius?: number;
        removeCollinear?: number;
        sides?: number;
        slope?: number;
        type?: string;
        verts?: string | any[];
        width?: number;
        x?: number;
        y?: number;
    }
    Index

    Properties

    addToWorld?: boolean

    Should the new body be automatically added to the world?

    flagInternal?: boolean

    Used by the fromVerts shape. Flag internal edges (coincident part edges)

    height?: number

    The height of the body.

    maxSides?: number

    The max sizes of the body. Used by the circle shape.

    minimumArea?: number

    Used by the fromVerts shape. During decomposition discard parts that have an area less than this.

    radius?: number

    The radius of the body. Used by circle and polygon shapes.

    removeCollinear?: number

    Used by the fromVerts shape. Whether Matter.js will discard collinear edges (to improve performance).

    sides?: number

    Used by the polygon shape. The number of sides the polygon will have.

    slope?: number

    Used 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.

    type?: string

    The shape type. Either rectangle, circle, trapezoid, polygon, fromVertices, fromVerts or fromPhysicsEditor.

    verts?: string | any[]

    Used by the fromVerts shape. The vertices data. Either a path string or an array of vertices.

    width?: number

    The width of the body.

    x?: number

    The horizontal world position to place the body at.

    y?: number

    The vertical world position to place the body at.