# Functions

The component Animation allow you to use 3 functions and 3 events.

### Fucntions

These three functions are made to initiate or update values during your animation.

* onPlay : often use to initiate values at the beginning, this function is call when your animation gonna start
* onUpdateAnim : use to change values during your animation. This function is the only function call when your animation is playing.
* onResetAnim : useful if your animation is in loop mode. This function is made to initiate values after playing.

### Events

* getOnStart : Events::EventAction called automaticaly once during onPlay
* getOnEnd : Evetns::EventAction called when your animation ended BUT not in loop mode
* getOnRestart : Events::EventAction called when your animation restart

{% hint style="warning" %}
getOnRestart : available only when animation is in loop mode
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kap35.gitbook.io/kap-engine-wiki/user-manual/animations/animation/functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
