@kortexya/nodus
v0.1.7
Published
Nodus — a high-performance graph visualization engine (WebGL/WebGPU/Canvas/SVG).
Readme
Nodus
A high-performance graph visualization engine for the web. Nodus renders large node–link diagrams across Canvas, SVG, WebGL and WebGPU back-ends, with built-in layouts (force, hierarchical, radial, grid, concentric, sequential), styling rules, interaction tools and hypergraph support.
Install
npm install --save @kortexya/nodusOr drop the bundle straight into a page:
<script src="path/to/nodus.umd.cjs"></script>
<script>
const nodus = new Nodus({ container: 'graph-container' });
</script>With ES modules:
<script type="module">
import { Nodus } from '@kortexya/nodus';
const nodus = new Nodus({ container: 'graph-container' });
</script>Usage
import { Nodus } from '@kortexya/nodus';
const nodus = new Nodus({ container: document.getElementById('graph') });
await nodus.setGraph({
nodes: [{ id: 'a' }, { id: 'b' }],
edges: [{ source: 'a', target: 'b' }],
});
await nodus.layouts.force({ duration: 0 });
await nodus.view.locateGraph();Build from source
The library lives in src/. Produce a single-file bundle with:
npm run build # → nodus.src.bundle.jsFor local development, run the Vite dev server and open the example pages:
npx vite --host 127.0.0.1 --port 5199