# tween-objects

> tween object and arrays of objects

Latest version **1.0.2** (published 2016-02-01) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-02-01 |
| First published | 2014-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | tweenr, ticker, tween, ticker, animation, animate, anim, object, array |

## Links

- npm: https://www.npmjs.com/package/tween-objects
- Repository: https://github.com/mattdesl/tween-objects
- Issues: https://github.com/mattdesl/tween-objects/issues
- npm.io page: https://npm.io/package/tween-objects

## Dependencies (5)

- [an-array](https://npm.io/package/an-array.md) ^1.0.0
- [inherits](https://npm.io/package/inherits.md) ^2.0.1
- [lerp-array](https://npm.io/package/lerp-array.md) ^1.1.1
- [tween-base](https://npm.io/package/tween-base.md) ^2.1.0
- [own-enumerable-keys](https://npm.io/package/own-enumerable-keys.md) ^1.0.0

## 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.0.2 (latest) — 2016-02-01
- 1.0.1 — 2014-12-06
- 1.0.0 — 2014-12-05

## README

# tween-objects

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Tweens an object or an array of objects, operating on numbers and [array types](https://www.npmjs.org/package/an-array). [tweenr](https://www.npmjs.org/package/tweenr) uses this tween by default, since it is the most common case.

```js
var Tween = require('tween-objects')

var elements = [
    { opacity: 0 },
    { opacity: 0, position: [0, 0] }
]

var tween = Tween(elements, { duration: 1, opacity: 1, position: [5, 10] })
        .on('complete', handler)
tween.tick(0.5)

console.log(elements[0].opacity)  // -> 0.5
console.log(elements[1].position) // -> [2.5, 5]
```

## Usage

[![NPM](https://nodei.co/npm/tween-objects.png)](https://nodei.co/npm/tween-objects/)

#### `tween = ObjectTween(element, opt)`

Creates a new tween where `element` is an object or an array of objects. 

## License

MIT, see [LICENSE.md](http://github.com/mattdesl/tween-objects/blob/master/LICENSE.md) for details.

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