Framework-agnostic graph visualization for HyperMemory hypergraphs. Provides two viewer classes:
- CosmographViewer — GPU-accelerated 2D with hyperedge hull rendering
- ForceGraph3DViewer — Three.js 3D with camera fly-to
# For 2D visualization
pnpm add @runstack-ai/hypermemory-visualizer-core @cosmograph/cosmograph
# For 3D visualization
pnpm add @runstack-ai/hypermemory-visualizer-core 3d-force-graph three
pnpm add -D @types/three # Required for TypeScript usersimport { CosmographViewer } from "@runstack-ai/hypermemory-visualizer-core";
const viewer = new CosmographViewer(document.getElementById("graph")!, {
onNodeClick: (node) => console.log(node),
});
await viewer.setData(nodes, links, hyperedges);CosmographViewer— 2D GPU-accelerated viewer with hyperedge hull renderingForceGraph3DViewer— 3D Three.js viewer with camera fly-toconvexHull,paddedHullPath— geometry utilities for hull computationgetNodeColor,NODE_COLORS— 20-color palette for node typesDEFAULT_SIMULATION,DEFAULT_3D_CONFIG— default simulation parameters- Types:
CosmographViewerOptions,CosmographSimulationConfig,ForceGraph3DOptions,GraphNode,GraphLink,HyperedgeHull,BaseViewerOptions
See the monorepo README.
MIT