Class PropertyTargetEasingInterpolator

Class Hierarchy

Use a Property Target Easing Interpolator when you want to create a smooth transition between the current value of a property and a value that you set dynamically. In a Property Target Easing Interpolator you can set the easing curve, easing mode, and the duration of the transition. When you set a property value without a Property Target Easing Interpolator, Kanzi applies the value to that property immediately. For example, when you use the Object::setProperty() function, Kanzi applies the value immediately.

Every time the value of the target property changes, Property Target Easing Interpolator starts to apply the animation from the current value of the target property to the new value of the target property. Use the setInterpolationDuration() function to set the value of the InterpolationDurationProperty property which determines the duration of the animation. The Property Target Easing Interpolator applies to the animation:

  • Easing function specified by the EasingFunctionProperty property. To set the easing function, use the setEasingFunction() function.
  • Easing mode specified by the EasingModeProperty property. To set the easing mode, use the setEasingMode() function.

If the value of the target property changes during an interpolating animation, the Property Target Easing Interpolator stops that animation and starts a new animation. Use the setInterpolationIfInterruptedMode() function to set the value of the InterpolationIfInterruptedModeProperty property which determines from where the animation starts:

  • PropertyTargetEasingTimeline::InterpolationIfInterruptedMode::StartFromCurrentInterpolatedValue starts from the value of the target property that the previous animation reached.
  • PropertyTargetEasingTimeline::InterpolationIfInterruptedMode::StartFromCurrentTargetValue starts from the previously set value of the target property.

There is no interpolation between the old and the new animations.

You can use the Property Target Easing Interpolator to interpolate properties of these data types:

  • Float
  • ColorRGBA and its R, G, B, and A property fields
  • Vector2 and its X and Y property fields
  • Vector3 and its X, Y, and Z property fields
  • Vector4 and its X, Y, Z, and W property fields
  • SRTValue2D and its Scale X, Scale Y, Rotation Z, Translation X, and Translation Y property fields
  • SRTValue3D and its Scale X, Scale Y, Scale Z, Rotation, Translation X, Translation Y, and Translation Z property fields

Gradually interpolates a target property from its old value to a new value using a specific easing function and easing mode each time a new value is set to the property.

Inherits properties and message types from PropertyTargetEasingInterpolatorMetadata.

Synopsis

Methods
create()

Creates an instance of PropertyTargetEasingInterpolator

PropertyTargetEasingInterpolator.PropertyTargetEasingInterpolator:create(name)

Creates an instance of PropertyTargetEasingInterpolator.

Parameters
name (string)

The name of the PropertyTargetEasingInterpolator.

Return Values
(PropertyTargetEasingInterpolator)

The created PropertyTargetEasingInterpolator.