AnyValueAnimation

public struct AnyValueAnimation<Value: VectorConvertible>: ValueAnimationType

Provides type erasure for an animation conforming to ValueAnimationType

  • The current value of the animation.

    Declaration

    Swift

    public let value: Value
  • The current value of the animation.

    Declaration

    Swift

    public let velocity: Value
  • true if the animation has finished.

    Declaration

    Swift

    public let finished: Bool
  • Creates a new type-erased animation.

    Declaration

    Swift

    public init<A: ValueAnimationType>(animation: A) where A.Value == Value

    Parameters

    animation

    The animation to be type erased.

  • Advances the animation.

    Declaration

    Swift

    public mutating func advance(_ time: Double)

    Parameters

    elapsed

    The time (in seconds) to advance the animation.