Expand description
Rigid-part animation for WaterDropEngine.
A model is animated by moving rigid parts: each part hangs under an AnimationBone entity,
whose transform is driven by an AnimationClip (one keyframe track per bone name). An
AnimationPlayer on the root of the hierarchy plays and crossfades clips onto every bone
below it.
§Example
glTF models with %B%<bone> nodes spawn their bones automatically, and expose their clips:
fn walk(mut players: Query<&mut AnimationPlayer>, gltf: Res<Assets<GltfAsset>>, model: Res<Model>) {
let walk = gltf.get(&model.0).unwrap().animation("Walk").unwrap();
for mut player in &mut players {
player.crossfade(walk.clone(), 0.2).set_speed(1.5);
}
}Structs§
- Animation
Bone - Rigid part of an animated model, posed by the
AnimationPlayerof its closest ancestor. - Animation
Clip - Keyframed animation of a set of bones, identified by name.
- Animation
Player - Plays clips (looping, or once) on the
AnimationBones below its entity, blending smoothly from one clip to the next. - Animation
Plugin - Animation
Systems - Systems advancing the players and posing the bones, in [
Update]. - Bone
Track - Animation of one bone. Missing channels keep the bone’s rest value.
- Keyframes
- Values over time, sorted by time.
Enums§
- Interpolation
- How values are interpolated between two keyframes.