# 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

```bash
npm install --save @kortexya/nodus
```

Or drop the bundle straight into a page:

```html
<script src="path/to/nodus.umd.cjs"></script>
<script>
  const nodus = new Nodus({ container: 'graph-container' });
</script>
```

With ES modules:

```html
<script type="module">
  import { Nodus } from '@kortexya/nodus';
  const nodus = new Nodus({ container: 'graph-container' });
</script>
```

## Usage

```js
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/`](src). Produce a single-file bundle with:

```bash
npm run build        # → nodus.src.bundle.js
```

For local development, run the Vite dev server and open the example pages:

```bash
npx vite --host 127.0.0.1 --port 5199
```
