# amator

> Tiny animation library

Latest version **1.1.0** (published 2017-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install amator
pnpm add amator
yarn add amator
bun add amator
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-09-27 |
| First published | 2016-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Author | Andrei Kashcha |
| Maintainers | anvaka |
| Keywords | animation, small, library |

## Links

- npm: https://www.npmjs.com/package/amator
- Repository: https://github.com/anvaka/amator
- Homepage: https://github.com/anvaka/amator#readme
- Issues: https://github.com/anvaka/amator/issues
- npm.io page: https://npm.io/package/amator

## Dependencies (1)

- [bezier-easing](https://npm.io/package/bezier-easing.md) ^2.0.3

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-09-27
- 1.0.1 — 2016-04-09
- 1.0.0 — 2016-04-09

## README

# amator

Tiny animation library.

# usage

``` js
var animate = require('amator')
var from = { x: 0 }
var to = { x: 42 }

// This will animate from.x from 0 to 42 in 400ms, using cubic bezier easing
// function (same effect as default CSS `ease` function)
animate(from, to)
```

Overall the signature of the `animate()` function:

```js
animate(fromObj, toObj, options)
```

## options

This is a hash dictionary with the following keys:

* `duration` - sets animation duration in milliseconds. Default value is 400ms;
* `easing` - Easing function. Can accept predefined value similar to CSS animations:
  `ease`, `easeIn`, `easeOut`, `easeInOut`, `linear`; NOTE: You can also have a
  custom function instead of a string value. The function should take a single
  argument `t` from range [0..1] and return value from 0 to 1.
* `step(fromObj)` - a function callback that is called after each animation frame.
  the only argument to this function is `fromObj` that has current animation values.
* `done()` - a function callback that is called when animation is finished.

## return value

The return value of the `animate` is an object, which has just one key:

* `cancel()` - if you want to cancel animation before it completes, you can call
this method.

# license

MIT

---
_Source: https://npm.io/package/amator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
