pub type ComputedTimingFunction = TimingFunction<Integer, Number, PiecewiseLinearFunction>;
Expand description
A computed timing function.
Aliased Type§
enum ComputedTimingFunction {
Keyword(TimingKeyword),
CubicBezier {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
},
Steps(i32, StepPosition),
LinearFunction(PiecewiseLinearFunction),
}
Variants§
Keyword(TimingKeyword)
linear | ease | ease-in | ease-out | ease-in-out
CubicBezier
cubic-bezier(<number>, <number>, <number>, <number>)
Steps(i32, StepPosition)
step-start | step-end | steps(<integer>, [ <step-position> ]?)
<step-position> = jump-start | jump-end | jump-none | jump-both | start | end
LinearFunction(PiecewiseLinearFunction)
linear([
Implementations§
Source§impl ComputedTimingFunction
impl ComputedTimingFunction
fn calculate_step_output( steps: i32, pos: StepPosition, progress: f64, before_flag: BeforeFlag, ) -> f64
Sourcepub fn calculate_output(
&self,
progress: f64,
before_flag: BeforeFlag,
epsilon: f64,
) -> f64
pub fn calculate_output( &self, progress: f64, before_flag: BeforeFlag, epsilon: f64, ) -> f64
The output of the timing function given the progress ratio of this animation.
Trait Implementations
Source§impl<Integer: Clone, Number: Clone, LinearStops: Clone> Clone for TimingFunction<Integer, Number, LinearStops>
impl<Integer: Clone, Number: Clone, LinearStops: Clone> Clone for TimingFunction<Integer, Number, LinearStops>
Source§fn clone(&self) -> TimingFunction<Integer, Number, LinearStops>
fn clone(&self) -> TimingFunction<Integer, Number, LinearStops>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Integer: Debug, Number: Debug, LinearStops: Debug> Debug for TimingFunction<Integer, Number, LinearStops>
impl<Integer: Debug, Number: Debug, LinearStops: Debug> Debug for TimingFunction<Integer, Number, LinearStops>
Source§impl<'de, Integer, Number, LinearStops> Deserialize<'de> for TimingFunction<Integer, Number, LinearStops>
impl<'de, Integer, Number, LinearStops> Deserialize<'de> for TimingFunction<Integer, Number, LinearStops>
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<Integer, Number, LinearStops> MallocSizeOf for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> MallocSizeOf for TimingFunction<Integer, Number, LinearStops>
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<Integer: PartialEq, Number: PartialEq, LinearStops: PartialEq> PartialEq for TimingFunction<Integer, Number, LinearStops>
impl<Integer: PartialEq, Number: PartialEq, LinearStops: PartialEq> PartialEq for TimingFunction<Integer, Number, LinearStops>
Source§fn eq(&self, other: &TimingFunction<Integer, Number, LinearStops>) -> bool
fn eq(&self, other: &TimingFunction<Integer, Number, LinearStops>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<Integer, Number, LinearStops> Serialize for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> Serialize for TimingFunction<Integer, Number, LinearStops>
Source§impl<Integer, Number, LinearStops> SpecifiedValueInfo for TimingFunction<Integer, Number, LinearStops>
impl<Integer, Number, LinearStops> SpecifiedValueInfo for TimingFunction<Integer, Number, LinearStops>
Source§const SUPPORTED_TYPES: u8 = 4u8
const SUPPORTED_TYPES: u8 = 4u8
Supported CssTypes by the given value type. Read more