gldf-rs-egui

Crates.iogldf-rs-egui
lib.rsgldf-rs-egui
version0.3.3
created_at2025-12-08 12:50:46.394467+00
updated_at2025-12-16 15:23:12.968457+00
descriptionCross-platform GLDF viewer using egui - works on Windows, macOS, Linux
homepage
repositoryhttps://github.com/holg/gldf-rs
max_upload_size
id1973466
size246,132
Holger Trahe (holg)

documentation

README

GLDF Viewer (egui)

Cross-platform GLDF (Global Lighting Data Format) viewer built with egui.

Features

  • Cross-platform: Works on Windows, macOS, Linux, and WebAssembly (WASM)
  • Native performance: Built with Rust and egui for fast, responsive UI
  • File support: View GLDF files with embedded photometry, images, and 3D geometry
  • Export: Export to JSON or XML formats
  • Dark/Light mode: Toggle between themes

Running

Native (Desktop)

cargo run -p gldf-rs-egui --release

Or build the release binary:

cargo build -p gldf-rs-egui --release
./target/release/gldf-viewer-egui

Web (WASM)

First, install Trunk:

cargo install trunk

Then build and serve:

cd gldf-rs-egui
trunk serve

Open http://127.0.0.1:8080 in your browser.

For a release build:

trunk build --release

Project Structure

gldf-rs-egui/
├── src/
│   ├── main.rs          # Native entry point
│   ├── lib.rs           # Library exports
│   ├── app.rs           # Application state and logic
│   ├── web.rs           # WASM entry point
│   └── ui/              # UI components
│       ├── mod.rs       # UI module with menu/status bar
│       ├── sidebar.rs   # Navigation sidebar
│       ├── welcome.rs   # Welcome/drop zone view
│       ├── overview.rs  # Overview dashboard
│       ├── header.rs    # Header information view
│       ├── files.rs     # Files list view
│       ├── light_sources.rs  # Light sources view
│       ├── variants.rs  # Variants view
│       ├── statistics.rs    # Statistics view
│       ├── raw_data.rs  # Raw JSON view
│       └── file_viewer.rs   # Embedded file viewer
├── index.html           # WASM HTML template
├── Trunk.toml          # Trunk configuration
└── Cargo.toml          # Dependencies

Usage

  1. Open a file:

    • Drag and drop a .gldf file onto the window
    • Use File > Open... menu (native only)
  2. Navigate:

    • Use the sidebar to switch between views
    • Overview shows a summary dashboard
    • Raw Data shows the JSON representation
  3. Export:

    • File > Export JSON...
    • File > Export XML...

Dependencies

  • egui - Immediate mode GUI
  • eframe - Framework for egui
  • gldf-rs - GLDF parsing library
  • rfd - Native file dialogs

License

GPL-3.0-or-later

Commit count: 72

cargo fmt