Base class for all physics event listeners.
Cannot be instantiated directly — use one of the concrete subclasses: BodyListener, ConstraintListener, InteractionListener, or PreListener.
Provides common properties (type, event, precedence, space) shared by all listener types.
type
event
precedence
space
Fully modernized from nape-compiled.js lines 231–433.
The event this listener responds to.
Valid values depend on the concrete listener type — see CbEvent. Changing this while the listener is assigned to a space re-registers it.
Execution priority of this listener relative to other listeners for the same event. Higher values execute first.
0
The space this listener is currently registered in, or null if not registered.
null
Assign to register/unregister the listener in a space:
listener.space = mySpace; // registerlistener.space = null; // unregister Copy
listener.space = mySpace; // registerlistener.space = null; // unregister
The type of this listener (BODY, CONSTRAINT, INTERACTION, or PRE).
Base class for all physics event listeners.
Cannot be instantiated directly — use one of the concrete subclasses: BodyListener, ConstraintListener, InteractionListener, or PreListener.
Provides common properties (
type,event,precedence,space) shared by all listener types.Fully modernized from nape-compiled.js lines 231–433.