AbstractThe set of CbTypes assigned to this constraint. Used to filter which listeners respond to this constraint's events.
Whether the constraint's simulation component is currently sleeping.
Only valid when the constraint is active and in a space — throws otherwise.
Arbitrary user data attached to this constraint.
Lazily initialized to {} on first access.
Called when the constraint breaks. Optional override.
Clamp accumulated impulse. Optional override.
Create a copy of this constraint. Must be overridden.
Draw debug visualization. Optional override.
Compute effective mass matrix (upper triangle). Must be overridden.
Apply impulse to a body. Must be overridden.
Compute positional error. Must be overridden for non-velocity-only constraints.
Prepare the constraint for solving. Optional override.
Called to validate the constraint. Optional override.
Compute velocity error. Must be overridden.
Creates and returns a copy of this constraint with the same parameters. The copy is not automatically added to a space.
Invokes fn once for each distinct body linked to this constraint.
Base class for user-defined N-DOF constraints.
Fully modernized — uses ZPP_UserConstraint directly (extracted to TypeScript). Subclass and override the abstract callback methods to define custom constraints.