Physics
-
Animates values using a spring function.
See morelet spring = Spring(value: CGPoint.zero) spring.target = CGPoint(x: 300, y: 200)
Declaration
Swift
public final class Spring<Value> where Value : VectorConvertible
-
Implements a simple spring acceleration function.
See moreDeclaration
Swift
public struct SpringFunction<T> : SimulationFunction where T : VectorConvertible
-
Gradually reduces velocity until it equals
See moreVector.zero
.Declaration
Swift
public struct DecayFunction<T> : SimulationFunction where T : VectorConvertible
-
Conforming types implement a dynamic function that models changes to a vector over time.
See moreDeclaration
Swift
public protocol SimulationFunction
-
Returned by a simulation function to indicate whether a simulation should converge (come to rest) for a given state.
See moreDeclaration
Swift
public enum Convergence<T> where T : VectorConvertible