scenix
Italian: scenix - scene, the stage on which everything appears.
scenix v0.3.0 is the Geometry release of a renderer-agnostic 3D scene library for Rust.
This release ships the GPU-free foundation, scene graph, and CPU-side geometry layer:
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: facade crate re-exporting the default APIs.
Materials, lights, 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.3"
Use the focused crates directly when you only need one layer:
[]
= "0.3"
= "0.3"
= "0.3"
= "0.3"
= "0.3"
For no_std math with portable trigonometry:
[]
= { = "0.3", = false, = ["libm"] }
= { = "0.3", = false }
= { = "0.3", = false }
= { = "0.3", = false }
= { = "0.3", = false }
Quick Start
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. |
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/
├── 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.3.0 adds mesh geometry and primitive generation on top of the Foundation and Scene Graph APIs. Upcoming milestones add 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.