Skip to content

Function: createForceSimulation() ​

ts
function createForceSimulation(graph, options?): LayoutSimulation;

A force simulation of graph, at its start positions and alpha 1. Step it with tick; drag a node with pin and reheat. x, y (and z with dimensions: 3) are its own arrays, updated in place.

Parameters ​

ParameterType
graphLayoutGraph
optionsForceOptions

Returns ​

LayoutSimulation

Released under the MIT License.