#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# Constraint Class

Defined in: `src/constraints/Constraint.js:5`

Constraint base class

## Constructor

### `Constraint`

(

- `bodyA`
- `bodyB`
- `[options]`

)

Defined in `src/constraints/Constraint.js:5`

#### Parameters:

- `bodyA` Body
- `bodyB` Body
- `[options]` Object optional
  - `[collideConnected=true]` Boolean optional
  - `[wakeUpBodies=true]` Boolean optional

- Index
- Methods
- Properties

## Item Index

### Methods

- disable
- enable
- update

### Properties

- bodyA
- bodyB
- collideConnected
- equations
- id

## Methods

### `disable`

()

Defined in `src/constraints/Constraint.js:80`

Disables all equations in the constraint.

### `enable`

()

Defined in `src/constraints/Constraint.js:69`

Enables all equations in the constraint.

### `update`

()

Defined in `src/constraints/Constraint.js:61`

Update all the equations with data.

## Properties

### `bodyA`

Body

Defined in `src/constraints/Constraint.js:29`

### `bodyB`

Body

Defined in `src/constraints/Constraint.js:34`

### `collideConnected`

Boolean

Defined in `src/constraints/Constraint.js:44`

Set to true if you want the bodies to collide when they are connected.

### `equations`

Array

Defined in `src/constraints/Constraint.js:22`

Equations to be solved in this constraint

### `id`

Number

Defined in `src/constraints/Constraint.js:39`