ScalarKeyframe

public struct ScalarKeyframe : Hashable

A ScalarKeyframe consists of a scalar value (e.g,: distance in meters) and an animation duration.

  • Scalar keyframe value.

    Declaration

    Swift

    public let value: Double
  • Relative animation duration for reaching the keyframe value from previous keyframe value. Negative duration value gets clamped to 0.

    Declaration

    Swift

    public let duration: TimeInterval
  • Constructs a ScalarKeyframe from the value and offset.

    Declaration

    Swift

    public init(value: Double, duration: TimeInterval)

    Parameters

    value

    Scalar keyframe value.

    duration

    Relative animation duration for reaching the keyframe value. Negative duration value gets clamped to 0.