mwg API
    Preparing search index...

    Interface PhysicsOptions

    Construction options for PhysicsWorld.

    interface PhysicsOptions {
        gravity?: { x: number; y: number };
        maxSubsteps?: number;
        step?: number;
    }
    Index
    gravity?: { x: number; y: number }

    gravity strength per axis; y grows downward. The default matches matter-js's historical default pull

    maxSubsteps?: number

    steps one update may run before it drops the backlog; 5 when omitted

    step?: number

    the fixed simulation step in seconds; 1/60 when omitted