Skip to content

scenix v0.9.0

Choose a tag to compare

@github-actions github-actions released this 27 May 02:40
· 6 commits to main since this release

scenix v0.9.0

Install

[dependencies]
scenix = { version = "0.9.0", features = ["loader", "renderer", "post", "animato", "wasm"] }

Highlights

  • New optional scenix-animato crate bridges Animato 1.4.0 tweens and springs into scenix scene nodes, cameras, PBR materials, and skeleton pose arrays.
  • New optional scenix-wasm crate wraps the renderer for browser canvases, forwards DOM input into scenix input state, and includes a generated cube scene path.
  • The facade keeps v0.8 CPU authoring defaults unchanged; enable integration explicitly with features = ["animato"] or features = ["wasm"].
  • WASM checks now compile the browser wrapper and standalone generated-scene example for wasm32-unknown-unknown.
  • Loader, renderer, post, raycaster, and helper APIs remain compatible with v0.8 behavior.

Crates published to crates.io

Crate Version Description
scenix-math 0.9.0 Custom no_std 3D math primitives
scenix-core 0.9.0 Shared IDs, colors, errors, and traits
scenix-input 0.9.0 Platform-agnostic input state types
scenix-scene 0.9.0 GPU-free scene graph and traversal APIs
scenix-camera 0.9.0 GPU-free cameras, frustums, and controllers
scenix-mesh 0.9.0 CPU-side geometry, primitive generation, instancing, and batching
scenix-material 0.9.0 GPU-free material descriptions and pipeline keys
scenix-light 0.9.0 GPU-free lights, shadow configuration, and light probes
scenix-texture 0.9.0 CPU-side texture data, samplers, atlases, and mipmaps
scenix-loader 0.9.0 CPU-side glTF, OBJ, STL, image, KTX2, HDR, and cache loaders
scenix-post 0.9.0 Optional wgpu post-processing stack and full-screen effects
scenix-renderer 0.9.0 Optional wgpu renderer, resource registries, targets, passes, and pipeline cache
scenix-raycaster 0.9.0 BVH scene picking and exact CPU mesh intersections
scenix-helpers 0.9.0 Debug line helpers for grids, axes, bounds, cameras, lights, and skeletons
scenix-animato 0.9.0 Optional Animato 1.4 bridge for nodes, cameras, materials, and skeleton poses
scenix-wasm 0.9.0 Optional browser canvas renderer wrapper and DOM input mapping helpers
scenix 0.9.0 Facade crate with default CPU authoring, raycaster/helper APIs, and optional loader/GPU/integration APIs

Animation + WASM example

use std::collections::BTreeMap;
use scenix::{
    CameraId, CameraStores, MaterialId, NodeAnimationTarget, NodeAnimator,
    PerspectiveCamera, PbrMaterial, ScalarTrack, SceneGraph, SceneNode,
    ScenixAnimationDriver, Vec3, Vec3Track,
};

# fn run() -> Result<(), scenix::ValidationError> {
let mut scene = SceneGraph::new();
let node = scene.add(SceneNode::new("animated"));

let camera_id = CameraId::new(1);
let mut perspective = BTreeMap::from([(
    camera_id,
    PerspectiveCamera::new(60.0, 1.0, 0.1, 100.0),
)]);
let mut orthographic = BTreeMap::new();
let material_id = MaterialId::new(1);
let mut materials = BTreeMap::from([(material_id, PbrMaterial::new())]);
let mut skeletons = Vec::new();

let mut driver = ScenixAnimationDriver::new();
driver.add_node(NodeAnimator::new(
    node,
    NodeAnimationTarget::Translation(Vec3Track::tween(
        Vec3::ZERO,
        Vec3::new(1.0, 0.0, 0.0),
        0.25,
    )),
));

let mut cameras = CameraStores {
    perspective: &mut perspective,
    orthographic: &mut orthographic,
};
driver.tick(0.25, &mut scene, &mut cameras, &mut materials, &mut skeletons)?;

# Ok(())
# }

// Browser:
// let renderer = scenix::WebRenderer::new(canvas).await?;
// renderer.tick(timestamp_ms)?;

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
  • cargo test -p scenix-animato --all-features
  • cargo check -p scenix-wasm --target wasm32-unknown-unknown --all-features
  • cargo check --manifest-path examples/wasm_viewer/Cargo.toml --target wasm32-unknown-unknown
  • 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