Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Constraint

Constraint base class

Hierarchy

Index

Constructors

constructor

  • new Constraint(bodyA: Body, bodyB: Body, options?: { collideConnected?: boolean; wakeUpBodies?: boolean }): Constraint
  • Parameters

    • bodyA: Body
    • bodyB: Body
    • 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

bodyA: Body

Body A.

bodyB

bodyB: Body

Body B.

collideConnected

collideConnected: boolean

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

equations

equations: Equation[]

Equations to be solved in this constraint.

Methods

disable

  • disable(): void

enable

  • enable(): void

update

  • update(): void