3 releases (1 stable)
| 1.0.0 | Feb 6, 2026 |
|---|---|
| 0.2.0 | Feb 4, 2026 |
| 0.1.0 | Feb 3, 2026 |
#2774 in Data structures
360KB
7K
SLoC
phago-viz
Browser-based real-time visualization for Phago colonies.
Overview
Generates self-contained HTML visualizations with:
- Force-directed knowledge graph — D3.js powered interactive graph
- Agent spatial canvas — Shows agent positions and movements
- Event timeline — Scrollable history of colony events
- Metrics dashboard — Real-time stats with tick slider
Usage
use phago_viz::HtmlViz;
use phago_runtime::colony::Colony;
let colony = Colony::new();
// ... run simulation ...
// Generate visualization
let html = HtmlViz::generate(&colony);
// Save to file
std::fs::write("colony.html", html).unwrap();
Then open colony.html in a browser.
Features
- Self-contained single HTML file (no external dependencies)
- Interactive zoom/pan on graph
- Click nodes to see details
- Playback through simulation ticks
- Export graph as PNG
Part of Phago
This is a subcrate of phago. For most use cases, depend on the main phago crate instead.
License
MIT
Dependencies
~3–4MB
~70K SLoC