forcefield
v0.1.0
A dependency-free force-directed graph engine: Barnes-Hut many-body simulation,
velocity-Verlet integration, drag / pin / filter / zoom, behind a swappable
Canvas 2D renderer. TypeScript in, ESM out, nothing in node_modules.
Try it — one click, drag anything
basic
Synthetic graph from a seed. Anyone can reproduce it — no data required.
tree
2,864 nodes, laid out from nothing by the simulation. Synthetic, built from a seed — point it at your own export with
?data=.
live
Nodes inserted one at a time into a running simulation. No pre-computed layout.
bench
Fixed-protocol in-browser frame benchmark. No eyeballing.
Measured, not claimed
- 1,651 nodes — sim 2.662ms / frame 3.025ms per tick.
- 2,864 nodes — 60fps sustained, 59.2 1%-low, in-browser.
- 99 tests,
node:test, zero dependencies.
Built for single-digit-thousands of nodes in a browser tab, not hundreds of thousands on a GPU — past roughly 100k nodes a GPU-backed engine wins on brute force alone, and this repo says so rather than pretending otherwise.