scenix v0.8.0
Install
[dependencies]
scenix = { version = "0.8.0", features = ["loader", "renderer", "post"] }
Highlights
- New default
scenix-raycaster crate for CPU-side scene picking with node-level SAH BVH traversal and exact mesh triangle intersections.
- New default
scenix-helpers crate for validated LineGeometry debug helpers: grids, axes, bounds, arrows, lights, cameras, and skeletons.
Raycaster::from_camera_ndc bridges camera screen rays into picking workflows without requiring renderer or GPU readback.
GeometryProvider lets applications keep mesh storage in their own maps or slices while still using BVH acceleration.
- Loaders, renderer, and post-processing remain optional; WASM wrappers and
animato integration remain deferred to later milestones.
Crates published to crates.io
| Crate |
Version |
Description |
scenix-math |
0.8.0 |
Custom no_std 3D math primitives |
scenix-core |
0.8.0 |
Shared IDs, colors, errors, and traits |
scenix-input |
0.8.0 |
Platform-agnostic input state types |
scenix-scene |
0.8.0 |
GPU-free scene graph and traversal APIs |
scenix-camera |
0.8.0 |
GPU-free cameras, frustums, and controllers |
scenix-mesh |
0.8.0 |
CPU-side geometry, primitive generation, instancing, and batching |
scenix-material |
0.8.0 |
GPU-free material descriptions and pipeline keys |
scenix-light |
0.8.0 |
GPU-free lights, shadow configuration, and light probes |
scenix-texture |
0.8.0 |
CPU-side texture data, samplers, atlases, and mipmaps |
scenix-loader |
0.8.0 |
CPU-side glTF, OBJ, STL, image, KTX2, HDR, and cache loaders |
scenix-post |
0.8.0 |
Optional wgpu post-processing stack and full-screen effects |
scenix-renderer |
0.8.0 |
Optional wgpu renderer, resource registries, targets, passes, and pipeline cache |
scenix-raycaster |
0.8.0 |
BVH scene picking and exact CPU mesh intersections |
scenix-helpers |
0.8.0 |
Debug line helpers for grids, axes, bounds, cameras, lights, and skeletons |
scenix |
0.8.0 |
Facade crate with default CPU authoring, raycaster, helper APIs, and optional loader/GPU APIs |
Raycasting + helpers example
use std::collections::BTreeMap;
use scenix::{
AxesHelper, Geometry, GridHelper, LineGeometry, MaterialId, MeshId,
PerspectiveCamera, Raycaster, SceneGraph, SceneNode, Vec2, Vec3,
box_geometry,
};
# fn run() -> Result<(), scenix::ValidationError> {
let mesh_id = MeshId::new(1);
let material_id = MaterialId::new(1);
let mut meshes = BTreeMap::<MeshId, Geometry>::new();
meshes.insert(mesh_id, box_geometry(1.0, 1.0, 1.0, 1, 1, 1));
let mut scene = SceneGraph::new();
scene.add(SceneNode::mesh("cube", mesh_id, material_id));
scene.update_world_transforms();
let camera = PerspectiveCamera::new(60.0, 1.0, 0.1, 100.0)
.position(Vec3::new(0.0, 0.0, 4.0))
.target(Vec3::ZERO);
let ray = Raycaster::from_camera_ndc(&camera, Vec2::ZERO);
let mut raycaster = Raycaster::new();
raycaster.build_bvh(&scene, &meshes)?;
let hit = raycaster.cast_ray(ray, &scene, &meshes);
let mut helper_lines = LineGeometry::new();
helper_lines.merge(&GridHelper::new(10.0, 10).to_geometry());
helper_lines.merge(&AxesHelper::new(2.0).to_geometry());
helper_lines.validate()?;
assert!(hit.is_some());
# Ok(())
# }
Verification
cargo test --workspace --all-features
cargo test -p scenix-math -p scenix-core -p scenix-input -p scenix-scene -p scenix-camera -p scenix-mesh -p scenix-material -p scenix-light -p scenix-texture -p scenix-raycaster -p scenix-helpers --no-default-features
cargo test -p scenix-loader --all-features
cargo test -p scenix-raycaster -p scenix-helpers --all-features
SCENIX_RUN_GPU_TESTS=1 WGPU_BACKEND=vulkan cargo test -p scenix-renderer -p scenix-post --all-features
cargo clippy --workspace --all-features -- -D warnings
cargo fmt --check
cargo doc --workspace --all-features --no-deps
cargo publish --dry-run for every crate before publish