zng::var::animation

Trait Transitionable

source
pub trait Transitionable: VarValue {
    // Required method
    fn lerp(self, to: &Self, step: Factor) -> Self;
}
Expand description

Represents a type that can be animated between two values.

This trait is auto-implemented for all Copy types that can add, subtract and multiply by Factor, Clone only types must implement this trait manually.

Required Methods§

source

fn lerp(self, to: &Self, step: Factor) -> Self

Sample the linear interpolation from self -> to by step.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Transitionable for bool

source§

fn lerp(self, to: &bool, step: Factor) -> bool

source§

impl Transitionable for f32

source§

fn lerp(self, to: &f32, step: Factor) -> f32

source§

impl Transitionable for f64

source§

fn lerp(self, to: &f64, step: Factor) -> f64

source§

impl Transitionable for i8

source§

fn lerp(self, to: &i8, step: Factor) -> i8

source§

impl Transitionable for i16

source§

fn lerp(self, to: &i16, step: Factor) -> i16

source§

impl Transitionable for i32

source§

fn lerp(self, to: &i32, step: Factor) -> i32

source§

impl Transitionable for i64

source§

fn lerp(self, to: &i64, step: Factor) -> i64

source§

impl Transitionable for i128

source§

fn lerp(self, to: &i128, step: Factor) -> i128

source§

impl Transitionable for isize

source§

fn lerp(self, to: &isize, step: Factor) -> isize

source§

impl Transitionable for u8

source§

fn lerp(self, to: &u8, step: Factor) -> u8

source§

impl Transitionable for u16

source§

fn lerp(self, to: &u16, step: Factor) -> u16

source§

impl Transitionable for u32

source§

fn lerp(self, to: &u32, step: Factor) -> u32

source§

impl Transitionable for u64

source§

fn lerp(self, to: &u64, step: Factor) -> u64

source§

impl Transitionable for u128

source§

fn lerp(self, to: &u128, step: Factor) -> u128

source§

impl Transitionable for usize

source§

fn lerp(self, to: &usize, step: Factor) -> usize

source§

impl<T, U> Transitionable for Box2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Box2D<T, U>, step: Factor) -> Box2D<T, U>

source§

impl<T, U> Transitionable for Box3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Box3D<T, U>, step: Factor) -> Box3D<T, U>

source§

impl<T, U> Transitionable for Length<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Length<T, U>, step: Factor) -> Length<T, U>

source§

impl<T, U> Transitionable for Point2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Point2D<T, U>, step: Factor) -> Point2D<T, U>

source§

impl<T, U> Transitionable for Point3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Point3D<T, U>, step: Factor) -> Point3D<T, U>

source§

impl<T, U> Transitionable for Rect<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Rect<T, U>, step: Factor) -> Rect<T, U>

source§

impl<T, U> Transitionable for SideOffsets2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &SideOffsets2D<T, U>, step: Factor) -> SideOffsets2D<T, U>

source§

impl<T, U> Transitionable for Size2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Size2D<T, U>, step: Factor) -> Size2D<T, U>

source§

impl<T, U> Transitionable for Size3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Size3D<T, U>, step: Factor) -> Size3D<T, U>

source§

impl<T, U> Transitionable for Vector2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Vector2D<T, U>, step: Factor) -> Vector2D<T, U>

source§

impl<T, U> Transitionable for Vector3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

source§

fn lerp(self, to: &Vector3D<T, U>, step: Factor) -> Vector3D<T, U>

Implementors§

source§

impl Transitionable for LinearGradientAxis

source§

impl Transitionable for zng::layout::Length

source§

impl Transitionable for BorderStyle

source§

impl Transitionable for LineStyle

source§

impl Transitionable for ColorMatrix

source§

impl Transitionable for Filter

source§

impl Transitionable for ColorStop

source§

impl Transitionable for Hsla

source§

impl Transitionable for Hsva

source§

impl Transitionable for LightDark

source§

impl Transitionable for Rgba

source§

impl Transitionable for FontStretch

source§

impl Transitionable for FontWeight

source§

impl Transitionable for AnchorOffset

source§

impl Transitionable for Align

source§

impl Transitionable for AngleDegree

source§

impl Transitionable for AngleGradian

source§

impl Transitionable for AngleRadian

source§

impl Transitionable for AngleTurn

source§

impl Transitionable for ByteLength

source§

impl Transitionable for Dip

source§

impl Transitionable for Factor

source§

impl Transitionable for GridSpacing

source§

impl Transitionable for Line

source§

impl Transitionable for Point

source§

impl Transitionable for Ppi

source§

impl Transitionable for Ppm

source§

impl Transitionable for Px

source§

impl Transitionable for PxConstraints2d

source§

impl Transitionable for PxConstraints

source§

impl Transitionable for zng::layout::Rect

source§

impl Transitionable for SideOffsets

source§

impl Transitionable for Size

source§

impl Transitionable for Transform

source§

impl Transitionable for Vector

source§

impl Transitionable for StackDirection

source§

impl Transitionable for BorderSide

source§

impl Transitionable for BorderSides

source§

impl Transitionable for CornerRadius

source§

impl Transitionable for ZIndex

source§

impl<T, U> Transitionable for CornerRadius2D<T, U>
where T: Transitionable, U: Send + Sync + Any,