Solver Class
Base class for constraint solvers.
Constructor
Solver
()
Item Index
Methods
Properties
Methods
addEquations
(
-
eqs
Add equations. Same as .addEquation, but this time the argument is an array of Equations
Parameters:
-
eqs
Array
emit
(
EventEmitter
-
event
Emit an event.
Parameters:
-
event
Object-
type
String
-
Returns:
EventEmitter:
The self object, for chainability.
has
(
Boolean
-
type
-
listener
Check if an event listener is added
Parameters:
-
type
String -
listener
Function
Returns:
Boolean:
off
(
EventEmitter
-
type
-
listener
Remove an event listener
Parameters:
-
type
String -
listener
Function
Returns:
EventEmitter:
The self object, for chainability.
on
(
EventEmitter
-
type
-
listener
Add an event listener
Parameters:
-
type
String -
listener
Function
Returns:
EventEmitter:
The self object, for chainability.
removeAllEquations
()
Remove all currently added equations.
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.