API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceSweptHit

@codexo/exojs / math / stable

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).

5
props
0
methods
0
events
Import
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).

Properties5
normalX: number
normalY: number
t: number
x: number
y: number
Source