scenix
Italian: scenix - scene, the stage on which everything appears.
scenix v0.2.0 is the Scene Graph release of a renderer-agnostic 3D scene library for Rust.
This release ships the GPU-free foundation plus a working scene graph:
scenix-math: vectors, matrices, quaternions, transforms, rays, bounds, planes, and coordinate helpers.scenix-core: typed IDs, color, errors, and shared traits.scenix-input: pointer and keyboard state.scenix-scene: scene node hierarchy, transform propagation, traversal, fog, sprites, and LOD helpers.scenix: facade crate re-exporting the default APIs.
Meshes, materials, renderer, loaders, WASM integration, and animato integration are planned in later roadmap milestones.
Installation
Most users should start with the facade crate:
[]
= "0.2"
Use the focused crates directly when you only need one layer:
[]
= "0.2"
= "0.2"
= "0.2"
= "0.2"
For no_std math with portable trigonometry:
[]
= { = "0.2", = false, = ["libm"] }
= { = "0.2", = false }
= { = "0.2", = false }
= { = "0.2", = false }
Quick Start
Scene Graph
use ;
let mut scene = new;
let root = scene.add;
let child = scene
.add_child
.unwrap;
scene.update_world_transforms;
assert_eq!;
assert_eq!;
Vector And Quaternion Math
use ;
let right = X;
let up = Y;
let forward = right.cross;
let rotation = from_axis_angle;
let rotated = rotation.mul_vec3;
assert_eq!;
assert!;
Matrices And Transforms
use ;
let transform = from_translation
.rotate_by
.scale_by;
let matrix = transform.to_mat4;
let projection = perspective;
assert_eq!;
assert_eq!;
Ray Intersections
use ;
let ray = new;
let bounds = new;
let hit_t = ray.intersect_aabb.unwrap;
assert_eq!;
Color And IDs
use ;
let node = new;
let material = new;
let color = from_hex.to_linear;
assert_eq!;
assert_eq!;
assert_eq!;
Input State
use ;
let mut keyboard = new;
keyboard.on_key_down;
assert!;
let mut pointer = new;
pointer.set_position;
pointer.on_button_down;
assert!;
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
yes | Enables standard-library conveniences such as std::error::Error and Named. |
scene |
yes | Enables the scenix-scene graph API from the facade crate. |
libm |
no | Uses libm for portable no_std trigonometry in scenix-math. |
serde |
no | Derives Serialize and Deserialize for public data types. |
approx |
no | Implements approx traits for math types. |
gpu |
no | Enables the GpuUpload trait in scenix-core. |
Workspace Layout
scenix/
├── crates/
│ ├── scenix-math/
│ ├── scenix-core/
│ ├── scenix-input/
│ ├── scenix-scene/
│ └── scenix/
├── ARCHITECTURE.md
├── ROADMAP.md
├── CHANGELOG.md
└── README.md
Running Checks
RUSTDOCFLAGS="-D warnings"
Roadmap
The long-term design remains the full scenix workspace described in ARCHITECTURE.md. Version 0.2.0 adds the scene graph on top of the Foundation APIs. Upcoming milestones add mesh primitives, materials, lights, cameras, textures, renderer, loaders, raycasting, helpers, animato, and WASM integration.
See ROADMAP.md for the full versioned plan.
License
Licensed under either of:
at your option.