nightshade-editor

Crates.ionightshade-editor
lib.rsnightshade-editor
version0.6.67
created_at2025-11-08 06:35:56.878164+00
updated_at2026-01-22 04:06:52.786139+00
descriptionAn interactive editor for the Nightshade game engine
homepagehttps://github.com/matthewjberger/nightshade
repositoryhttps://github.com/matthewjberger/nightshade
max_upload_size
id1922566
size7,463,292
Matthew J. Berger (matthewjberger)

documentation

README

Nightshade Editor

An interactive editor and scene inspector for the Nightshade game engine.

image

Installation

From crates.io

cargo install nightshade-editor

From source

git clone https://github.com/matthewjberger/nightshade.git
cd nightshade
cargo build --release -p nightshade-editor

Usage

Run the editor:

nightshade-editor

Or use the justfile:

just run

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
WASD Move camera (forward/left/backward/right)
Space/Shift Move camera up/down
Mouse Look around (click viewport to capture cursor)
Q Exit editor
ESC Release cursor

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

trunk serve --open --config apps/editor/Trunk.toml

Running tests

cargo test --all

Linting

cargo clippy --all --tests -- -D warnings

License

Licensed under the MIT License.

Links

Commit count: 597

cargo fmt