The modes used to determine how the sequence repeats.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Sprite
Kit
Declaration
enum SKRepeatMode : Int
The modes used to determine how the sequence repeats.
SDKs
Framework
enum SKRepeatMode : Int
case clamp
When a sample is calculated, the time value is clamped to the range of time values found in the sequence. For example, if the last keyframe’s time value is 0
, a sample at any time value from 0
to 1
returns the last keyframe’s value.
case loop
When a sample is calculated, the sequence loops back to the beginning of the sequence. For example, if the last keyframe’s time value is 0
, then a sample at any time value from 0
to 1
returns the same value as the sequence did from 0
to 0
.