es6-tween
- High-performant animations without headaches
- Simple, modular and functional animation library for web and node
- Tweening library that needs to use where performance matter
- Flexible, extendable, modular and resource-efficient tweening library
Note
This project is now entering into maintaining mode as no support from community and i don't have enough time to keep this project alive, maintain and add features. Bug-fixes also will be stopped. PR's are welcome.
You can make this project alive again with support by became Patron
See "My Patreon" page "Goals" section for more info
Frameworks
Docs
TWEEN; // simplify the your code let coords = x: 0 y: 0 ;let tween = coords start;
Plugins
Starting at v3
, we provide excluded plugins from core, so our core becomes lighter and faster. Here our plugins list
Demos
- Demo #1 Morphing SVG Shape + Cross-browser SVG Transform
- Demo #2 Morphing SVG Shape
- Collection on the Codepen
Installation
Download the library and include it in your code:
CDN-Hosted version
-
See cdnjs-hosted version for get which result you want
-
NOTE:
@latest
suffix sometimes saves life by loading latest, because sometimes CDN services will not load the latest -
Now you can load from CDN
<!-- jsDelivr --> <!-- unpkg --> <!-- npmcdn -->
More advanced users might want to
import
Using ;
getlibs
Using
npm
or yarn
Using $ yarn add es6-tween# or $ npm install es6-tween
Then include the Tween.js module with the standard node.js require
:
const Tween Easing autoPlay = ;
And you can use Tween.js as in all other examples--for example:
const t = /* etc */;tstart;
You can run script commands to build modules into single UMD
compatible file:
Using commands
$ yarn build # builds production files # or $ yarn dev # builds and watchs development files
Then reference the library source:
Features
- Tweens everything you give them, string, number, number of arrays, number of object, all-to, interpolators and much more. Endless possibilites
- Can use CSS units (e.g. appending
px
) - Can interpolate colours
- Easing functions are reusable outside of Tween
- Can also use custom easing functions
- Much of easings
Compatiblity Testing
Thanks to BrowserStack for providing us testing in a real devices to make it cross-browser, bug-free and better. BrowserStack saved my countless hours, before i spent on testing much of time, now it's very easy. I recommend to others use this service. I sure, BrowserStack helps us to make it, so i am linking to BrowserStack as our sponsor.
Tests
yarn test
or you can go here for more information, tests and etc...
every time you want to run the tests.
If you want to add any feature or change existing features, you must run the tests to make sure you didn't break anything else. If you send a PR to add something new and it doesn't have tests, or the tests don't pass, the PR won't be accepted. See contributing for more information.
People
Thanks to
these tools developers and to their community and without these tools maybe this library wouldn't be possible
- GitHub
- Travis CI
- BrowserStack
- Node.js
- ESLint
- jsDoc (docdash theme)
- Rollup
- Babel
- Ava
- Puppeteer
- UglifyJS v3
- Husky
Projects using es6-tween
- ft
- react-heartwood-components
- el-controls
- lightweight-pixijs-engine
- vue-sliderx
- vue-mapbox-feature
- vuxtras
- Slye
- react-3d-globe
It's great to see this library to be used in production and/or library, thank you!
If you have projects using es6-tween, please make issue or PR, i will add here your project too :)