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 : Identifiableextension WeakAdditiveContainer: Hashableextension 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 : AnyObjectextension Motion: Equatable -
MotionGroup handles the movement of one or more objects which conform to the
See moreMoveableprotocol. A singleMotionGroupcould holdMotion,PhysicsMotion, andPathMotionobjects, and even otherMoveableCollectionobjects. The MotionGroup class is a good solution when you want to easily synchronize the movements of manyMoveableobjects.Declaration
Swift
@MainActor public class MotionGroup : Moveable, MoveableCollection, TempoDriven, MotionUpdateDelegate, Identifiable -
MotionSequence moves a collection of objects conforming to the
See moreMoveableprotocol in sequential order. A singleMotionSequencecould holdMotion,PhysicsMotion, andPathMotionobjects, and even otherMoveableCollectionobjects. 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 acceptPropertyDataobjects, 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 moreCGPathusing a physics system to update the value with a decaying velocity. It does not directly acceptPropertyDataobjects, 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 morePathMotionto 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 : AnyObjectextension PhysicsMotion: Equatable -
A simple physics engine used with
See morePhysicsMotionandPathPhysicsMotionto calculate values for motions. It primarily uses a constantvelocity, plus africtioncomponent, 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 arestitutionvalue 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> : Identifiableextension PropertyData: Equatableextension PropertyData: Hashable -
CATempo uses a
See moreCADisplayLinkobject 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 moreMacDisplayLinkTempoclass is used, and on other platforms theCATempoclass is used. Both classes useCADisplayLink.Declaration
Swift
@MainActor public class DisplayLinkTempo : TempoProviding -
This class uses a
See moreCADisplayLinkobject to send out tempo updates that are synchronized with the refresh rate of the currently-active Mac display. -
TimerTempo uses an internal
See moreDispatchSourceTimerobject 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 moreCGColortype.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’sCATransform3Dtype. It also provides support for theNSNumbertype.Declaration
Swift
@MainActor public final class CGStructAssistant<TargetType> : ValueAssistant where TargetType : AnyObject -
CIColorAssistant provides support for Core Image’s
See moreCIColortype.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 moreBinaryFloatingPointorBinaryInteger, as well asNSNumber.Declaration
Swift
@MainActor public final class NumericAssistant<TargetType> : ValueAssistant where TargetType : AnyObject -
SIMDAssistant provides support for all current
See moreSIMDtypes.Declaration
Swift
@MainActor public final class SIMDAssistant<TargetType> : ValueAssistant where TargetType : AnyObject -
UIColorAssistant provides support for the
See moreUIColortype.Declaration
Swift
@MainActor public final class UIColorAssistant<TargetType> : ValueAssistant where TargetType : AnyObject -
UIKitStructAssistant provides support for the UIKit structs
See moreUIEdgeInsetsandUIOffset.Declaration
Swift
@MainActor public final class UIKitStructAssistant<TargetType> : ValueAssistant where TargetType : AnyObject -
The
See moreValueAssistantGroupclass enables multipleValueAssistantobjects to be attached to a single motion class.Declaration
Swift
@MainActor public final class ValueAssistantGroup<TargetType> : ValueAssistant where TargetType : AnyObject
View on GitHub
Classes Reference