scenix
Italian: scenix - scene, the stage on which everything appears.
scenix v0.4.0 is the Materials & Lights release of a renderer-agnostic 3D scene library for Rust.
This release ships the GPU-free foundation, scene graph, CPU-side geometry, materials, and lights:
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-mesh: geometry buffers, primitive generation, morph targets, instancing, and batching helpers.scenix-material: GPU-free material traits, pipeline keys, PBR, physical, toon, line, point, and custom shader materials.scenix-light: GPU-free light types, shadow configuration, and raw-sample spherical-harmonics light probes.scenix: facade crate re-exporting the default APIs.
Cameras, textures, renderer, loaders, WASM integration, and animato integration are planned in later roadmap milestones.
Installation
Most users should start with the facade crate:
[]
= "0.4"
Use the focused crates directly when you only need one layer:
[]
= "0.4"
= "0.4"
= "0.4"
= "0.4"
= "0.4"
= "0.4"
= "0.4"
For no_std-capable crates with portable math trigonometry:
[]
= { = "0.4", = false, = ["libm"] }
= { = "0.4", = false }
= { = "0.4", = false }
= { = "0.4", = false }
= { = "0.4", = false }
= { = "0.4", = false }
= { = "0.4", = false }
Quick Start
Materials And Lights
use ;
let material = new
.albedo
.metallic_roughness;
let sun = new
.shadow;
assert!;
assert!;
Light Probes
use ;
let px = ;
let nx = ;
let py = ;
let ny = ;
let pz = ;
let nz = ;
let probe = from_cube_faces.unwrap;
assert!;
Geometry And Meshes
use ;
let geometry = sphere_geometry;
let material = new;
let mesh = new;
let node = mesh;
assert!;
assert!;
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. |
mesh |
yes | Enables the scenix-mesh geometry and primitive API from the facade crate. |
material |
yes | Enables GPU-free material types and pipeline keys from the facade crate. |
light |
yes | Enables GPU-free light types, shadow config, and light probes 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-mesh/
│ ├── scenix-material/
│ ├── scenix-light/
│ └── 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.4.0 adds GPU-free material and light descriptions on top of the Foundation, Scene Graph, and Geometry APIs. Upcoming milestones add 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.