scenix
Modular Rust-native 3D scenes for native and WASM apps.
scenix 1.1.0 is the current stable release. The public API is frozen around small focused crates: CPU authoring stays lightweight by default, while loading, GPU rendering, post-processing, Animato integration, and browser support remain opt-in.
Install
Most applications start with the facade crate:
[]
= "1"
Enable optional systems only when needed:
[]
= { = "1", = ["loader"] }
= { = "1", = ["renderer", "post"] }
= { = "1", = ["animato"] }
= { = "1", = ["wasm"] }
Focused crates can be used directly:
[]
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
= "1"
For no_std CPU authoring:
[]
= { = "1", = false, = ["libm"] }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
= { = "1", = false }
scenix-loader, scenix-renderer, scenix-post, scenix-animato, and scenix-wasm are optional std paths. The Animato bridge uses animato = "1.4.0".
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
yes | Standard-library support for CPU crates. |
scene, camera, mesh, material, light, texture |
yes | CPU authoring crates. |
raycaster, helpers |
yes | BVH picking and debug line helper data. |
loader |
no | glTF/GLB, OBJ/MTL, STL, image, KTX2, HDR/EXR loading. |
renderer |
no | wgpu renderer with surface/headless targets. |
post |
no | Full-screen post-processing stack; use with renderer. |
animato |
no | Animato 1.4.0 tracks and scene/camera/material drivers. |
wasm |
no | Browser canvas wrapper with WebGPU first, WebGL fallback, and generated demo scene. |
serde |
no | Serialization support where the focused crate supports it. |
Quick Start
use BTreeMap;
use ;
#
Headless Rendering
use ;
# async
Loading Assets
use GltfLoader;
#
Raycasting
use BTreeMap;
use ;
let mesh_id = new;
let material_id = new;
let meshes = from;
let mut scene = new;
scene.add;
scene.update_world_transforms;
let camera = new
.position
.target;
let ray = from_camera_ndc;
let mut raycaster = new;
raycaster.build_bvh.unwrap;
assert!;
Workspace
| Crate | Role |
|---|---|
scenix |
Facade crate with stable v1 feature flags. |
scenix-math |
no_std vectors, matrices, quaternions, transforms, rays, and bounds. |
scenix-core |
IDs, colors, errors, and shared traits. |
scenix-input |
Platform-neutral pointer and keyboard state. |
scenix-scene |
Scene graph, transforms, traversal, fog, sprites, and LOD helpers. |
scenix-camera |
Perspective, orthographic, cube cameras, frustums, and controllers. |
scenix-mesh |
Geometry buffers, primitives, instancing, batching, and morph targets. |
scenix-material |
GPU-free material descriptions and pipeline keys. |
scenix-light |
Lights, shadow settings, and light probes. |
scenix-texture |
CPU textures, samplers, atlases, video updates, and mipmaps. |
scenix-loader |
Optional CPU asset loaders and asset cache. |
scenix-renderer |
Optional wgpu renderer and resource registries. |
scenix-post |
Optional wgpu post-processing effects. |
scenix-raycaster |
BVH scene picking and exact mesh intersections. |
scenix-helpers |
Debug LineGeometry generators. |
scenix-animato |
Optional Animato 1.4.0 bridge. |
scenix-wasm |
Optional browser canvas wrapper with WebGPU and WebGL paths. |
Examples
The facade crate registers the example set from ARCHITECTURE.md:
The browser example lives in examples/wasm_viewer:
Website
The static website is a standalone Leptos CSR app in website/. It is intentionally outside the main workspace so website dependencies do not affect normal library users.
GitHub Pages deployment is handled by .github/workflows/pages.yml, which builds website/dist with Trunk and deploys it at /scenix/. The demo uses scenix-wasm: it tries WebGPU where safe, falls back to WebGL in browsers without usable WebGPU, and only uses the Canvas2D preview when both GPU paths are unavailable.
Development Checks
SCENIX_RUN_GPU_TESTS=1 WGPU_BACKEND=vulkan
RUSTDOCFLAGS="-D warnings"
Documentation
- Developer docs
- Architecture
- Roadmap
- Changelog
- Getting started
- Installation
- Quick start
- Concepts
- Guides
- API reference
- Examples
- Recipes
- Performance
- Deployment
- Migration
- Reference
- v1.1.0 release notes
Known Limitations
- The renderer is stable for generated scenes, headless/surface rendering, material preview paths, and examples. Advanced physical shading is intentionally documented as a preview contract rather than a film-grade renderer.
- Loader APIs produce CPU-side scenix data; GPU upload stays explicit through
Rendererregistration. - The website demo does not vendor large model assets.
- GPU tests require a Vulkan-capable device or Mesa lavapipe.
License
Licensed under either of:
- Apache License, Version 2.0
- MIT license