LavaUI docs GitHub

protocol Animatable

Swift

protocol Animatable

A value that can be interpolated between two endpoints.

Sources/LavaUI/Animation.swift:4

Methods

static func interpolate(_ from: Self, _ to: Self, _ t: Float) -> Self

The value a fraction t of the way from from to to.

t is 0 at from and 1 at to. It can leave that range — a spring overshoots — and implementations should extrapolate rather than clamp.

Sources/LavaUI/Animation.swift:9