mwg API
    Preparing search index...

    Interface BodyOptions

    Per-body material and identity options for addBox/addCircle.

    interface BodyOptions {
        angle?: number;
        density?: number;
        friction?: number;
        isStatic?: boolean;
        label?: string;
        restitution?: number;
    }
    Index
    angle?: number

    initial rotation in radians; bodies never spin, this is a display offset for sprites

    density?: number

    mass per unit area; 1 when omitted

    friction?: number
    isStatic?: boolean

    an immovable body: ground, anchors

    label?: string

    a name for collision callbacks and lookups

    restitution?: number

    0 to 1, how much of its speed a bounce keeps; 0 when omitted