pfx-scene

One TOML format for 3D scenes, prefabs and material libraries, shared by a game engine and a 3D editor, so a scene saved in one opens in the other. It is the content format of pfx, the PITO MD game and render engine, and of its editor; the pfx-scene crate reads, checks, resolves, edits and migrates it.
- Fast: resolves a 1,000-object scene in 25 ms and checks its whole project in 28 ms; a 100-object scene takes 3 ms for either.
- Small: three dependencies (
serde,toml,toml_edit; 17 crates in the whole tree), no unsafe code, about 10,900 lines of Rust. - Exact: every mistake is reported at its file, line and column with a stable code, and every edit keeps the author’s comments, spacing and key order.
Works on Linux, Windows and macOS (CI-tested on all three).
It is for the tools on either side of a scene file: an engine’s loader, an editor that saves what a person arranges, a build tool that emits scenes, and a text editor that marks mistakes as someone types. pfx and Manfred keep their scenes in this format.
Where to go next
Section titled “Where to go next”- Install the crate and run the demo.
- Lay out a project: files, paths, ids and references.
- Check a project and mark mistakes in an unsaved buffer.
- Resolve a scene with its includes and prefabs.
- Edit a scene in place, keeping comments and order, with undo and redo.
- Fill missing ids and migrate an older file.
- Measure the speed on your own machine.
- The format: every key, its type, default and range.
- The API reference, generated by
cargo doc. - What changed in each version.
The code is MIT licensed. The PITO MD name and every app and game name and logo stay Catalin Ilinca’s, all rights reserved.