the renderable whose handler is firing — always === this.
the partner renderable — always === other.
Penetration depth along the shortest-separation axis (always positive).
Unit minimum-translation vector for the receiver: the direction a
must move to separate from b. Same sign convention across every
adapter — in canvas coordinates (y grows downward):
normal.y < -0.7 → push me up ⇒ I'm on top of b (stomp / landed on)normal.y > 0.7 → push me down ⇒ I'm underneath bMath.abs(normal.x) > 0.7 → mostly horizontal contact (side hit)OptionaloverlapOptionaloverlapOptionaloverlapOptionalpairEngine-native contact pair object. Shape is adapter-specific —
Matter.Pair under @melonjs/matter-adapter, a ContactPair-shaped
object under a future Rapier adapter, a b2Contact under a future
Box2D adapter, etc. Reading this commits your code to a specific
engine; use the portable normal / depth fields for
adapter-portable handlers.
Present only when the active adapter has a native pair concept;
undefined under the built-in SAT adapter (which has no native
pair representation — the SAT detector works pair-by-pair without
persisting them).
Collision response passed to the modern collision lifecycle hooks (
onCollisionStart,onCollisionActive,onCollisionEnd) on every adapter.Receiver-symmetric:
ais always the renderable whose handler is firing (response.a === this),bis always the partner (response.b === other). The same overlap is dispatched once to each side as a separate response witha/bswapped accordingly.NOT the same contract as the legacy
onCollision. The legacy handler receives a different response shape (fixeda/bper pair,overlapVsign convention from b → a, fires 2× per frame for dynamic-dynamic pairs). SeeRenderable.onCollisionJSDoc for that one.Example