Trait libre_pvz_animation::curve::animatable::Animatable

source ·
pub trait Animatable {
    // Required method
    fn interpolate(a: &Self, b: &Self, time: f32) -> Self;
}
Expand description

Animatable types can be interpolated with f32s.

Required Methods§

source

fn interpolate(a: &Self, b: &Self, time: f32) -> Self

Typically a * (1 - time) + b * time.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Animatable for Visibility

source§

impl Animatable for bool

source§

fn interpolate(a: &bool, _b: &bool, _time: f32) -> bool

source§

impl Animatable for f32

source§

fn interpolate(a: &f32, b: &f32, time: f32) -> f32

source§

impl Animatable for Quat

source§

fn interpolate(a: &Quat, b: &Quat, time: f32) -> Quat

source§

impl Animatable for Vec2

source§

fn interpolate(a: &Vec2, b: &Vec2, time: f32) -> Vec2

source§

impl Animatable for Vec3

source§

fn interpolate(a: &Vec3, b: &Vec3, time: f32) -> Vec3

source§

impl<T: Asset> Animatable for Handle<T>

source§

fn interpolate(a: &Handle<T>, _b: &Handle<T>, _time: f32) -> Handle<T>

Implementors§