pub enum AnimationBlend {
Blend1d {
parameter: String,
points: Vec<AnimationBlendPoint>,
sync: bool,
},
Blend2d {
parameter_x: String,
parameter_y: String,
x_values: Vec<f32>,
y_values: Vec<f32>,
rows: Vec<Vec<AssetId>>,
sync: bool,
},
}Expand description
A blendspace: several clips mixed continuously by parameter value instead
of one clip per state. kind selects the shape.
With sync true the members share one normalized phase clock – a walk
and a run cycle stay foot-aligned while the blend moves between them, so
speed changes do not slide the feet. Leave it false for members that are
not cyclic gaits.
Variants§
Blend1d
Clips along one parameter. The parameter picks the two neighbouring
points (by ascending value) and blends them; outside the range
the nearest end clip plays alone.
Fields
§
points: Vec<AnimationBlendPoint>Members in ascending value order.
Blend2d
Clips on a regular grid over two parameters, blended bilinearly between the four grid neighbours of the parameter point (clamped at the grid edges).
Trait Implementations§
Source§impl Clone for AnimationBlend
impl Clone for AnimationBlend
Source§fn clone(&self) -> AnimationBlend
fn clone(&self) -> AnimationBlend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnimationBlend
impl Debug for AnimationBlend
Source§impl<'de> Deserialize<'de> for AnimationBlend
impl<'de> Deserialize<'de> for AnimationBlend
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AnimationBlend
impl RefUnwindSafe for AnimationBlend
impl Send for AnimationBlend
impl Sync for AnimationBlend
impl Unpin for AnimationBlend
impl UnsafeUnpin for AnimationBlend
impl UnwindSafe for AnimationBlend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more