D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
biovisualize
Full window
Github gist
Network viz
<html> <head> <script src="//unpkg.com/3d-force-graph"></script> <style> body { margin: 0; } </style> </head> <body> <div id="3d-graph"></div> <script> function drawGraph(_data) { const elem = document.getElementById('3d-graph') const distance = 800 let highlightNodes = []; const Graph = ForceGraph3D()(elem) .graphData(_data) .nodeLabel(node => node.id) .enableNavigationControls(false) .cameraPosition({ z: distance }) .backgroundColor("#121212") window.addEventListener("resize", () => Graph.width(window.innerWidth)); } fetch("https://gist.githubusercontent.com/biovisualize/4f4a0fc62e3bc81076e001eb7a6443bc/raw/a0248a0e85c7d803373e3c733a1b3f490a67237b/top20_airports.json") .then(response => response.text()) .then((data) => { drawGraph(JSON.parse(data)) }) </script> </body> </html>
https://unpkg.com/3d-force-graph