init(_:duration:startVelocity:endVelocity:)
Creates a new keyframe using the given value and timestamp.
Declaration
init(_ to: Value, duration: TimeInterval, startVelocity: Value? = nil, endVelocity: Value? = nil)Parameters
- to:
The value of the keyframe.
- duration:
The duration of the segment defined by this keyframe.
- startVelocity:
The velocity of the value at the beginning of the segment, or
nilto automatically compute the velocity to maintain smooth motion. - endVelocity:
The velocity of the value at the end of the segment, or
nilto automatically compute the velocity to maintain smooth motion.