asRefreshable

inline fun Animation<Unit>.asRefreshable(fps: Int = 5, crossinline finished: () -> Boolean = { false }): RefreshableAnimation

Convert this Animation to a RefreshableAnimation.

Example

terminal.animation<Unit> {/*...*/}.asRefreshable().animateOnThread()

Parameters

fps

The rate at which the animation should be refreshed.

finished

A function that returns true if the animation has finished.