Click or drag to resize
AB4D logo

KeyFramesTrackBaseTEasingFunction Property

Gets or sets a Func that gets a double and returns a double and can be specified to provide custom interpolation between first and last key frame. This defines the speed of the animation. When null (by default), linear interpolation is used.

Namespace: Ab3d.Animation
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public Func<double, double> EasingFunction { get; set; }

Property Value

FuncDouble, Double
Remarks

Gets or sets a Func that gets a double and returns a double and can be specified to provide custom interpolation between first and last key frame. This defines the speed of the animation. When null (by default), linear interpolation is used.

The function gets a double parameter value between 0 and 1 and should return a value between 0 and 1.

Standard easing function are defined in EasingFunctions class.

If linear interpolation is used (when set to null - by default), then animation speed is constant. If Ease in is used, then animation starts slowly and then accelerates and finishes with constant speed.

This property is different from the EasingFunction. This property affects the animation speed of the whole Track, where the EasingFunction changes only animation around the specified Key.

NOTE:
All derived class need to call InterpolateFrameNumber(Double) method to adjust the frame number based on the TrackInterpolation property value before the data for the frame are calculated.

See Also