dotspace
Explore your Graphviz dot files in interactive 3D space. Transform static graph diagrams into navigable 3D experiences.
Features
- 3D Visualization: Renders Graphviz dot files as interactive 3D scenes
- Node Types: Different shapes and colors for various node types (organization, team, user, etc.)
- Hierarchical Layout: Automatic vertical and radial positioning based on node levels
- Interactive Navigation:
- Arrow keys for movement
- Shift+Arrow keys for camera rotation
- +/- keys for zoom (Mac-friendly)
- Smart Label Visibility:
- Labels only show for nearby nodes (configurable distance)
- Hold 'L' to temporarily show all labels
- Labels fade as they approach visibility distance
- Node Search:
- Press '/' to open search mode
- Type to filter and highlight matching nodes
- Press ESC to close search
- Highlights slowly fade out over 20 seconds
- Unix Philosophy: Supports both file input and stdin piping
- Clear Text Labels: Node labels rendered as overlay text for clarity
Installation
Prerequisites
- Rust 1.75 or higher (2024 edition)
- System dependencies for Bevy (automatically handled on most platforms)
Building from crates.io
cargo install dotspace
Building from Source
The binary will be available at target/release/dotspace.
Usage
Basic Usage
# Visualize a dot file
# Pipe from another command
|
# Generate and visualize on the fly
|
Command Line Options
Controls
| Key | Action |
|---|---|
| Arrow Keys | Move camera forward/backward/left/right |
| Shift + Arrow Keys | Rotate camera around center |
| + / - | Zoom in/out |
| PageUp / PageDown | Alternative zoom controls |
| L (hold) | Show all labels temporarily |
| / | Open search (type to filter nodes) |
| ESC | Close search mode |
| Q | Exit application |
Dot File Features
dotspace supports standard Graphviz dot syntax with additional attributes for 3D visualization:
Node Types
Specify node types for different shapes and colors:
digraph Organization
Available node types:
organization- Red cube (large)lob(Line of Business) - Orange cylindersite- Blue torusteam- Green sphereuser- Purple capsule (small)- (default) - Gray sphere
Hierarchical Levels
Use the level attribute to control vertical positioning:
digraph Hierarchy
Examples
The repository includes several example dot files in the examples/ directory:
# Organizational hierarchy
# Network topology
# Software architecture
# Simple directed graph
|
Development
Running Tests
Linting
# Run clippy with CI settings
# Auto-fix clippy warnings
# Format code
Development Workflow
# Full check (format, lint, test, build)
# Run with example file
# Run with stdin example
Architecture
dotspace is built with:
- Bevy 0.16: Modern Rust game engine for 3D rendering
- petgraph: Graph data structure management
- clap: Command-line argument parsing
The visualization uses:
- Custom dot file parser (handles documented Graphviz DSL)
- Hierarchical layout algorithm with radial distribution
- Bevy's entity-component system for interactive 3D scenes
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.