pub unsafe extern "C" fn OH_ArkUI_Curve_CreateResponsiveSpringMotion(
response: f32,
dampingFraction: f32,
overlapDuration: f32,
) -> ArkUI_CurveHandleapi-12 only.Expand description
Creates a responsive spring animation curve. It is a special case of springMotion, with the only difference in the default values. It can be used together with springMotion.
Note:** The animation duration is subject to the curve parameters, rather than the duration parameter in animation or animateTo.
§Arguments
response - Indicates the duration of one complete oscillation.
dampingFraction - Indicates the damping coefficient.
0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position. 1: critically damped. 1: overdamped. In this case, the spring approaches equilibrium gradually.
overlapDuration - Indicates the duration for animations to overlap. When animations overlap, the
response values of these animations will
transit smoothly over this duration if they are different.
§Returns
Returns the pointer to the interpolation object of the curve. Returns NULL if a parameter error occurs.