mwg API
    Preparing search index...

    Interface XpbdOptions

    Construction options for XpbdWorld. Units are the game's own: gravity, stiffness and strength share one scale.

    interface XpbdOptions {
        damping?: number;
        gravity?: number;
        groundFriction?: number;
        iterations?: number;
        smoothing?: number;
        step?: number;
        substeps?: number;
    }
    Index
    damping?: number

    velocity damping per second (exponential); 2.5 when omitted. Raise it while a structure settles

    gravity?: number

    downward acceleration in units per second squared; 520 when omitted (a 1-unit-per-pixel scale)

    groundFriction?: number

    how much of a node's sideways motion the ground removes while it touches, 0 to 1; 0.5 when omitted

    iterations?: number

    constraint iterations per substep; 2 when omitted

    smoothing?: number

    time constant of the load smoothing used for breaking, in seconds; 0.06 when omitted

    step?: number

    the frame time one step advances, in seconds; 1/60 when omitted

    substeps?: number

    substeps per step; 16 when omitted. More is stiffer and steadier, and costs linearly