Is there a way to combine multiple Lottie animations into a single one? I tried https://github.com/LottieFiles/lottie-js but failed. Above lib offers good enough API to manipulate existing elements, but doesn't allow to combine aniamtions. Are there any other javascript libraries that may achieve this?
If you want to play animations in a sequence, one after the after when they finish you could use Lottie-Interactivity. One of the modes allows you to play animations in a sequence, even loading them from a URL so you won't have to stick the animations together manually, heres a section from the LottieFiles website explaining how to set it up: https://lottiefiles.com/interactivity#chainLoadExample
Using that library your setup would look like this:
LottieInteractivity.create({
player: '#chainLoadPlayer',
mode: 'chain',
actions: [
{
state: 'autoplay',
transition: 'onComplete',
path: 'URL'
},
{
state: 'autoplay',
transition: 'onComplete',
path: 'URL'
},
{
state: 'autoplay',
transition: 'onComplete',
path: 'URL',
reset: true
}
]
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With