# tween.js JavaScript (TypeScript) tweening engine for easy animations, incorporating optimised Robert Penner's equations. [![NPM Version][npm-image]][npm-url] [![CDNJS][cdnjs-image]][cdnjs-url] [![NPM Downloads][downloads-image]][downloads-url] [![Build and Tests][ci-image]][ci-url] More languages: [English](./README.md), [简体中文](./README_zh-CN.md) --- ```html
``` [Try this example on CodePen](https://codepen.io/trusktr/pen/KKGaBVz?editors=1000) # Features - Does one thing only and does it well: tweens properties of an object - Doesn't take care of CSS units (e.g. appending `px`) - Doesn't interpolate colors - Easing functions are reusable outside of Tween - Can also use custom easing functions - Doesn't make its own animation loop, making it flexible for integration into any animation loop. # Examples
|
hello world (source) |
|
Bars (source) |
|
Black and red (source) |
|
Graphs (source) |
|
Simplest possible example (source) |
|
Video and time (source) |
|
Array interpolation (source) |
|
Dynamic to, object (source) |
|
Dynamic to, interpolation array (source) |
|
Dynamic to, large interpolation array (source) |
|
Repeat (source) |
|
Relative values (source) |
|
Yoyo (source) |
|
Stop all chained tweens (source) |
|
Custom functions (source) |
|
Relative start time (source) |
|
Pause tween (source) |
|
Complex properties (source) |
|
Animate an array of values (source) |
](https://lume.io)
[](https://aframe.io)
[](http://www.moma.org/interactives/exhibitions/2012/inventingabstraction/)
[](http://www.chromeweblab.com/)
[](http://5013.es/toys/macchina)
[](http://egraether.com/mine3d/)
[](http://ro.me)
[](http://data-arts.appspot.com/globe)
[](http://www.androidify.com/)
[](http://thewildernessdowntown.com/)
[](http://dejavis.org/linechart)
[npm-image]: https://img.shields.io/npm/v/@tweenjs/tween.js.svg
[npm-url]: https://npmjs.org/package/@tweenjs/tween.js
[downloads-image]: https://img.shields.io/npm/dm/@tweenjs/tween.js.svg
[downloads-url]: https://npmjs.org/package/@tweenjs/tween.js
[ci-image]: https://github.com/tweenjs/tween.js/workflows/build%20and%20tests/badge.svg?branch=master
[ci-url]: https://github.com/tweenjs/tween.js/actions
[cdnjs-image]: https://img.shields.io/cdnjs/v/tween.js.svg
[cdnjs-url]: https://cdnjs.com/libraries/tween.js