API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceSweptHit
Result of a swept-collision query. The moving shape's reference point is at `(x, y)` at impact, having travelled fraction `t` ∈ [0..1] of the requested move (where 0 = no movement, 1 = full move). The `(normalX, normalY)` vector is the contact normal pointing AWAY from the target (suitable for sliding response: project the remaining velocity onto the perpendicular).
import { SweptHit } from '@codexo/exojs'Result of a swept-collision query. The moving shape's reference point is at `(x, y)` at impact, having travelled fraction `t` ∈ [0..1] of the requested move (where 0 = no movement, 1 = full move). The `(normalX, normalY)` vector is the contact normal pointing AWAY from the target (suitable for sliding response: project the remaining velocity onto the perpendicular).
normalX: numbernormalY: numbert: numberx: numbery: number