Classes
The following classes are available globally.
-
A singleton configuration class for MotionMachine.
See moreDeclaration
Swift
@MainActor public final class MMConfiguration
-
Contains a value as a weak reference to an object
See moreDeclaration
Swift
@MainActor public final class WeakAdditiveContainer : Identifiable
extension WeakAdditiveContainer: Hashable
extension WeakAdditiveContainer: Equatable
-
Motion handles a single motion operation on one or more properties, interpolating between specified starting and ending values.
See moreDeclaration
Swift
@MainActor public class Motion<TargetType> : Moveable, Additive, TempoDriven, PropertyDataDelegate where TargetType : AnyObject
extension Motion: Equatable
-
MotionGroup handles the movement of one or more objects which conform to the
See moreMoveable
protocol. A singleMotionGroup
could holdMotion
,PhysicsMotion
, andPathMotion
objects, and even otherMoveableCollection
objects. The MotionGroup class is a good solution when you want to easily synchronize the movements of manyMoveable
objects.Declaration
Swift
@MainActor public class MotionGroup : Moveable, MoveableCollection, TempoDriven, MotionUpdateDelegate, Identifiable
-
MotionSequence moves a collection of objects conforming to the
See moreMoveable
protocol in sequential order. A singleMotionSequence
could holdMotion
,PhysicsMotion
, andPathMotion
objects, and even otherMoveableCollection
objects. MotionSequence provides a powerful and easy way of chaining together individual motions to create complex animations.Declaration
Swift
@MainActor public class MotionSequence : Moveable, MoveableCollection, TempoDriven, MotionUpdateDelegate, Identifiable
-
PathMotion handles a single motion operation of a coordinate point along a
See moreCGPath
. It does not directly acceptPropertyData
objects, but instead transforms a value between 0.0 and 1.0, representing the length of the associated path. Using this value, it updates the current point on the path.Declaration
Swift
@MainActor public class PathMotion : Moveable, TempoDriven, PropertyCollection, PropertyDataDelegate, Identifiable
-
PathPhysicsMotion handles a single motion operation of a coordinate point along a
See moreCGPath
using a physics system to update the value with a decaying velocity. It does not directly acceptPropertyData
objects, but instead transforms a value between 0.0 and 1.0, representing the length of the associated path. Using this value, it updates the current point on the path.Declaration
Swift
@MainActor public class PathPhysicsMotion : Moveable, TempoDriven, PropertyCollection, PropertyDataDelegate, Identifiable
-
This state object is used in conjunction with
See morePathMotion
to handle the movement of a point along a path.Declaration
Swift
public final class PathState : @unchecked Sendable
-
PhysicsMotion handles a single motion operation on one or more properties, using a physics system to update values with decaying velocity.
See moreDeclaration
Swift
@MainActor public class PhysicsMotion<TargetType> : Moveable, Additive, TempoDriven, PropertyDataDelegate where TargetType : AnyObject
extension PhysicsMotion: Equatable
-
A simple physics engine used with
See morePhysicsMotion
andPathPhysicsMotion
to calculate values for motions. It primarily uses a constantvelocity
, plus afriction
component, to update movements of values over time. As of version 2.2.0 it also supports simple collision handling between two optional fixed start and end points, and arestitution
value to control the value’s elasticity when colliding.Declaration
Swift
@MainActor public class PhysicsSystem : PhysicsSolving
-
This class represents a single property and information about the state of its value interpolation, as well as metadata such as the KeyPath which allows a motion class to get and set these values.
See moreDeclaration
Swift
@MainActor public final class PropertyData<RootType> : Identifiable
extension PropertyData: Equatable
extension PropertyData: Hashable
-
CATempo uses a
See moreCADisplayLink
object to send out tempo updates that are synchronized with the refresh rate of the display.Declaration
Swift
@MainActor public class CATempo : TempoProviding
-
DisplayLinkTempo chooses the appropriate TempoProviding class to send tempo updates that are synchronized with the refresh rate of the display. On Mac, the
See moreMacDisplayLinkTempo
class is used, and on other platforms theCATempo
class is used. Both classes useCADisplayLink
.Declaration
Swift
@MainActor public class DisplayLinkTempo : TempoProviding
-
This class uses a
See moreCADisplayLink
object to send out tempo updates that are synchronized with the refresh rate of the currently-active Mac display. -
TimerTempo uses an internal
See moreDispatchSourceTimer
object to send out tempo updates. By default, the update interval is twice the maximum refresh rate of the current display.Declaration
Swift
@MainActor public class TimerTempo : TempoProviding
-
CGColorAssistant provides support for the
See moreCGColor
type.Declaration
Swift
@MainActor public final class CGColorAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
CGStructAssistant provides support for several Core Graphics struct types, including
See moreCGPoint
,CGSize
,CGRect
,CGVector
,CGAffineTransform
, as well as QuartzCore’sCATransform3D
type. It also provides support for theNSNumber
type.Declaration
Swift
@MainActor public final class CGStructAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
CIColorAssistant provides support for Core Image’s
See moreCIColor
type.Declaration
Swift
@MainActor public final class CIColorAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
NumericAssistant provides support for top-level properties on the target object which are numeric values. This class supports all numeric types which conform to either
See moreBinaryFloatingPoint
orBinaryInteger
, as well asNSNumber
.Declaration
Swift
@MainActor public final class NumericAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
SIMDAssistant provides support for all current
See moreSIMD
types.Declaration
Swift
@MainActor public final class SIMDAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
UIColorAssistant provides support for the
See moreUIColor
type.Declaration
Swift
@MainActor public final class UIColorAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
UIKitStructAssistant provides support for the UIKit structs
See moreUIEdgeInsets
andUIOffset
.Declaration
Swift
@MainActor public final class UIKitStructAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
-
The
See moreValueAssistantGroup
class enables multipleValueAssistant
objects to be attached to a single motion class.Declaration
Swift
@MainActor public final class ValueAssistantGroup<TargetType> : ValueAssistant where TargetType : AnyObject