Classes

The following classes are available globally.

  • A singleton configuration class for MotionMachine.

    See more

    Declaration

    Swift

    @MainActor
    public final class MMConfiguration
  • Contains a value as a weak reference to an object

    See more

    Declaration

    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 more

    Declaration

    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 Moveable protocol. A single MotionGroup could hold Motion, PhysicsMotion, and PathMotion objects, and even other MoveableCollection objects. The MotionGroup class is a good solution when you want to easily synchronize the movements of many Moveable objects.

    See more

    Declaration

    Swift

    @MainActor
    public class MotionGroup : Moveable, MoveableCollection, TempoDriven, MotionUpdateDelegate, Identifiable
  • MotionSequence moves a collection of objects conforming to the Moveable protocol in sequential order. A single MotionSequence could hold Motion, PhysicsMotion, and PathMotion objects, and even other MoveableCollection objects. MotionSequence provides a powerful and easy way of chaining together individual motions to create complex animations.

    See more

    Declaration

    Swift

    @MainActor
    public class MotionSequence : Moveable, MoveableCollection, TempoDriven, MotionUpdateDelegate, Identifiable
  • PathMotion handles a single motion operation of a coordinate point along a CGPath. It does not directly accept PropertyData 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.

    See more

    Declaration

    Swift

    @MainActor
    public class PathMotion : Moveable, TempoDriven, PropertyCollection, PropertyDataDelegate, Identifiable
  • PathPhysicsMotion handles a single motion operation of a coordinate point along a CGPath using a physics system to update the value with a decaying velocity. It does not directly accept PropertyData 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.

    See more

    Declaration

    Swift

    @MainActor
    public class PathPhysicsMotion : Moveable, TempoDriven, PropertyCollection, PropertyDataDelegate, Identifiable
  • This state object is used in conjunction with PathMotion to handle the movement of a point along a path.

    See more

    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 more

    Declaration

    Swift

    @MainActor
    public class PhysicsMotion<TargetType> : Moveable, Additive, TempoDriven, PropertyDataDelegate where TargetType : AnyObject
    extension PhysicsMotion: Equatable
  • A simple physics engine used with PhysicsMotion and PathPhysicsMotion to calculate values for motions. It primarily uses a constant velocity, plus a friction 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 a restitution value to control the value’s elasticity when colliding.

    See more

    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 more

    Declaration

    Swift

    @MainActor
    public final class PropertyData<RootType> : Identifiable
    extension PropertyData: Equatable
    extension PropertyData: Hashable
  • CATempo uses a CADisplayLink object to send out tempo updates that are synchronized with the refresh rate of the display.

    See more

    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 MacDisplayLinkTempo class is used, and on other platforms the CATempo class is used. Both classes use CADisplayLink.

    See more

    Declaration

    Swift

    @MainActor
    public class DisplayLinkTempo : TempoProviding
  • This class uses a CADisplayLink object to send out tempo updates that are synchronized with the refresh rate of the currently-active Mac display.

    See more
  • TimerTempo uses an internal DispatchSourceTimer object to send out tempo updates. By default, the update interval is twice the maximum refresh rate of the current display.

    See more

    Declaration

    Swift

    @MainActor
    public class TimerTempo : TempoProviding
  • CGColorAssistant provides support for the CGColor type.

    See more

    Declaration

    Swift

    @MainActor
    public final class CGColorAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
  • CGStructAssistant provides support for several Core Graphics struct types, including CGPoint, CGSize, CGRect, CGVector, CGAffineTransform, as well as QuartzCore’s CATransform3D type. It also provides support for the NSNumber type.

    See more

    Declaration

    Swift

    @MainActor
    public final class CGStructAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
  • CIColorAssistant provides support for Core Image’s CIColor type.

    See more

    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 BinaryFloatingPoint or BinaryInteger, as well as NSNumber.

    See more

    Declaration

    Swift

    @MainActor
    public final class NumericAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
  • SIMDAssistant provides support for all current SIMD types.

    See more

    Declaration

    Swift

    @MainActor
    public final class SIMDAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
  • UIColorAssistant provides support for the UIColor type.

    See more

    Declaration

    Swift

    @MainActor
    public final class UIColorAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
  • UIKitStructAssistant provides support for the UIKit structs UIEdgeInsets and UIOffset.

    See more

    Declaration

    Swift

    @MainActor
    public final class UIKitStructAssistant<TargetType> : ValueAssistant where TargetType : AnyObject
  • The ValueAssistantGroup class enables multiple ValueAssistant objects to be attached to a single motion class.

    See more

    Declaration

    Swift

    @MainActor
    public final class ValueAssistantGroup<TargetType> : ValueAssistant where TargetType : AnyObject