| name | elodin-editor-dev |
| description | Contribute to the Elodin Editor, the 3D viewer and graphing tool. Use when editing files in libs/elodin-editor/ or apps/elodin/, working on the Bevy/Egui UI, modifying viewport rendering, telemetry graphs, video streaming, KDL schematics, or the command palette. |
Elodin Editor Development
The Elodin Editor is a 3D visualization and telemetry graphing tool built with Bevy (ECS game engine) and Egui (immediate-mode UI). It connects to Elodin-DB via Impeller2 for real-time data.
Running
cargo run --bin elodin editor examples/three-body/main.py
cargo watch --watch libs/elodin-editor \
-x 'run --bin elodin editor examples/three-body/main.py'
cargo run --bin elodin editor 127.0.0.1:2240
Environment Variables
| Variable | Default | Purpose |
|---|
ELODIN_ASSETS_DIR | ./assets | Directory for meshes, images, GLB files |
ELODIN_KDL_DIR | . (cwd) | Directory for .kdl schematic files |
Cargo features
Optional features declared in libs/elodin-editor/Cargo.toml (re-exported by apps/elodin/Cargo.toml):
big_space (default): upstream big_space 0.12 floating-origin layer.
inspector: adds the bevy-inspector-egui runtime entity inspector.
debug: enables big_space's debug diagnostics.
tracy: enables Tracy profiling (see .cursor/skills/elodin-tracy/SKILL.md).
Enable with cargo run -p elodin --features "<list>" -- editor ....
Source Layout
The editor is split across two crates:
libs/elodin-editor/ ā Core library
src/
āāā lib.rs # Plugin registration, app setup
āāā run.rs # Main run loop and Bevy app builder
āāā object_3d.rs # 3D object spawning from KDL schematics
āāā vector_arrow.rs # Vector visualization (force/velocity arrows)
āāā offset_parse.rs # EQL viewport formula parsing
āāā icon_rasterizer.rs # Icon rendering
āāā iter.rs # Iterator utilities
āāā ui/ # Egui UI layer
ā āāā mod.rs # Top-level UI orchestration
ā āāā tiles.rs # Tiled panel layout system
ā āāā tiles/sidebar.rs
ā āāā inspector/ # Component inspector panels
ā ā āāā mod.rs
ā ā āāā entity.rs # Entity property inspector
ā ā āāā viewport.rs # Viewport panel
ā ā āāā graph.rs # Graph panel configuration
ā ā āāā dashboard.rs
ā ā āāā monitor.rs
ā ā āāā object3d.rs # 3D object inspector
ā ā āāā ...
ā āāā plot/ # Telemetry graph rendering
ā ā āāā mod.rs
ā ā āāā data.rs # Data fetching and buffering
ā ā āāā gpu.rs # GPU-accelerated plot rendering
ā ā āāā widget.rs # Egui plot widget
ā ā āāā state.rs # Plot state management
ā āāā plot_3d/ # 3D plot visualization
ā āāā schematic/ # KDL schematic loading and rendering
ā ā āāā mod.rs
ā ā āāā load.rs # KDL file parsing
ā ā āāā tree.rs # Schematic tree view
ā āāā timeline/ # Playback timeline
ā ā āāā mod.rs
ā ā āāā timeline_controls.rs
ā ā āāā timeline_slider.rs
ā āāā command_palette/ # Command palette (Ctrl+P)
ā āāā video_stream.rs # Live video rendering
ā āāā theme.rs # Color theme
ā āāā colors/ # Color system and presets
ā āāā ...
āāā plugins/ # Bevy plugins
āāā mod.rs
āāā view_cube/ # 3D orientation cube
āāā camera_anchor/ # Camera tracking and anchoring
āāā gizmos/ # Transform gizmos
āāā navigation_gizmo/
āāā editor_cam_touch/ # Touch input for camera
āāā asset_cache/ # Asset caching
āāā env_asset_source/ # ELODIN_ASSETS_DIR integration
āāā web_asset/ # Web asset loading
āāā logical_key/ # Keyboard input handling
apps/elodin/ ā CLI binary
The main entry point that ties together the editor with nox-py, s10, and Impeller2. Handles CLI argument parsing (elodin editor, elodin run, etc.).
Key Subsystems
Bevy Plugin Architecture
The editor registers as a set of Bevy plugins. Each feature area (view cube, camera, gizmos) is a self-contained plugin with its own components, systems, and resources. New features should follow this pattern.
Egui UI Layer
The ui/ module contains all immediate-mode UI rendering. Egui runs inside Bevy via bevy_egui. The tile-based layout system (ui/tiles.rs) manages panel arrangement (viewports, graphs, inspectors).
Telemetry Data Flow
- Impeller2 client subscribes to component streams from Elodin-DB
- Data arrives as time-series samples
- Plot system buffers and renders via GPU-accelerated rendering (
ui/plot/gpu.rs)
- Inspector panels show latest values
KDL Schematics
KDL files define 3D objects and viewport configurations. The loading pipeline:
ui/schematic/load.rs ā Parses .kdl files
object_3d.rs ā Spawns Bevy entities (meshes, GLB models, shapes)
offset_parse.rs ā Evaluates EQL viewport formulas (rotate, translate)
Video Streaming
ui/video_stream.rs handles live H.264/AV1 video decoding and rendering as textures in the 3D viewport. Uses the video-toolbox crate on macOS for hardware acceleration.
Dependencies
Key crates used in the editor:
| Crate | Purpose |
|---|
bevy | ECS game engine, 3D rendering, windowing |
bevy_egui | Egui integration for Bevy |
egui | Immediate-mode UI framework |
impeller2-bevy | Bevy plugin for Impeller2 telemetry |
arrow | Arrow data format for time-series |
eql | Elodin Query Language parser |
nox | Spatial math types |
Development Tips
- Use
cargo watch for fast iteration on UI changes
- The editor hot-reloads KDL schematics on file change
- Test with
examples/three-body/main.py for a lightweight simulation
- GPU plot rendering is in
ui/plot/gpu.rs ā changes here affect all telemetry graphs
- The command palette (
ui/command_palette/) is the entry point for user actions
Key References