Class Constraint

Constraint base class

Hierarchy (view full)

Constructors

  • Parameters

    • bodyA: Body
    • bodyB: Body
    • Optional options: {
          collideConnected?: boolean;
          wakeUpBodies?: boolean;
      }
      • Optional collideConnected?: boolean

        Set to false if you don't want the bodies to collide when they are connected.

        Default

        true
        
      • Optional wakeUpBodies?: boolean

        Set to false if you don't want the bodies to wake up when they are connected.

        Default

        true
        

    Returns Constraint

Properties

bodyA: Body

Body A.

bodyB: Body

Body B.

collideConnected: boolean

Set to false if you don't want the bodies to collide when they are connected.

equations: Equation[]

Equations to be solved in this constraint.

id: number
idCounter: number

Methods

  • Disables all equations in the constraint.

    Returns void

  • Enables all equations in the constraint.

    Returns void

  • Update all the equations with data.

    Returns void