API Docs for: 0.4.0
Show:

IslandSolver Class

Extends Solver

Splits the system of bodies and equations into independent islands

Constructor

IslandSolver

(
  • subsolver
  • options
)

Parameters:

  • subsolver Solver
  • options Object

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
)

Inherited from Solver but overwritten in src/solver/IslandSolver.js:79

Solves the full system.

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.

numIslands

Number

Number of islands. Read only.

subsolver

Solver

The solver used in the workers.

Events

beforeSolveIsland

Fires before an island is solved.

Event Payload: