Documentation
    Preparing search index...

    Interface SleepEvent<TBody>

    A body fell asleep or woke up (§32, §37).

    §32 makes sleeping observable state with wake()/sleep() as the commands; this is the notification that the state actually changed, whether the change came from the thresholds, from an explicit command, or from a contact.

    interface SleepEvent<TBody = PhysicsBodyHandle> {
        body: TBody;
        type: SleepPhase;
    }

    Type Parameters

    Index
    body: TBody

    The body whose sleep state changed.

    "sleep" when the body stopped simulating, "wake" when it resumed.