nightshade-editor-0.10.0 is not a library.
Nightshade Editor
An interactive editor and scene inspector for the Nightshade game engine.
Installation
From crates.io
From source
Usage
Run the editor:
Or use the justfile:
Features
Scene Management
- Scene tree - Hierarchical view of entities with parent-child relationships
- Component inspector - View and edit entity components
- Entity selection - Click entities to inspect their properties
Rendering
- 3D viewport - WGPU-based renderer with WebGPU support
- Fly camera controls - WASD movement with mouse look
- Grid and skybox - Scene navigation helpers
- Alpha blending - Support for opaque, mask, and blend (OIT) transparency modes
- Material editing - Edit base color, alpha mode, and alpha cutoff in real-time
- SDF text rendering - Signed distance field text with outline support
- HUD overlays - Screen-space UI elements
Tools
- Mesh spawning - Create cubes, spheres, planes, and cylinders
- Line rendering - GPU-accelerated line primitives with frustum culling
- 3D text - Spawn text objects with customizable properties
- Stress testing - Tools for performance profiling (5K text lattice, 10K meshes, 20K lines)
Post-Processing
- Render graph system - Modular pass-based rendering pipeline
- Grayscale effect - Example compute shader post-process
Performance
- FPS counter - Frame rate display
- Entity count - Total entities in scene
- Line count - Line primitive usage
Controls
| Input | Action |
|---|---|
| Middle mouse | Orbit camera |
| Shift + Middle mouse | Pan camera |
| Scroll wheel | Zoom |
| Numpad 0 | Toggle fly camera mode (WASD + right-click look) |
| Numpad 1/3/7 | Front / Right / Top view |
| Numpad 5 | Toggle orthographic / perspective |
| G / R / S | Grab / Rotate / Scale selected entity |
| X | Delete selected entity |
| Tab | Toggle local / world coordinate space |
| Q | Exit editor |
Architecture
The editor is built on top of the Nightshade engine and demonstrates:
- ECS pattern using freecs
- Data-oriented design with component-based architecture
- WGPU rendering with custom render graph
- egui integration for immediate-mode UI
- Cross-platform support (native and WASM)
Development
Building for WASM
Running tests
Linting
License
Licensed under the MIT License.