Force Simulation
lib/forceSimulation.ts
builds a 3D layout from GraphData
using d3-force-3d
with several customizations.
Highlights
- Community clustering force with cached centers on spherical shells
- Spherical constraint to maintain a coherent knowledge “universe”
- Node charge scaled by degree; link distance and strength from weight
- Precomputed node size/color and community bounds/hierarchy for render speed
Configuration (defaults)
chargeStrength
: -100linkDistance
: 30linkStrength
: 0.2collisionRadius
: 6communityStrength
: 0.2centerStrength
: 0.02
Last updated on