API Docs for: 0.4.0
Show:

Solver Class

Extends EventEmitter

Base class for constraint solvers.

Constructor

Solver

()

Methods

addEquation

(
  • eq
)

Add an equation to be solved.

Parameters:

addEquations

(
  • eqs
)

Add equations. Same as .addEquation, but this time the argument is an array of Equations

Parameters:

  • eqs Array

removeAllEquations

()

Remove all currently added equations.

removeEquation

(
  • eq
)

Remove an equation.

Parameters:

solve

(
  • dt
  • world
)

Method to be implemented in each subclass

Parameters:

sortEquations

()

Sort all equations using the .equationSortFunction. Should be called by subclasses before solving.

Properties

equations

Array

Current equations in the solver.

equationSortFunction

Function | Boolean

Function that is used to sort all equations before each solve.