Micro fatina
Micro Tween library for js13k, keep the basic features from Fatina but stripped to the maximum:
- Less than 2KB
- Provides events (
onStarted
,onCompleted
,onKilled
) - Fewer Easings (you can add back the one you need)
- Sequence are replaced by a simple
.append
method to chain them - Well Unit tested
Samples
Tweens
// let's use any type of object to animatevar obj = x: -2000 y: 150 // move the object to a new position in 2 secondsvar t = // use eventstonStartedtonCompleted
Chains
you can chain tweens (here the chain takes 5s)
// append a new move after the first one
or run them in parallel (here the chain takes 3s)
// append a new move after the first oneconst t = tt