# transition-animation

> transition animation

Latest version **1.0.1** (published 2019-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install transition-animation
pnpm add transition-animation
yarn add transition-animation
bun add transition-animation
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-12-06 |
| First published | 2019-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | chenxingyu |
| Maintainers | chenxingyu_o |
| Keywords | easings, animation, transition animation, keyframe animation |

## Links

- npm: https://www.npmjs.com/package/transition-animation
- Repository: https://github.com/chenxingyuoo/transition-animation
- Homepage: https://github.com/chenxingyuoo/transition-animation#readme
- Issues: https://github.com/chenxingyuoo/transition-animation/issues
- npm.io page: https://npm.io/package/transition-animation

## Recent versions

- 1.0.1 (latest) — 2019-12-06
- 1.0.0 — 2019-11-19

## README

# 补间动画库 + easing函数

### 安装
```
yarn add transition-animation
```
或
```
npm install transition-animation
```

### 使用
```js
import ANIMATION from 'transition-animation'
const current = 9
const start = 0
const end = 10
const result = ANIMATION.animation({
  current,
  start,
  end,
  easeFn: ANIMATION.Easing.linear // default
});
// result -> 0.9

const result = ANIMATION.animation({
  current,
  start,
  end,
  form: {
    x: 0,
    y: 0
  },
  to: {
    x: 100,
    y: 200
  }
});

// result -> { x: 90, y: 180}
```

### easing函数
* linear
* easeInQuad
* easeOutQuad
* easeInOutQuad
* easeInCubic
* easeOutCubic
* easeInOutCubic
* easeInQuart
* easeOutQuart
* easeInOutQuart
* easeInQuint
* easeOutQuint
* easeInOutQuint
* easeInSine
* easeOutSine
* easeInOutSine
* easeInExpo
* easeOutExpo
* easeInOutExpo
* easeInCirc
* easeOutCirc
* easeInOutCirc
* easeInElastic
* easeOutElastic
* easeInOutElastic
* easeInBack
* easeOutBack
* easeInOutBack
* easeInBounce
* easeOutBounce
* easeInOutBounce

函数效果查看 http://easings.net

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