Documentation
    Preparing search index...

    Interface SleepingConfig

    When dynamic bodies at rest stop being simulated (§32).

    §32's example assigns the whole record at once (world.sleeping = {...}); PhysicsWorldOptions.sleeping accepts a partial and fills the gaps from DEFAULT_SLEEPING_CONFIG through resolveSleepingConfig.

    Fields are readonly because this is resolved configuration, not live state: whether a body is asleep is read-only state on the body with wake() and sleep() as the commands (§23, §32).

    interface SleepingConfig {
        angularThreshold: number;
        enabled: boolean;
        linearThreshold: number;
        timeThreshold: number;
    }
    Index
    angularThreshold: number

    Angular speed below which a body counts as at rest, in radians per second.

    enabled: boolean

    Whether bodies may sleep at all.

    linearThreshold: number

    Linear speed below which a body counts as at rest, in metres per second.

    timeThreshold: number

    How long a body must stay below both thresholds before it sleeps, in seconds (§7a: every duration in this engine is seconds).