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
-
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
-
An ease with a
linear
classification.Declaration
Swift
public static let linear: Ease
-
An ease with a
sine
classification andin
acceleration pattern.Declaration
Swift
public static let sineIn: Ease
-
An ease with a
sine
classification andout
acceleration pattern.Declaration
Swift
public static let sineOut: Ease
-
An ease with a
sine
classification andinOut
acceleration pattern.Declaration
Swift
public static let sineInOut: Ease
-
An ease with a
cubic
classification andin
acceleration pattern.Declaration
Swift
public static let cubicIn: Ease
-
An ease with a
cubic
classification andout
acceleration pattern.Declaration
Swift
public static let cubicOut: Ease
-
An ease with a
cubic
classification andinOut
acceleration pattern.Declaration
Swift
public static let cubicInOut: Ease
-
An ease with a
quad
classification andin
acceleration pattern.Declaration
Swift
public static let quadIn: Ease
-
An ease with a
quad
classification andout
acceleration pattern.Declaration
Swift
public static let quadOut: Ease
-
An ease with a
quad
classification andinOut
acceleration pattern.Declaration
Swift
public static let quadInOut: Ease
-
An ease with a
quart
classification andin
acceleration pattern.Declaration
Swift
public static let quartIn: Ease
-
An ease with a
quart
classification andout
acceleration pattern.Declaration
Swift
public static let quartOut: Ease
-
An ease with a
quart
classification andinOut
acceleration pattern.Declaration
Swift
public static let quartInOut: Ease
-
An ease with a
quint
classification andin
acceleration pattern.Declaration
Swift
public static let quintIn: Ease
-
An ease with a
quint
classification andout
acceleration pattern.Declaration
Swift
public static let quintOut: Ease
-
An ease with a
quint
classification andinOut
acceleration pattern.Declaration
Swift
public static let quintInOut: Ease
-
An ease with an
expo
classification andin
acceleration pattern.Declaration
Swift
public static let expoIn: Ease
-
An ease with an
expo
classification andout
acceleration pattern.Declaration
Swift
public static let expoOut: Ease
-
An ease with an
expo
classification andinOut
acceleration pattern.Declaration
Swift
public static let expoInOut: Ease
-
An ease with a
circ
classification andin
acceleration pattern.Declaration
Swift
public static let circIn: Ease
-
An ease with a
circ
classification andout
acceleration pattern.Declaration
Swift
public static let circOut: Ease
-
An ease with a
circ
classification andinOut
acceleration pattern.Declaration
Swift
public static let circInOut: Ease
-
An ease with a
back
classification andin
acceleration pattern.Declaration
Swift
public static let backIn: Ease
-
An ease with a
back
classification andout
acceleration pattern.Declaration
Swift
public static let backOut: Ease
-
An ease with a
back
classification andinOut
acceleration pattern.Declaration
Swift
public static let backInOut: Ease
-
An ease with an
elastic
classification andin
acceleration pattern.Declaration
Swift
public static let elasticIn: Ease
-
An ease with an
elastic
classification andout
acceleration pattern.Declaration
Swift
public static let elasticOut: Ease
-
An ease with an
elastic
classification andinOut
acceleration pattern.Declaration
Swift
public static let elasticInOut: Ease
-
An ease with a
bounce
classification andin
acceleration pattern.Declaration
Swift
public static let bounceIn: Ease
-
An ease with a
bounce
classification andout
acceleration pattern.Declaration
Swift
public static let bounceOut: Ease
-
An ease with a
bounce
classification andinOut
acceleration pattern.Declaration
Swift
public static let bounceInOut: Ease
-
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.