Repository navigation
scenix v1.4.0
Scenix v1.4.0 — Animation Runtime
Scenix 1.4.0 ships a full clip-based animation runtime on top of the Animato
value engine, bringing scenix to parity with Three.js's AnimationClip /
AnimationAction / AnimationMixer model while keeping scenix's typed-ID,
deterministic, renderer-agnostic discipline.
What's new
- Clip runtime —
AnimationClip,AnimationAction,AnimationMixerwith
loop modes (Once/Repeat/PingPong), per-action time scale,
pause/resume, named markers, crossfade, additive blending, and deterministic
per-tick sampling. - Keyframe tracks —
KeyframeScalar/Vec3/Quat/Color/Bool
withLinear,Step, andCubicSplineinterpolation (quaternions use
slerp + shortest-arc). - Property bindings — typed
PropertyBindingtargets for nodes, bones,
materials, cameras, lights, and morph weights (no stringly paths), plus a
stableBindingKeyfor accumulator lookups. - Events —
AnimationEvent::Loop/Marker/Finishedreturned each
tick for deterministic, callback-free consumption. - Light & morph targets — animate light color / intensity / range /
spot-angle and morph-target weights through the mixer or the procedural
ScenixAnimationDriver. - Skeletal animation —
scenix-meshSkinningData+cpu_skinCPU
fallback, andscenix-rendererregister_skin/update_bone_matrices/
register_morph_targets/update_morph_weightsGPU hooks plus the
SKINNING_WGSLsnippet. - Retargeting —
RetargetMapcopies poses between skeletons by bone name. - Debug helpers —
AnimationPathHelper+PoseHelperline geometry. - Loader — animation accessor output bytes are now decoded into
LoadedAnimationChannel::output; the facadeclip_from_loadedbridges
imported clips to the runtime.
Dependency updates
- Animato
1.5.0→1.7.0(the previous1.6.0release gate is
resolved; scenix uses the stablestd/tween/spring/serde
feature set). - All scenix workspace crates
1.3.0→1.4.0.
Quick example
use scenix::{
AnimationClip, AnimationMixer, ClipChannel, ClipTrack, KeyframeInterpolation,
KeyframeVec3, LoopMode, NodeProperty, PropertyBinding, SceneGraph, SceneNode, Vec3,
};
let mut scene = SceneGraph::new();
let node = scene.add(SceneNode::new("mover"));
let clip = AnimationClip::empty("move").with_channel(ClipChannel {
binding: PropertyBinding::Node { node_id: node, property: NodeProperty::Translation },
track: ClipTrack::Vec3(KeyframeVec3::new(
vec![0.0, 1.0],
vec![Vec3::ZERO, Vec3::new(5.0, 0.0, 0.0)],
KeyframeInterpolation::Linear,
)),
});
let mut mixer = AnimationMixer::new();
let clip_index = mixer.add_clip(clip);
let action = mixer.add_action(clip_index);
mixer.action_mut(action).unwrap().set_loop_mode(LoopMode::REPEAT);
mixer.action_mut(action).unwrap().play(0.0);
// each frame:
// mixer.tick(dt, &mut scene, &mut cameras, &mut materials,
// &mut lights, &mut skeletons, &mut morphs)Performance
The mixer samples clips in O(channels × actions) per tick with BTreeMap-
keyed accumulators for stable blend order. A 1000-channel clip mixes in well
under a millisecond on commodity hardware (see
benches/animation_mixer_bench.rs). The CPU skinning fallback
(scenix_mesh::skin::cpu_skin) lets headless/no-GPU tests validate poses
without a wgpu device.
Migration notes
ScenixAnimationDriver::ticknow takeslightsandmorphsstores in
addition toskeletons. Pass empty stores if unused.LoadedAnimationChannelgained anoutput: Vec<f32>field; update struct
literals accordingly.- Animato
1.5.0→1.7.0is a drop-in for thestd/tween/spring/
serdefeature set; no scenix-side code changes required.
Known limitations
- Cubic-spline interpolation is fully implemented for scalar tracks; vec3 /
quat / color cubic channels fall back to linear sampling in v1.4. - Additive blending accumulates weighted deltas into the same normal
accumulator for v1.4; full base-clip-relative additive is planned. - GPU skinning ships the registry, upload hooks, and
SKINNING_WGSLsnippet;
full shader-pipeline wiring behind aSKINNINGdefine is additive in a
follow-up patch.
Links
- Website and demo: https://aarambhdevhub.github.io/scenix/
- Documentation: https://docs.rs/scenix
- Crates: https://crates.io/crates/scenix
- Changelog:
CHANGELOG.md
What's Changed
- release: Scenix v1.4.0 — Animation Runtime by @aarambh-darshan in #15
Full Changelog: v1.3.0...v1.4.0