Class ScrollFlingAnimator
public class ScrollFlingAnimator : SkiaValueAnimator, ISkiaAnimator, IDisposable
- Inheritance
-
ScrollFlingAnimator
- Implements
- Inherited Members
- Extension Methods
Constructors
ScrollFlingAnimator(IDrawnBase)
public ScrollFlingAnimator(IDrawnBase parent)
Parameters
parentIDrawnBase
Properties
CurrentVelocity
public float CurrentVelocity { get; protected set; }
Property Value
Parameters
public DecelerationTimingParameters Parameters { get; set; }
Property Value
SelfFinished
public bool SelfFinished { get; set; }
Property Value
ValueThreshold
public float ValueThreshold { get; set; }
Property Value
Methods
InitializeWithDestination(float, float, float, float, float)
Initialize to reach a specific destination in given time
public void InitializeWithDestination(float position, float target, float timeSecs, float deceleration = 0.998, float valueThreshold = 0.1)
Parameters
positionfloatStarting position
targetfloatTarget position
timeSecsfloatDuration in seconds
decelerationfloatDeceleration rate
valueThresholdfloatStop when value change per frame is below this
InitializeWithVelocity(float, float, float, float)
Initialize with velocity and optional value threshold for early termination
public void InitializeWithVelocity(float position, float velocity, float deceleration = 0.998, float valueThreshold = 1.85)
Parameters
positionfloatStarting position
velocityfloatInitial velocity
decelerationfloatDeceleration rate
valueThresholdfloatStop when value change per frame is below this
RunAsync(float, float, float, CancellationToken)
public Task RunAsync(float position, float velocity, float deceleration = 0.998, CancellationToken cancellationToken = default)
Parameters
positionfloatvelocityfloatdecelerationfloatcancellationTokenCancellationToken
Returns
Start(double)
public override void Start(double delayMs = 0)
Parameters
delayMsdouble
UpdateValue(long, long)
Update mValue using time distance between rendered frames. Return true if anims is finished.
protected override bool UpdateValue(long deltaT, long deltaFromStart)