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.