pub enum AnimatedPoint {
Constant {
value: Vec2,
},
Keyframes {
keyframes: Vec<PointKeyframe>,
},
Data(Box<DataBinding>),
}Expand description
A position that can move along curves between its keyframes.
Its JSON is an Animated<Vec2> plus optional spatial tangents per keyframe. With them,
the value travels the cubic Bezier through this keyframe’s out_tangent and the next’s
in_tangent, at the speed its timing curve sets along the arc length. Without them it
moves in a straight line.
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.
Data(Box<DataBinding>)
A channel of a data set, followed at render time.
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: keyframes or data.
Sourcepub const fn data(&self) -> Option<&DataBinding>
pub const fn data(&self) -> Option<&DataBinding>
The data binding, when the value follows a data set.
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
Source§impl TimelineValue for AnimatedPoint
impl TimelineValue for AnimatedPoint
Source§fn keep_window(&mut self, window: (i64, i64))
fn keep_window(&mut self, window: (i64, i64))
Keeps the keyframes that decide values inside
window (ticks, end exclusive): those
inside it and the nearest one on each side.Source§fn via_clip_mut(&mut self) -> Option<&mut ClipId>
fn via_clip_mut(&mut self) -> Option<&mut ClipId>
Self::via_clip, to point it at another clip.Auto Trait Implementations§
impl Forget for AnimatedPoint
impl Freeze for AnimatedPoint
impl Move 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