Skip to main content
100%

Force-Directed Web Worker

✓ Published0🌍 Public
Mmbostock
Last edited Jan 21, 2017
Created on Apr 26, 2016

This example shows a force-directed graph of 1,000 nodes computed in a web worker, with a progress bar indicating the simulation’s tick rate. The main thread receives progress updates and renders the final layout on a Canvas using `getContext("2d")`. The layout is calculated with `d3.forceSimulation`, using `forceManyBody`, `forceLink`, and `forceX`/`forceY` forces in worker.js, which imports d3-force modules via `importScripts`.

AI-generated description

This example demonstrates how to compute a static force-directed graph layout using web workers.

gpl-3.0 Licensed

Similar vizzes