1.5.1 • Published 6 years ago

tweenrex v1.5.1

Weekly downloads
150
License
MIT
Repository
github
Last release
6 years ago

TweenRex

Reactive Tweening Engine

Features

  • Playback controls: play, pause, reverse, playbackRate, seek, labels, etc.
  • Animate anything with render functions
  • Scroll sync any element to an animation, not just the documentElement
  • Simple Reactive API with no strings attached
  • Super tiny with plans to stay that way
  • Free for commercial and non-commerical use under the MIT license

Demos

Documentation

NameDescription
TweenRexAnimate over time with complex choregraphy. Includes sub-tweens, full replay controls, seeking, and playback rate controls.
TyrannoScrollusSync animations to horizontal or vertical scroll position of elements
TRexObservableGeneral Observable for reacting to values over time. BehaviorSubject in RxJs is a close approximation. This is the base class for other types of tweens.

Setup through NPM

Install one or more of the following packages by running this command: npm i {package} -S

PackageStatusDescription
@tweenrex/coreBuild StatusThis package contains TweenRex, TyrannoScrollus, and TRexObservable. It contains all you need for animation at minimum.
@tweenrex/renderBuild StatusThis package contains interpolate and other rendering functions. This package is intended to help reduce boilerplate code and streamline development while creating typical animations.

Setup with Prebuilt scripts

Include one or more of these scripts

LinkDescription
tweenrex.min.jsThis script adds TweenRex, TyrannoScrollus, and TRexObservable to the global window variable. This the a pre-bundled version of @tweenrex/core.
tweenrex-render.min.jsThis script adds interpolate to the tweenrex global window variable. This is a pre-bundled version of @tweenrex/render.
tweenrex-all.min.jsThis script is a combination of all other scripts. This is meant primarily for code playgrounds like CodePen.

Recommended Helper Libraries

TweenRex handles timing and dealing with values over time, but is built to work with other libraries. Here are some recommended helper libraries that match up with TweenRex very well.

NameTypeDescription
Just CurvesEasingA library of reusable easing functions. Includes all Penner easings and functions for creating custom cubic-bezier and step easings. It also can parse all CSS timing functions from a string.
FlubberSVGMorph SVG with this heavy-weight library. This library does a great job of morphing between very different shapes at runtime. It cannot handle holes in SVG, but it has a large arsenal of helper functions. It is about 53 KB minified. This is a good choice when smoothness of animation trumps all other needs.
Path.jsSVGSimple SVG morphing library that can tween between two paths with matching SVG commands and the same number of segments. It is about 4KB minified. This library is a good choice when the SVG's are highly optimized for one another.
PolymorphSVGMorph SVG Paths with this lightweight library. It can support variable length paths in addition to handling holes in SVGs. It is just under 6KB minified. It is a good all around choice for performant morphs of highly variable complex paths.

License

This library is licensed under MIT.

Contributions / Questions

Please create an issue for questions or to discuss new features. There are also plenty of helpful people on the #tweenrex channel on the Animation at Work Slack.

1.5.1

6 years ago

1.4.2

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.9

6 years ago

1.2.7

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago