animate

fun Notebook.animate(frames: Iterator<Frame<*>>)

Displays all the frames left in this frames iterator, with respect to the delays.

Parameters

frames

An iterator over Frame elements to be displayed.

Throws

if any thread has interrupted the current thread while the current thread is waiting for the frame delays.


fun Notebook.animate(sequence: Sequence<Frame<*>>)

Displays all the frames in this sequence, with respect to the delays.

Parameters

sequence

A sequence of Frame elements to be displayed.


fun Notebook.animate(iterable: Iterable<Frame<*>>)

Displays all the frames in this iterable, with respect to the delays.

Parameters

iterable

Iterable of Frame elements to be displayed.


fun <T> Notebook.animate(firstFrame: Frame<T>, nextFrame: (Frame<T>) -> Frame<T>?)

Triggers the animation using a chain of frames, beginning with firstFrame and subsequently obtained through the nextFrame function.

Parameters

firstFrame

The first frame of the animation.

nextFrame

Function that takes the current frame and returns the next frame, or null if the animation is finished.


fun Notebook.animate(nextFrame: () -> Frame<*>?)

Triggers the animation sequence consisting of frames that are produced by the nextFrame function.

Parameters

nextFrame

A function that returns the next frame in the animation sequence.


fun Notebook.animate(framesCount: Int, frameByIndex: (index: Int) -> Frame<*>)

Animates a sequence of frames by displaying them with respect to their delays.

Parameters

framesCount

The number of frames to animate.

frameByIndex

A function that maps an index to a frame. The index represents the position of the frame in the sequence.


fun Notebook.animate(delay: Duration, iterator: Iterator<*>)

Animates a sequence of values by displaying them with specified delay. The first value is displayed without a delay.

Parameters

delay

The delay duration between each frame.

iterator

An iterator over the values to be animated.

Throws

if any thread is interrupted while waiting for frame delays.


fun Notebook.animate(delay: Duration, sequence: Sequence<*>)

Animates a sequence of values with a specified delay between each frame. The first value is displayed without a delay.

Parameters

delay

The delay duration between each frame.

sequence

The sequence of frames to animate.


fun Notebook.animate(delay: Duration, nextValue: () -> Any?)

Animates a sequence of values with a specified delay between each frame. The first value is displayed without a delay.

Parameters

delay

The delay duration between each frame.

nextValue

A function that provides the next value in the sequence.


fun <T : Any> Notebook.animate(delay: Duration, firstValue: T?, nextValue: (T) -> T?)

Animates a sequence of values with a specified delay between each frame. The first value is displayed without a delay.

Parameters

delay

The delay duration between each frame.

firstValue

The initial value of the sequence.

nextValue

A function that generates the next value based on the current value in the sequence.

T

The type of the values in the sequence.


fun Notebook.animate(delay: Duration, iterable: Iterable<*>)

Animates an iterable sequence of values, each one (except first) appearing after a specified delay.

Parameters

delay

The time delay to wait before displaying each frame.

iterable

The set of elements to display as animation frames.


fun Notebook.animate(delay: Duration, framesCount: Int, valueByIndex: (index: Int) -> Any?)

Animates a sequence of values with a specified delay between each frame. The first value is displayed without a delay.

Parameters

framesCount

The number of frames to animate.

delay

The delay duration between each frame.

valueByIndex

The function that generates the content of each frame based on the frame index.