phaser - v4.0.0-rc.4
    Preparing search index...
    type MatterConstraintConfig = {
        angleA?: number;
        angleB?: number;
        angularStiffness?: number;
        bodyA?: MatterJS.BodyType;
        bodyB?: MatterJS.BodyType;
        damping?: number;
        label?: string;
        length?: number;
        plugin?: any;
        pointA?: Vector2Like;
        pointB?: Vector2Like;
        render?: MatterConstraintRenderConfig;
        stiffness?: number;
    }
    Index

    Properties

    angleA?: number

    The angleA of the constraint. If bodyA is set, the angle of bodyA is used instead.

    angleB?: number

    The angleB of the constraint. If bodyB is set, the angle of bodyB is used instead.

    angularStiffness?: number

    A Number that specifies the angular stiffness of the constraint.

    The first possible Body that this constraint is attached to.

    The second possible Body that this constraint is attached to.

    damping?: number

    A Number that specifies the damping of the constraint, i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation. Damping will only be apparent when the constraint also has a very low stiffness. A value of 0.1 means the constraint will apply heavy damping, resulting in little to no oscillation. A value of 0 means the constraint will apply no damping.

    label?: string

    An arbitrary string-based name to help identify this constraint.

    length?: number

    A Number that specifies the target resting length of the constraint. It is calculated automatically in Constraint.create from initial positions of the constraint.bodyA and constraint.bodyB.

    plugin?: any

    An object reserved for storing plugin-specific properties.

    pointA?: Vector2Like

    A Vector that specifies the offset of the constraint from center of the constraint.bodyA if defined, otherwise a world-space position.

    pointB?: Vector2Like

    A Vector that specifies the offset of the constraint from center of the constraint.bodyB if defined, otherwise a world-space position.

    The Debug Render configuration object for this constraint.

    stiffness?: number

    A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting constraint.length. A value of 1 means the constraint should be very stiff. A value of 0.2 means the constraint acts like a soft spring.