nape-js API
    Preparing search index...

    Class CollisionArbiter

    An arbiter representing a physical collision between two solid shapes.

    Provides access to contact points, collision normal, friction coefficients, elasticity, and impulse data. Properties marked mutable in pre-handler can only be set within a PreListener handler.

    Obtain via Arbiter.collisionArbiter or by casting from a callback's arbiter list.

    Fully modernized — uses extracted ZPP_ColArbiter directly.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get isSleeping(): boolean

      Whether both interacting bodies are currently sleeping. Throws if the arbiter is not active.

      Returns boolean

    Methods

    • Impulse applied in the normal (collision) direction, summed over all contacts.

      Parameters

      • body: Body | null = null

        One of the two bodies, or null for the combined value.

      • freshOnly: boolean = false

        Only include new contact points. Default false.

      Returns Vec3

    • Rolling impulse applied by this collision.

      Parameters

      • body: Body | null = null

        One of the two bodies, or null for the combined value.

      • freshOnly: boolean = false

        Only include new contact points. Default false.

      Returns number

    • Friction impulse applied in the tangent direction, summed over all contacts.

      Parameters

      • body: Body | null = null

        One of the two bodies, or null for the combined value.

      • freshOnly: boolean = false

        Only include new contact points. Default false.

      Returns Vec3