GPU-native rendering
WebGPU-batched soap-bubble nodes and instanced edges keep drawing work compact.
TypeScript + WebGPU
BubbleGraph is a framework-agnostic TypeScript library for interactive, force-directed bubble graphs rendered with WebGPU.
Bring your own data and interface. BubbleGraph owns rendering, layout, animation, labels, interaction, image export, and cleanup.
WebGPU-batched soap-bubble nodes and instanced edges keep drawing work compact.
GPU uniform-grid repulsion with a CPU fallback, plus collision constraints, edge springs, shuffle, and animated entrances.
Perspective-aware, raster-cached multiline labels use level of detail and a bounded budget.
Pan, zoom, selection, hover, activation, hit testing, fit-to-view, and contextual removal.
Use it from plain TypeScript or wrap it in React, Vue, Svelte, or your own application shell.
Export the whole graph as a high-resolution PNG and observe live FPS, frame time, node, and edge statistics.
Coming soon
This preview shows the API currently used by the examples. Distribution and installation instructions will be added when the library is released.
Supply a positioned container and optional callbacks for selection, hover, activation, removal, rendering, and performance statistics.
Each datum needs a stable ID, label, numeric value, and any host-specific payload.
Add edges, update node state, fit or shuffle the view, and export the finished graph as a PNG.
Call destroy() when the host view unmounts.
import { BubbleGraph } from "bubblegraph";
const graph = await BubbleGraph.create({
container: document.querySelector<HTMLElement>("#graph")!,
onSelect: (index, node) => console.log(node),
});
const root = graph.add({
id: "root", label: "Root item",
value: 120, data: { url: "/root" },
});
const child = graph.add({
id: "child", label: "Related item",
value: 20, data: { url: "/child" },
}, root);
graph.connect(root, child);
graph.fit();
Requires a browser with WebGPU · HTTPS or localhost
Explore four live data-source demos with real data acquisition, progressive expansion, contextual panels, image export, and performance controls.
Search musicians and groups, then expand MusicBrainz's curated artist-to-artist relationships without an API key.
Launch the MusicBrainz explorer →Search biomedical literature and expand PubMed's related-article links with NCBI ESearch, ESummary, and ELink.
Launch the PubMed explorer →Search life-sciences literature, expand references or citing publications page by page, and use citation counts to bring influential articles forward.
Launch the Europe PMC explorer →Search academic works, expand related research into the graph, inspect frequent authors, and tune individual rendering and layout stages.
Launch the explorer →