Skip to main content

Interface: ForceDirectedLayoutOptions

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:25

Options for the ForceDirectedLayout animation.

Extends​

Properties​

center?​

optional center: Vector3Tuple

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:33

Layout center. Default: [0, 0, 0].


cooling?​

optional cooling: number

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:29

Cooling factor applied to the temperature each step. Default: 0.95.


duration?​

optional duration: number

Defined in: src/animation/Animation.ts:16

Duration of the animation in seconds (default: 1)

Inherited from​

AnimationOptions.duration


initialPositions?​

optional initialPositions: Map<VertexId, Vector3Tuple>

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:35

Explicit initial positions. They override the random or seeded start.


iterations?​

optional iterations: number

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:27

Number of simulation steps to run. Default: 50.


rateFunc?​

optional rateFunc: RateFunction

Defined in: src/animation/Animation.ts:18

Rate function controlling the animation's pacing (default: smooth)

Inherited from​

AnimationOptions.rateFunc


scale?​

optional scale: number

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:31

Layout scale. It sets the force constant and the initial temperature. Default: 2.


seed?​

optional seed: number

Defined in: src/mobjects/graph/ForceDirectedLayout.ts:37

Seed for the random initial positions. Omit to start from the current positions.


shift?​

optional shift: [number, number, number]

Defined in: src/animation/Animation.ts:20

Shift direction for fade animations

Inherited from​

AnimationOptions.shift