API Docs for: 0.6.0
Show:

Constraint Class

Base constraint class.

Constructor

Constraint

(
  • bodyA
  • bodyB
  • type
  • [options]
)

Parameters:

  • bodyA Body
  • bodyB Body
  • type Number
  • [options] Object optional
    • [collideConnected=true] Object optional

Methods

setRelaxation

(
  • relaxation
)

Set relaxation for this constraint.

Parameters:

  • relaxation Number

setStiffness

(
  • stiffness
)

Set stiffness for this constraint.

Parameters:

  • stiffness Number

update

()

Updates the internal constraint parameters before solve.

Properties

bodyA

Body

First body participating in the constraint.

bodyB

Body

Second body participating in the constraint.

collideConnected

Boolean

Set to true if you want the connected bodies to collide.

Default: true

equations

Array

Equations to be solved in this constraint