Ease

public struct Ease

A type of easing function, described from an algorithmic classification and acceleration pattern, providing the sense of motion.

“Nothing in nature moves linearly from one point to another. In reality, things tend to accelerate or decelerate as they move. Our brains are wired to expect this kind of motion, so when animating you should use this to your advantage. Natural motion makes your users feel more comfortable with your apps, which in turn leads to a better overall experience.” - Paul Lewis

Properties

  • The algorithmic classification of the ease.

    Declaration

    Swift

    public let classification: EaseClassification
  • The acceleration pattern of the ease.

    Declaration

    Swift

    public let curve: EaseCurve
  • The timing function, f(x), of the ease.

    Declaration

    Swift

    public let function: (Double) -> Double

Linear

  • An ease with a linear classification.

    Visual Reference

    Declaration

    Swift

    public static let linear: Ease

Sinusoidal

  • An ease with a sine classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let sineIn: Ease
  • An ease with a sine classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let sineOut: Ease
  • An ease with a sine classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let sineInOut: Ease

Cubic

  • An ease with a cubic classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let cubicIn: Ease
  • An ease with a cubic classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let cubicOut: Ease
  • An ease with a cubic classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let cubicInOut: Ease

Quadratic

  • An ease with a quad classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quadIn: Ease
  • An ease with a quad classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quadOut: Ease
  • An ease with a quad classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quadInOut: Ease

Quartic

  • An ease with a quart classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quartIn: Ease
  • An ease with a quart classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quartOut: Ease
  • An ease with a quart classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quartInOut: Ease

Quintic

  • An ease with a quint classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quintIn: Ease
  • An ease with a quint classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quintOut: Ease
  • An ease with a quint classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let quintInOut: Ease

Exponential

  • An ease with an expo classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let expoIn: Ease
  • An ease with an expo classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let expoOut: Ease
  • An ease with an expo classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let expoInOut: Ease

Circular

  • An ease with a circ classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let circIn: Ease
  • An ease with a circ classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let circOut: Ease
  • An ease with a circ classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let circInOut: Ease

Back

  • An ease with a back classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let backIn: Ease
  • An ease with a back classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let backOut: Ease
  • An ease with a back classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let backInOut: Ease

Elastic

  • An ease with an elastic classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let elasticIn: Ease
  • An ease with an elastic classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let elasticOut: Ease
  • An ease with an elastic classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let elasticInOut: Ease

Bounce

  • An ease with a bounce classification and in acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let bounceIn: Ease
  • An ease with a bounce classification and out acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let bounceOut: Ease
  • An ease with a bounce classification and inOut acceleration pattern.

    Visual Reference

    Declaration

    Swift

    public static let bounceInOut: Ease

Custom

  • An ease with a custom timing function.

    Declaration

    Swift

    public static func custom(function: @escaping (Double) -> Double) -> Ease

    Parameters

    function

    The custom timing function of the ease.

    Return Value

    The custom ease.