# vasturiano/3d-force-graph

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vasturiano-3d-force-graph).**

6,147 stars · 992 forks · HTML · MIT

## Links

- GitHub: https://github.com/vasturiano/3d-force-graph
- Homepage: https://vasturiano.github.io/3d-force-graph/example/large-graph/
- awesome-repositories: https://awesome-repositories.com/repository/vasturiano-3d-force-graph.md

## Topics

`3d` `3d-force-graph` `d3js` `data-visualization` `force-directed-graphs` `threejs` `webgl`

## Description

3d-force-graph is a WebGL-accelerated component for rendering interactive network graphs in three-dimensional space. Built on the ThreeJS library, it positions nodes using a force-directed physics simulation that can be driven by either a D3-force or ngraph engine, producing dynamic layouts that users can rotate, zoom, and pan using mouse, keyboard, or touch controls.

The component distinguishes itself through comprehensive camera control capabilities, including programmatic positioning, animated transitions, automatic timed orbiting, and zoom-to-fit functionality that frames all nodes within the viewport. It supports data-driven styling of both nodes and links, allowing color, size, opacity, and custom 3D geometry to be controlled per element based on data attributes. Animated directional particles can travel along links to visualize flow and connections, while curved link rendering and self-loop display help reduce visual clutter in dense graphs.

User interaction extends beyond basic navigation to include click-to-expand node hierarchies, click-to-highlight connected elements, and dragged node fixing that locks positions against the force simulation. The component also provides coordinate translation between 3D graph space and 2D screen coordinates, direct access to the underlying ThreeJS scene and camera for custom extensions, and post-processing effects like bloom. Graph data can be loaded from JavaScript objects or JSON sources, and labels can be added to nodes and links using text, HTML, or custom elements.

## Tags

### Part of an Awesome List

