Description
three-forcegraph is a JavaScript library that draws a graph as a three-dimensional object in Three.js. It takes a graph data structure of nodes and links, runs a force-directed layout over it to place the nodes in space, and shows the result as a WebGL object you can add to a Three.js scene. It can use either d3-force-3d or ngraph as the physics engine. The data can be set directly or loaded from a JSON URL, and updates can be applied incrementally. The number of dimensions the simulation runs in can be set to one, two or three. A directed acyclic graph mode arranges nodes top-down, bottom-up, left-to-right, right-to-left, or in radial or depth layouts, with a setting for the spacing between levels. The project's API reference lists the methods and default values. It can be installed from npm or loaded with a script tag, and the author's standalone version and react-three-fiber bindings are mentioned on the project page. The author asks for support through a donation link.…
Highlights
- Force-directed 3D graph as a Three.js object
- d3-force-3d or ngraph physics engines
- Load graph data directly or from JSON
- Directed acyclic graph layout modes
- One, two or three simulation dimensions
Ratings & Reviews
No ratings yet
Be the first to rate Three Forcegraph.
People also visit
Three Forcegraph FAQ
What is three-forcegraph?
A JavaScript library that shows a graph as a force-directed 3D object in a Three.js scene.
How do I install it?
Install it from npm, or load it with a script tag, as the quick start in the README shows.
Which layouts are available?
Force-directed layouts, plus directed acyclic graph modes that arrange nodes top-down, bottom-up, left-to-right, right-to-left, or radially.
Can I load data from a file?
Yes. Set a JSON URL, or pass the graph data directly as nodes and links.
What are the best Three Forcegraph alternatives?
Popular alternatives to Three Forcegraph include 3d Force Graph, Three Globe and Rthreejs. See all Three Forcegraph alternatives










