pub struct Keyframe<T> { /* private fields */ }
Expand description

Intermediate step in an animation sequence

Implementations

Creates a new keyframe from the specified values. If the time value is negative the keyframe will start at 0.0.

Arguments
  • value - The value that this keyframe will be tweened to/from
  • time - The start time in seconds of this keyframe
  • function - The easing function to use from the start of this keyframe to the start of the next keyframe

Same as new, but allows you to supply an easing function which size is not known at compile time.

Arguments
  • value - The value that this keyframe will be tweened to/from
  • time - The start time in seconds of this keyframe
  • function - The easing function to use from the start of this keyframe to the start of the next keyframe

The value of this keyframe

The time in seconds at which this keyframe starts in a sequence

The easing function that will be used when tweening to another keyframe

Returns the value between this keyframe and the next keyframe at the specified time

Note

The following applies if:

  • The requested time is before the start time of this keyframe: the value of this keyframe is returned
  • The requested time is after the start time of next keyframe: the value of the next keyframe is returned
  • The start time of the next keyframe is before the start time of this keyframe: the value of the next keyframe is returned

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Creates a new keyframe from a tuple of (value, time, function). If the time value is negative the keyframe will start at 0.0.

Creates a new keyframe from a tuple of (value, time, function). If the time value is negative the keyframe will start at 0.0.

Creates a new keyframe from a tuple of (value, time). EaseInOut will be used as the easing function. If the time value is negative the keyframe will start at 0.0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.