- [WebGL Rendering Pipelines](https://awesome-repositories.com/f/awesome-lists/devtools/canvas-and-webgl-graphics/webgl-rendering-pipelines.md) — Renders 3D graphics using the ThreeJS library on top of WebGL for hardware-accelerated scene composition.
- [3D Scene Navigators](https://awesome-repositories.com/f/awesome-lists/devtools/keyboard-and-navigation/3d-scene-navigators.md) — Provides WASD and mouse look-around controls for navigating the 3D graph scene. ([source](https://vasturiano.github.io/3d-force-graph/example/controls-fly/))

### Graphics & Multimedia

- [ThreeJS Force-Directed Components](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/engines/canvas-vector-graphics/custom-shape-rendering/graph-node-visualizations/force-directed-topology-graphs/threejs-force-directed-components.md) — A ThreeJS-based component that renders interactive network graphs in 3D space with physics-driven node positioning.
- [Camera Orbit Controls](https://awesome-repositories.com/f/graphics-multimedia/3d-scene-abstractions/camera-orbit-controls.md) — Implements camera orbit controls for rotating the view around the graph by left-clicking and dragging. ([source](https://vasturiano.github.io/3d-force-graph/example/auto-colored/))
- [Force-Directed Topology Graphs](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/engines/canvas-vector-graphics/custom-shape-rendering/graph-node-visualizations/force-directed-topology-graphs.md) — Renders interactive network graphs in 3D space using force-directed physics for node positioning.
- [WebGL Force-Directed Components](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/engines/canvas-vector-graphics/custom-shape-rendering/graph-node-visualizations/force-directed-topology-graphs/webgl-force-directed-components.md) — A WebGL-accelerated force-directed graph component for visualizing node-link diagrams in three dimensions.
- [Node and Edge Customizations](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/axis-appearance-configurations/node-appearance/node-and-edge-customizations.md) — Ships data-driven customization of node and link appearance including color, size, opacity, and 3D geometry. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Data-Driven Styling](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/geospatial-visualizations/custom-map-registrations/map-visual-styling/data-driven-styling.md) — Applies data-driven styling to nodes, controlling size, color, opacity, and custom 3D geometry per element. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [ThreeJS Graph Renderers](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/graph-visualization-libraries/threejs-graph-renderers.md) — An interactive 3D graph visualization built on the ThreeJS WebGL library for rendering network data.
- [Camera Positioning Functions](https://awesome-repositories.com/f/graphics-multimedia/3d-camera-projection-systems/camera-positioning-functions.md) — Ships programmatic camera positioning, rotation, and zoom functions for framing 3D graph views. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Automatic Orbits](https://awesome-repositories.com/f/graphics-multimedia/3d-scene-abstractions/camera-orbit-controls/automatic-orbits.md) — Provides timed automatic camera orbiting for presentations and monitoring of 3D graphs. ([source](https://vasturiano.github.io/3d-force-graph/example/camera-auto-orbit/))
- [Camera Animations](https://awesome-repositories.com/f/graphics-multimedia/camera-systems/camera-interaction-controllers/camera-animations.md) — Moves the camera to a specified position or to frame all nodes with optional smooth transitions. ([source](https://vasturiano.github.io/3d-force-graph/))
- [Camera View Controllers](https://awesome-repositories.com/f/graphics-multimedia/camera-view-controllers.md) — Provides camera view control with positioning, animated transitions, and automatic zoom-to-fit. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Animation and View Controllers](https://awesome-repositories.com/f/graphics-multimedia/camera-view-controllers/animation-and-view-controllers.md) — Provides controls to pause or resume animation, position the camera, and fit the view to show all nodes. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Edge Flow Animations](https://awesome-repositories.com/f/graphics-multimedia/edge-flow-animations.md) — Animates directional particles along graph links to visualize flow and connections between nodes.
- [Text Node Labels](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/engines/canvas-vector-graphics/custom-shape-rendering/graph-node-visualizations/text-node-labels.md) — Displays text labels on graph nodes for direct readability in the 3D scene. ([source](https://vasturiano.github.io/3d-force-graph/example/text-nodes/))
- [Spatial Text Rendering](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines/sprite-in-3d-renderers/spatial-text-rendering.md) — Displays node labels as 2D sprites overlaid on the 3D scene for readable text annotations.
- [ThreeJS Scene Accessors](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/scene-management-systems/scene-initialization/threejs-scene-accessors.md) — Provides access to the underlying 3D scene, camera, and renderer for custom extensions. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))

### User Interface & Experience

- [Force-Directed Layouts](https://awesome-repositories.com/f/user-interface-experience/element-positioning/layout-engines/force-directed-layouts.md) — Renders interactive network graphs in 3D space using force-directed physics for node positioning. ([source](https://vasturiano.github.io/3d-force-graph/example/text-nodes/))
- [Data-Driven Node Styling](https://awesome-repositories.com/f/user-interface-experience/color-themes/chart-color-theming/node-style-templates/data-driven-node-styling.md) — Controls node visual properties like size, color, opacity, and 3D geometry based on data attributes. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Network Graph Navigators](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/general-interaction-frameworks/interaction-models/event-driven-interaction-handlers/3d-scene-interaction-handlers/scientific-3d-interactions/network-graph-navigators.md) — Provides mouse and keyboard controls for rotating, zooming, and panning 3D network graph visualizations.
- [Graph Interactions](https://awesome-repositories.com/f/user-interface-experience/graph-interactions.md) — Provides click, hover, and drag interactions on nodes, links, and the background for graph navigation. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Data-Driven Graph Styling](https://awesome-repositories.com/f/user-interface-experience/graph-link-styling/data-driven-graph-styling.md) — Provides comprehensive data-driven styling of nodes and links with color, size, opacity, and custom geometry.
- [Data-Driven Graph Edge Styling](https://awesome-repositories.com/f/user-interface-experience/links/link-styling/data-driven-graph-edge-styling.md) — Controls width, color, opacity, curvature, and visibility of each graph edge based on data attributes. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Graph Navigation and Selection](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/item-navigation-and-selection/graph-navigation-and-selection.md) — Provides mouse and touch navigation for rotating, zooming, and panning the 3D graph view. ([source](https://vasturiano.github.io/3d-force-graph/example/large-graph/))
- [3D Scene Navigators](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/item-navigation-and-selection/graph-navigation-and-selection/3d-scene-navigators.md) — Provides WASD and mouse look-around controls for navigating the 3D graph scene. ([source](https://vasturiano.github.io/3d-force-graph/example/controls-fly/))
- [Zoomable Pan-and-Scan Controls](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/item-navigation-and-selection/graph-navigation-and-selection/zoomable-pan-and-scan-controls.md) — Provides pan navigation to move the viewport laterally by right-clicking and dragging. ([source](https://vasturiano.github.io/3d-force-graph/example/auto-colored/))
- [Pan Controls](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/item-navigation-and-selection/graph-navigation-and-selection/zoomable-pan-and-scan-controls/pan-controls.md) — Provides pan controls to shift the visible area of the graph by right-clicking and dragging. ([source](https://vasturiano.github.io/3d-force-graph/example/scene/))
- [Zoom Controls](https://awesome-repositories.com/f/user-interface-experience/wheel-driven-navigation/zoom-controls.md) — Provides zoom controls to scale the view in and out using mouse wheel or middle-click. ([source](https://vasturiano.github.io/3d-force-graph/example/auto-colored/))
- [Graph Link Flow Particles](https://awesome-repositories.com/f/user-interface-experience/animation-libraries/particle/geographic-flow-particles/graph-link-flow-particles.md) — Renders moving particles along graph links to indicate direction and flow between connected nodes. ([source](https://vasturiano.github.io/3d-force-graph/example/directional-links-particles/))
- [Node-Emitted Edge Particles](https://awesome-repositories.com/f/user-interface-experience/animation-libraries/particle/geographic-flow-particles/node-emitted-edge-particles.md) — Launches animated particles from a node along its connecting links to visualize data flow or traversal paths. ([source](https://vasturiano.github.io/3d-force-graph/example/emit-particles/))
- [Custom Node and Edge Geometries](https://awesome-repositories.com/f/user-interface-experience/custom-node-geometries/custom-node-and-edge-geometries.md) — Applies per-node and per-link visual properties using ThreeJS geometries and materials driven by data attributes.
- [Dragged Node Position Fixing](https://awesome-repositories.com/f/user-interface-experience/drag-and-drop-layout-engines/graph-node-positioning/dragged-node-position-fixing.md) — Locks a node's position after dragging, preventing the force simulation from pulling it back. ([source](https://vasturiano.github.io/3d-force-graph/example/fix-dragged-nodes/))
- [Graph Node Expand-Collapse](https://awesome-repositories.com/f/user-interface-experience/expanding-content-cells/layer-tree-expanders/graph-node-expand-collapse.md) — Expands or collapses a node's connected neighbors on click to reveal or hide sub-graphs. ([source](https://vasturiano.github.io/3d-force-graph/example/expandable-nodes/))
- [Curved Graph Edges](https://awesome-repositories.com/f/user-interface-experience/graph-link-styling/curved-graph-edges.md) — Draws edges as arcs between nodes to visually distinguish connections and reduce visual clutter. ([source](https://vasturiano.github.io/3d-force-graph/example/curved-links/))
- [Click-to-Expand Node Hierarchies](https://awesome-repositories.com/f/user-interface-experience/hierarchical-node-interactions/click-to-expand-node-hierarchies.md) — Enables drill-down exploration by revealing or hiding child nodes when clicking a parent node. ([source](https://vasturiano.github.io/3d-force-graph/example/expandable-nodes/))
- [Graph Element Annotations](https://awesome-repositories.com/f/user-interface-experience/node-annotations/graph-element-annotations.md) — Provides annotation capabilities for graph nodes and links using text, HTML, or custom elements. ([source](https://vasturiano.github.io/3d-force-graph/))
- [Single Node Selection](https://awesome-repositories.com/f/user-interface-experience/visual-node-editors/area-selection/path-based-node-selection/canvas-node-selection-states/single-node-selection.md) — Selects individual graph nodes by clicking for targeted interactions like highlighting or dragging. ([source](https://vasturiano.github.io/3d-force-graph/example/multi-selection/))
- [Graph Node Highlighting](https://awesome-repositories.com/f/user-interface-experience/visual-status-indicators/focus-state-indicators/focus-highlighting/graph-node-highlighting.md) — Highlights a clicked node and its links while dimming the rest of the graph for focused inspection. ([source](https://vasturiano.github.io/3d-force-graph/example/highlight/))

### Data & Databases

- [Zoom Controls](https://awesome-repositories.com/f/data-databases/graph-layout-engines/graph-layout-configurators/zoom-controls.md) — Provides zoom controls to scale the view in and out using mouse wheel or middle-click. ([source](https://vasturiano.github.io/3d-force-graph/example/scene/))
- [Point Click and Hover Interactions](https://awesome-repositories.com/f/data-databases/interactive-data-charting/chart-interaction-controls/point-click-and-hover-interactions.md) — Responds to clicks, hovers, and drags on nodes and links for interactive graph exploration. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [Interactive Graph Explorers](https://awesome-repositories.com/f/data-databases/structured-data-schemas/graph-based-schema-design/interactive-graph-explorers.md) — Enables navigating and inspecting complex network structures through zoom, pan, rotate, and node selection.
- [Graph Data Loaders](https://awesome-repositories.com/f/data-databases/graph-data-models/graph-data-loaders.md) — Loads graph data from JavaScript objects or JSON sources, defining nodes and links with identifiers. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))
- [JSON Data Import](https://awesome-repositories.com/f/data-databases/json-data-import.md) — Imports graph structure from JSON files or objects, specifying node IDs and link sources and targets. ([source](https://vasturiano.github.io/3d-force-graph/))
- [Physics Engine Selectors](https://awesome-repositories.com/f/data-databases/metric-and-dimension-configuration/physics-engine-selectors.md) — Allows selecting between D3-force or ngraph physics engines and configuring simulation dimensions. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))

### Scientific & Mathematical Computing

- [Force-Directed Layout Physics](https://awesome-repositories.com/f/scientific-mathematical-computing/force-directed-layout-physics.md) — Selects between D3-force and ngraph physics backends to compute node positions and layout dynamics.
- [Graph Simulation Tuners](https://awesome-repositories.com/f/scientific-mathematical-computing/technical-indicator-engines/parameter-tuning/graph-simulation-tuners.md) — Enables tuning physics engine parameters and layout constraints for force-directed graph simulations. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))

### Software Engineering & Architecture

- [Data-Driven Edge Styling](https://awesome-repositories.com/f/software-engineering-architecture/diagram-link-styles/data-driven-edge-styling.md) — Controls width, color, opacity, curvature, and custom 3D geometry of each graph edge based on data attributes. ([source](https://cdn.jsdelivr.net/gh/vasturiano/3d-force-graph@master/README.md))

### Business & Productivity Software

- [Animated Particle Visualizations](https://awesome-repositories.com/f/business-productivity-software/weather-forecasting-applications/global-model-forecasts/animated-particle-visualizations.md) — Animates directional particles along link paths to visualize flow and connections between nodes.
- [Graph Edge Particles](https://awesome-repositories.com/f/business-productivity-software/weather-forecasting-applications/global-model-forecasts/animated-particle-visualizations/graph-edge-particles.md) — Renders animated particles that travel along directed edges to visualize connection flow in graphs. ([source](https://vasturiano.github.io/3d-force-graph/example/directional-links-particles/))

### Programming Languages & Runtimes

- [ThreeJS Scene Object Accessors](https://awesome-repositories.com/f/programming-languages-runtimes/object-property-accessors/javascript-object-property-access/threejs-scene-object-accessors.md) — Provides direct access to the underlying ThreeJS scene, camera, and renderer for custom extensions. ([source](https://vasturiano.github.io/3d-force-graph/))

### Web Development

- [Viewport Fitting Controls](https://awesome-repositories.com/f/web-development/node-based-diagramming-frameworks/viewport-fitting-controls.md) — Adjusts the camera to frame all nodes and links within the viewport automatically. ([source](https://vasturiano.github.io/3d-force-graph/example/fit-to-canvas/))
