pub enum AnimatedPoint {
Constant {
value: Vec2,
},
Keyframes {
keyframes: Vec<PointKeyframe>,
},
}Expand description
A position that can move along curves between its keyframes.
Its JSON is that of an Animated<Vec2>, plus optional spatial tangents on
each keyframe: with them, the value travels along the cubic Bezier from
one keyframe’s value through its out_tangent and the next keyframe’s
in_tangent, at the speed its timing curve sets along the curve’s
length. Without them it moves in a straight line, as an Animated<Vec2>
does.
Variants§
Constant
A value without animation.
Keyframes
Values evaluated from their keyframe sequence.
Fields
§
keyframes: Vec<PointKeyframe>Strictly ascending keyframes. The evaluator clamps outside the sequence.
Implementations§
Source§impl AnimatedPoint
impl AnimatedPoint
Sourcepub const fn is_animated(&self) -> bool
pub const fn is_animated(&self) -> bool
Whether the value changes over time.
Trait Implementations§
Source§impl Clone for AnimatedPoint
impl Clone for AnimatedPoint
Source§impl Debug for AnimatedPoint
impl Debug for AnimatedPoint
Source§impl Default for AnimatedPoint
impl Default for AnimatedPoint
Source§impl<'de> Deserialize<'de> for AnimatedPoint
impl<'de> Deserialize<'de> for AnimatedPoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AnimatedPoint
impl PartialEq for AnimatedPoint
Source§impl Serialize for AnimatedPoint
impl Serialize for AnimatedPoint
impl StructuralPartialEq for AnimatedPoint
Auto Trait Implementations§
impl Freeze for AnimatedPoint
impl RefUnwindSafe for AnimatedPoint
impl Send for AnimatedPoint
impl Sync for AnimatedPoint
impl Unpin for AnimatedPoint
impl UnsafeUnpin for AnimatedPoint
impl UnwindSafe for AnimatedPoint
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