Contents

decayTime

The time at which a haptic pattern’s intensity begins decreasing.

Declaration

static let decayTime: CHHapticEvent.ParameterID

Discussion

This parameter can be an event parameter or a dynamic parameter. A fixed value indicates that the haptic begins decreasing in intensity at the set time, where time 0 indicates now, or the current time.

A dynamic value indicates that the start time of the decrease can change. For example, a value of 0 indicates that the decay time is at its default value. Positive values up to 1.0 increase the decay time exponentially, while negative values down to -1.0 decrease the decay time exponentially.

Haptic intensity responds to this parameter. For example, the following graphic shows the intensity of a haptic pattern in gray. At the beginning, the haptic pattern’s intensity increases from zero to its final value over a certain amount of time; this duration is called the attack. As the haptic pattern reaches its end, the intensity gradually transitions to zero over a certain amount of time; this duration is called the decay.

[Image]

See Also

Haptic Event Parameter IDs