Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

looping #50

Closed
juancabrera opened this issue Jan 5, 2016 · 3 comments
Closed

looping #50

juancabrera opened this issue Jan 5, 2016 · 3 comments

Comments

@juancabrera
Copy link

I don't think is possible to do it right now, but would be great to being able to loop just a part of the animation, not the whole thing. I currently have a flag animation that rises and them it waves. I think would be better to being able to loop just the "waving" part of the animation instead of having 2 different animations and loop just the second one.

Does it makes sense ?

@bodymovin
Copy link
Collaborator

@juancabrera yes, absolutely. That way you don't need to load information twice.
You can do it right now:
set loop in true
and then, once the animation is loaded, set
anim.playSegments([[0,20],[21,80]],true)
where [0,20] would be the first segment and [21,80] the second, both in frames.
if you need any help, let me know.

@juancabrera
Copy link
Author

@bodymovin that worked perfectly! Thanks!

@ghost
Copy link

ghost commented May 4, 2017

Can we loop some segments and not loop some segments
Have a small functionality with http://www.lottiefiles.com/73-submit-confirmation
Want the middle animation stay till the task is complete and then fire the next segment

Rusino added a commit to b-wils/lottie-web that referenced this issue Jul 11, 2024
Leading/trailing spaces are still a problem.
Tests airbnb#45 & airbnb#50.
4 tests fail on caught exception outside of the shaper: airbnb#13, airbnb#22. airbnb#36, airbnb#44.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants