Interface: LayoutSimulation
A layout that settles over time (force): the trace runs it to rest in calc, or steps it frame by frame for simulate: true and while a node is dragged.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
alpha | readonly | number | How far from rest: starts at 1 and cools toward 0. |
x | readonly | Float64Array | Current positions; the arrays are updated in place by tick. |
y | readonly | Float64Array | - |
z? | readonly | Float64Array<ArrayBufferLike> | - |
Methods
pin()
ts
pin(
i,
x,
y,
z?
): void;Hold node i at a position (a drag); NaN for a coordinate frees it along that axis.
Parameters
| Parameter | Type |
|---|---|
i | number |
x | number |
y | number |
z? | number |
Returns
void
reheat()
ts
reheat(alpha?): void;Warm the layout up again (a drag, new data): alpha is set to at least alpha (default 0.3).
Parameters
| Parameter | Type |
|---|---|
alpha? | number |
Returns
void
tick()
ts
tick(steps?): boolean;Run up to steps iterations (default 1). false once the layout is at rest.
Parameters
| Parameter | Type |
|---|---|
steps? | number |
Returns
boolean
unpin()
ts
unpin(i): void;Release node i.
Parameters
| Parameter | Type |
|---|---|
i | number |
Returns
void