> For the complete documentation index, see [llms.txt](https://sparkar-community.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sparkar-community.gitbook.io/docs/animationmodule/timedriver.md).

# TimeDriver

The `TimeDriver` class controls an animation.

## Properties

This module exposes no properties.

## Methods

| Method             | Description                                                                                                                                                                                                                                                                  |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `isRunning`        | <p><code>isRunning(): BoolSignal</code></p><p>Returns a <code>BoolSignal</code> indicating whether the animation is running.</p>                                                                                                                                             |
| `onAfterIteration` | <p><code>onAfterIteration(): EventSource</code></p><p>Returns an <code>EventSource</code> to which you may subscribe. The event fires when the animation with loopCount completes an iteration. Subscribers will receive the one-based index of the completed iteration.</p> |
| `onCompleted`      | <p><code>onCompleted(): EventSource</code></p><p>Returns an <code>EventSource</code> to which you may subscribe. The event fires once when the animation completes.</p>                                                                                                      |
| `reset`            | <p><code>reset(): void</code></p><p>Resets the driver progress to time point zero.</p>                                                                                                                                                                                       |
| `reverse`          | <p><code>reverse(): void</code></p><p>Reverses the animation from the moment it is called and goes back in time.</p>                                                                                                                                                         |
| `start`            | <p><code>start(): void</code></p><p>Starts the animation.</p>                                                                                                                                                                                                                |
| `stop`             | <p><code>stop(): void</code></p><p>Stops or pauses the animation.</p>                                                                                                                                                                                                        |
