melonJS
    Preparing search index...

    Interface MatterAdapterOptions

    Options accepted by the MatterAdapter constructor.

    interface MatterAdapterOptions {
        gravity?: { x: number; y: number };
        matterEngineOptions?: IEngineDefinition;
        subSteps?: number;
    }
    Index
    gravity?: { x: number; y: number }

    initial world gravity, default {x: 0, y: 1} (matter-js convention)

    matterEngineOptions?: IEngineDefinition

    raw matter-js engine options forwarded to Matter.Engine.create(). Use this to tweak solver iterations, constraint accuracy, etc.

    subSteps?: number

    Number of physics substeps per engine frame. Each call to MatterAdapter.step runs Engine.update(engine, dt / N) N times instead of one full-dt step. Increases narrow-phase accuracy at high relative velocities (break shots, projectiles) at the cost of ~N× physics CPU. Default 1 matches the legacy single-step behaviour. Values < 1 are clamped to 1.