Must be CbEvent.WAKE, CbEvent.SLEEP, or CbEvent.BREAK.
CbType or OptionType filter, or null to match all constraints.
Called with a ConstraintCallback each time the event fires.
Execution order relative to other listeners (higher = first). Default 0.
The callback function invoked when the event fires. Cannot be set to null.
The filter used to match constraints. Returns an OptionType representing the current include/exclude configuration.
The type of this listener (BODY, CONSTRAINT, INTERACTION, or PRE).
Listener for constraint lifecycle events.
Fires when a constraint matching the
optionsfilter wakes, sleeps, or breaks.Valid events: CbEvent.WAKE, CbEvent.SLEEP, CbEvent.BREAK.
A
BREAKevent fires when the constraint exceeds itsmaxForceormaxErrorlimit. IfremoveOnBreakistrueon the constraint it is also removed from the space.Example
Fully modernized from nape-compiled.js lines 546–649.