scenix
Italian: scenix - scene, the stage on which everything appears.
scenix v0.5.0 is the Textures & Camera release of a renderer-agnostic 3D scene library for Rust.
This release ships the GPU-free foundation, scene graph, CPU-side geometry, materials, lights, textures, and cameras:
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-camera: perspective, orthographic, and cube cameras, frustums, screen rays, orbit controls, and fly controls.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-texture: raw CPU texture data, samplers, atlases, video-frame updates, and RGBA8 mipmap generation.scenix: facade crate re-exporting the default APIs.
Renderer, file loaders, post-processing, raycasting, helpers, WASM integration, and animato integration are planned in later roadmap milestones.
Installation
Most users should start with the facade crate:
[]
= "0.5"
Use focused crates directly when you only need one layer:
[]
= "0.5"
= "0.5"
= "0.5"
= "0.5"
= "0.5"
= "0.5"
= "0.5"
= "0.5"
= "0.5"
For no_std-capable crates with portable math trigonometry:
[]
= { = "0.5", = false, = ["libm"] }
= { = "0.5", = false }
= { = "0.5", = false }
= { = "0.5", = false }
= { = "0.5", = false }
= { = "0.5", = false }
= { = "0.5", = false }
= { = "0.5", = false }
= { = "0.5", = false }
Quick Start
Textures And Camera
use ;
let pixels = vec!;
let mip_chain = generate.unwrap;
let texture = from_mips.unwrap;
let camera = new
.position
.target;
let ray = camera.screen_to_ray;
assert_eq!;
assert!;
Orbit Camera
use ;
let mut camera = new;
let mut orbit = new;
orbit.on_drag;
orbit.on_scroll;
orbit.apply_to_perspective;
assert!;
Atlas And Sampler
use ;
let mut atlas = with_padding;
atlas.insert.unwrap;
let uv = atlas.uv.unwrap;
let sampler = new
.address_modes
.anisotropy;
assert!;
assert_eq!;
Materials And Lights
use ;
let material = new
.albedo
.metallic_roughness;
let sun = new
.shadow;
assert!;
assert!;
Geometry And Scene Graph
use ;
let geometry = box_geometry;
let material_id = new;
let mesh = new;
let mut scene = new;
let node = scene.add;
assert!;
assert!;
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
yes | Enables standard-library conveniences. |
scene |
yes | Enables the scenix-scene graph API from the facade crate. |
camera |
yes | Enables cameras, frustums, and controllers from the facade crate. |
mesh |
yes | Enables geometry and primitive APIs 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. |
texture |
yes | Enables raw texture, sampler, atlas, video, and mipmap APIs 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-camera/
│ ├── scenix-mesh/
│ ├── scenix-material/
│ ├── scenix-light/
│ ├── scenix-texture/
│ └── scenix/
├── examples/
│ ├── textures_and_camera.rs
│ └── orbit_camera.rs
├── 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.5.0 adds GPU-free texture and camera systems on top of the Foundation, Scene Graph, Geometry, Materials, and Lights APIs. Upcoming milestones add renderer, loaders, post-processing, raycasting, helpers, animato, and WASM integration.
See ROADMAP.md for the full versioned plan.
License
Licensed under either of:
at your option.