Class: AnimatedFlowSource

olympe.df. AnimatedFlowSource

An AnimatedFlowSource is a FlowSource that creates a data flow that smoothly transitions, over the specified duration, to the new value when it is updated.

Example:

const animatedAngle = new olympe.df.AnimatedFlowSource(200, olympe.df.ONumber.EASING.EaseOutQuad);
olympe.df.if(isCollapsedFS.getFlow(), () => animatedAngle.update(0), () => animatedAngle.update(90));

Creates a data flow that smoothly transition between 90 and 0 degrees over a 200 milliseconds period.


new AnimatedFlowSource(duration [, easingFunction])

Creates an AnimatedFlowSource based on the provided easing function.

Parameters:
Name Type Argument Default Description
duration olympe.df.PONumber | number

The duration in milliseconds.

easingFunction olympe.df.ONumber.EASING <optional>
olympe.df.ONumber.EASING.LinearTween

The optional easing function.

Extends

Methods


getFlow()


onDone(callback)

Sets the callback to be triggered each time the transition to the new value is complete.

Parameters:
Name Type Description
callback olympe.df.ONumber.AnimateCallback

The callback to trigger.

Returns:

This AnimatedFlowSource.

Type
olympe.df.AnimatedFlowSource

setEasing(animationFunction)

Sets the easing function for that AnimatedFlowSource.

Parameters:
Name Type Description
animationFunction olympe.df.ONumber.EASING
Returns:

This AnimatedFlowSource.

Type
olympe.df.AnimatedFlowSource