Skip to content

d3gl

GPU-accelerated rendering for d3 — SVG, Canvas2D, and WebGL2 from one API.

Three backends, one API

Switch between SVG, Canvas2D, and WebGL2 without touching your drawing code.

Familiar d3 contexts

Context-driven d3 generators (geoPath, d3-shape, d3-hierarchy links) render unchanged.

Project & tessellate once

Geometry is uploaded once; pan/zoom is a single transform-matrix uniform.

GPU recolor & picking

Recolor or show/hide is one texture write; hit-testing is GPU-accelerated.

GeoJSON & maps

Project any GeoJSON with any d3 projection and render the result on the GPU.

Large-scale networks

The network() engine draws millions of nodes and links — in-library force and nested module layouts (worker/GPU) that switch into each other live, streamed from where the nodes are, with smooth re-layout transitions that keep the camera framed, level-of-detail maps of networks that aggregate only where nodes would overlap and whose expanded modules keep their boundaries — in the module’s own colour, as wide as its flow — and a spatial level of detail that keeps a spread-out web graph of hundreds of thousands of nodes to a screenful of glyphs while it lays out.

GPU force layout

layout({ backend: "gpu" }) runs the force layout in WebGL2 on the renderer’s own device and streams it on screen within a per-frame GPU budget, without blocking the main thread; "auto" takes the GPU where it works and the worker elsewhere.

Publication export

Export crisp PNG and SVG straight from the same scene.