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
Auto Trait Implementations
impl RefUnwindSafe for TweeningMethod
impl Send for TweeningMethod
impl Sync for TweeningMethod
impl Unpin for TweeningMethod
impl UnwindSafe for TweeningMethod
Blanket Implementations
Mutably borrows from an owned value. Read more
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