Enumeration Case

SKInterpolationMode.linear

Values between two keyframes are interpolated linearly.

Declaration

case linear = 1

Discussion

Given a sequence with the key values of [5, 1, 10, 0] and times of [0, 0.25, 0.5, 1], linear interpolation produces a set of values that follow a series of straight lines between each keyframe.

Figure 1

Playground graph generated by SKKeyframeSequence using linear interpolation

Playground graph generated by SKKeyframeSequence using linear interpolation