MotionOptions

public struct MotionOptions : OptionSet, Sendable

An integer options set providing possible initialization options for a Moveable object.

  • Declaration

    Swift

    public let rawValue: Int
  • Declaration

    Swift

    public init(rawValue: Int)
  • No options are specified.

    Declaration

    Swift

    public static let none: MotionOptions
  • Specifies that a motion should repeat.

    Declaration

    Swift

    public static let repeats: MotionOptions
  • Specifies that a motion should reverse directions after moving in the forward direction.

    Declaration

    Swift

    public static let reverses: MotionOptions
  • Specifies that a motion’s property (or parent, if property is not KVC-compliant) should be reset to its starting value on repeats or restarts.

    Remark

    Motion and PhysicsMotion are the only MotionMachine classes that currently accept this option.

    Declaration

    Swift

    public static let resetsStateOnRepeat: MotionOptions