ResponseObject
class ResponseObject
An object representing the result of an intersection.
Summary
Properties from ResponseObject
Renderable |
|
boolean |
|
Renderable |
|
boolean |
|
number |
|
number |
|
number |
|
Vector2d |
|
Vector2d |
|
Methods from ResponseObject
object |
|
Public Properties
indexShapeA: number
number
The index of the colliding shape for the object a body
indexShapeB: number
number
The index of the colliding shape for the object b body
overlap: number
number
Magnitude of the overlap on the shortest colliding axis
overlapV: Vector2d
Vector2d
The overlap vector (i.e. overlapN.scale(overlap, overlap)
). If this vector is subtracted from the position of a, a and b will no longer be colliding
Public Methods
clear() → {object}
Set some values of the response back to their defaults.
Call this between tests if you are going to reuse a single
Response object for multiple intersection tests
(recommended as it will avoid allocating extra memory)
Type | Description |
---|---|
object |
this object for chaining |