# micro-tween

> timmed down, commonjs version of sole/tween

Latest version **0.0.1** (published 2015-10-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install micro-tween
pnpm add micro-tween
yarn add micro-tween
bun add micro-tween
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-10-28 |
| First published | 2015-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joseph Clay |
| Maintainers | hps |

## Links

- npm: https://www.npmjs.com/package/micro-tween
- Repository: https://github.com/JosephClay/micro-tween
- Homepage: https://github.com/JosephClay/micro-tween#readme
- Issues: https://github.com/JosephClay/micro-tween/issues
- npm.io page: https://npm.io/package/micro-tween

## Recent versions

- 0.0.1 (latest) — 2015-10-28

## README

# micro-tween

A trimmed down, commonjs version of [sole's tween.js](https://github.com/tweenjs/tween.js/)

`npm i micro-tween`

### notable changes

Easing functions are located in `micro-tween/ease` to be required in to save on file size. Polyfills for `window.performance.now` have been removed in favor of `Date.now`.

Additional removals:
* no interpolation
* no string relative values
* no safety checks
* no `this` context in functions, use passed object
* no constructor function
* no `getAll`/`removeAll` tweens

Everything else should work!

### Example
```js
var tween = require('micro-tween');
var elasticInOut = require('micro-tween/ease/elasticInOut');

tween({ x: 0 })
    .to({ x: 100 })
    .yoyo()
    .repeat(2)
    .ease(elasticInOut)
    .onStart(function() {
        console.log('start');
    })
    .onUpdate(function(value) {
        console.log('value: ', value.x);
    })
    .onComplete(function() {
        console.log('complete');
    })
    .start();

var tick = function() {
  tween.update();
  requestAnimationFrame(tick);
}
```

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