Enum crystalorb::TweeningMethod[][src]

pub enum TweeningMethod {
    MostRecentlyPassed,
    Nearest,
    Interpolated,
}
Expand description

Represent how to calculate the current client display state based on the simulated undershot and overshot frames (since the two frames closest to the current time may not exactly line up with the current time).

Variants

MostRecentlyPassed

Use the undershot frame if the simulated frames don’t exactly line up to the current time. This is equivalent to linearly interpolating between the undershot and overshot frame, but using an interpolation paramater t.floor().

Nearest

Use the undershot frame or the overshot frame, whichever is closest to the current time. This is equivalent to interpolating between the undershot and overshot frame, but using an interpolation paramater t.round().

Interpolated

Use the display state’s interpolation function to find a suitable in-between display state between the undershot and overshot frame for the current time.

Implementations

Depending on the tweening method, conditionally snap the interpolation parameter to 0.0 or 1.0.

Panics

Asserts that t is within 0.0..=1.0.

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

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more