__smm_static_temp_content__

Methods

animate(options?)

Starts the animation. Can be called with optional parameters:

animate(options?: { iterNumber?: number; singleFrame?: boolean })

play()

Resumes a paused animation from its current position.

pause()

Pauses the animation at the current frame. Call .play() to resume.

stop()

Stops the animation and resets progress to 0. The callback is not called when stopped via interruption.

renderFrame(frameNumber?)

Renders a specific frame. If no argument is given, renders the next frame based on current progress.

renderFrame(frameNumber?: number)

getProgress()

Returns the total progress as a percentage of all iterations.

getProgress(): number

setProgress(percentage)

Sets the total progress to a specific percentage.

setProgress(percentage: number): void

getCurrentIterationProgress()

Returns the progress of the current iteration only (a whole iteration = 100%).

getCurrentIterationProgress(): number

setCurrentIterationProgress(percentage)

Sets the progress of the current iteration without affecting the iteration count.

setCurrentIterationProgress(percentage: number): void