Skip to content

ForceNode

Defined in: perf/layout/force.ts:10

Minimal force-directed layout for small / medium graphs.

O(n²) per iteration — fine for the sub-300-node graphs typical in documentation diagrams. For larger graphs prefer a Barnes-Hut quadtree; this implementation favours small bundle size and zero allocations inside the inner loop.

Properties

id

id: string

Defined in: perf/layout/force.ts:12

Stable id used to resolve link endpoints.


pinned?

optional pinned?: boolean

Defined in: perf/layout/force.ts:19

Pinned nodes are excluded from velocity integration.


vx

vx: number

Defined in: perf/layout/force.ts:16

Internal velocity — written by the simulator.


vy

vy: number

Defined in: perf/layout/force.ts:17


x

x: number

Defined in: perf/layout/force.ts:13


y

y: number

Defined in: perf/layout/force.ts:14