A JavaScript/TypeScript tweening engine for animating object properties with optimized easing functions.
tween.js is a JavaScript and TypeScript library that enables smooth animations by interpolating the numeric properties of objects over time. It solves the problem of creating complex, timed transitions in web applications without being tied to a specific rendering engine or framework. Developers use it to animate anything from DOM element positions to custom data values with precise control over duration and easing.
Frontend developers and creative coders building interactive web experiences, data visualizations, games, or UI animations who need a lightweight, framework-agnostic animation engine. It's also suitable for developers working with libraries like Three.js for 3D animations.
Developers choose tween.js for its simplicity, performance, and flexibility—it provides a minimal API focused solely on tweening, integrates with any animation loop, and includes optimized easing functions. Unlike heavier animation suites, it doesn't lock users into a specific ecosystem, making it ideal for custom or low-level animation needs.
JavaScript/TypeScript animation engine
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Adheres to the Unix philosophy by solely tweening numeric object properties, avoiding bloat from rendering or unit management, as stated in the README.
Does not impose its own animation loop, enabling seamless use with requestAnimationFrame or custom loops, demonstrated in the example code requiring manual setup.
Incorporates Robert Penner's equations for natural motion curves, which are reusable outside of tweens and support custom easing, as highlighted in the features.
Methods like .to() and .easing() can be chained for declarative configuration, making the code readable and straightforward, as shown in the initial example.
Explicitly does not handle CSS units or color interpolation, requiring developers to manually update styles or properties, adding extra boilerplate code.
Users must implement their own animation loop with requestAnimationFrame, increasing setup complexity compared to libraries with automatic updates.
Lacks plugins or community extensions for advanced features like physics-based animations or complex sequencing, relying on user-implemented solutions.
The README notes that UMD and CommonJS builds are deprecated and will be removed, potentially causing migration issues for legacy projects.