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

# eaz

## Use Predefined Easing Functions

Using predefined easing functions is as simple as referencing a static property of the **`Easing`** class.

```javascript
import { Easing } from 'eaz';

Easing.cubic.in(0.3); // Output: 0.0269
```

{% hint style="info" %}
Every **`Easing`** object contains an in, out, and inOut method, and more options. Refer to the documentation for th&#x65;**`Easing`** class for more information.
{% endhint %}

## Create Custom Easing Functions

Use eaz's generational methods to create custom easing functions quickly

```javascript
import { Easing } from 'eaz';

Easing.polynomial(2.5).in(0.3); // Output: 0.0493
```

Or create entirely custom easing methods from scratch

```javascript
import { Easing } from 'eaz';

const myEasing = new Easing(t => t ** 2.5);
myEasing.in(0.3); // Output: 0.0493
```

## Easily Generate Demo Images

Generate images to test your easing functions

{% tabs %}
{% tab title="JavaScript" %}

```javascript
import { Easing, DemoImage } from '../index';

DemoImage.inOut(Easing.cubic, 'images/cubicInOut.png');
```

{% endtab %}

{% tab title="Output" %}

#### images/cubicInOut.png

![](/files/-MFKsVAg6w3Hdkt5ndgo)

###

{% endtab %}
{% endtabs %}
