Animations

  • Conforming types support advancing their state by a time interval.

    See more

    Declaration

    Swift

    public protocol Advanceable
  • A protocol which defines the basic requirements to function as a time-advancable animation.

    See more

    Declaration

    Swift

    public protocol AnimationType: Advanceable
  • Provides type erasure for an animation conforming to ValueAnimationType

    See more

    Declaration

    Swift

    public struct AnyValueAnimation<Value: VectorConvertible>: ValueAnimationType

    Parameters

    Value

    The type of value to be animated.

  • Interpolates between values over a specified duration.

    See more

    Declaration

    Swift

    public struct BasicAnimation<Value: VectorConvertible>: ValueAnimationType

    Parameters

    Value

    The type of value to be animated.

  • Given a starting velocity, DecayAnimation will slowly bring the value to a stop (where velocity == Value.zero).

    DecayAnimation uses a DynamicSimulation containing a DecayFunction internally.

    See more

    Declaration

    Swift

    public struct DecayAnimation<Value: VectorConvertible>: ValueAnimationType
  • The SpringAnimation struct is an implementation of ValueAnimationType that uses a configurable spring function to animate the value.

    Spring animations do not have a duration. Instead, you should configure the properties in ‘configuration’ to customize the way the spring will change the value as the simulation advances. The animation is finished when the spring has come to rest at its target value.

    SpringAnimation instances use a DynamicSimulation containing a SpringFunction internally to perform the spring calculations.

    See more

    Declaration

    Swift

    public struct SpringAnimation<Value: VectorConvertible>: ValueAnimationType