Protocols
The following protocols are available globally.
-
This protocol declares methods and properties that must be adopted by custom motion classes in order to participate in the MotionMachine ecosystem. All standard MotionMachine motion classes conform to this protocol.
See moreDeclaration
Swift
@MainActor public protocol Moveable : AnyObject
-
This protocol represents an object that holds a collection of
See morePropertyData
objects, such as aMotion
class.Declaration
Swift
@MainActor public protocol PropertyCollection : AnyObject
-
This protocol defines methods and properties that must be adopted for any value assistant.
See moreDeclaration
Swift
@MainActor public protocol ValueAssistant
-
This protocol represents physics solving systems that calculate the positions of values over time, and is used in
See morePhysicsMotion
andPathPhysicsMotion
to update property values.Declaration
Swift
public protocol PhysicsSolving
-
Provides delegate updates when property values change.
See moreDeclaration
Swift
@MainActor public protocol PropertyDataDelegate : AnyObject
-
This protocol declares methods and properties that must be adopted by custom
See moreMoveable
classes who participate in additive animations with other MotionMachine classes.Declaration
Swift
@MainActor public protocol Additive : PropertyCollection
-
This delegate protocol defines a status update method in order for
See moreMoveable
objects to communicate with one another. MotionMachine collection classes use this protocol method to keep track of child motion status changes. Any customMoveable
classes must sendMoveableStatus
status updates using this protocol.Declaration
Swift
@MainActor public protocol MotionUpdateDelegate : AnyObject
-
This protocol declares methods and properties that must be adopted by custom classes which control other
See moreMoveable
classes in order to participate in the MotionMachine ecosystem. All standard MotionMachine collection classes (MotionSequence, MotionGroup) conform to this protocol.Declaration
Swift
@MainActor public protocol MoveableCollection
-
This protocol represents objects that subscribe to a
Tempo
object’s beats. Every movement of a value occurs because time has changed. These beats drive the motion, sending timestamps by which delta values can be calculated. All standard MotionMachine motion classes conform to this protocol.Important
While you aren’t required to implement this protocol in order to update your own customMoveable
classes, it is the preferred way to interact with the MotionMachine ecosystem unless your requirements prevent usingTempo
objects for updating your value interpolations.Declaration
Swift
@MainActor public protocol TempoDriven : TempoDelegate