Define a set number of loops?
See original GitHub issueHi,
I’m new to lottie/bodymovin and not very fluent in JS. So I would love to get a bit of help getting my animation to run twice (or loop once if you like) – or preferably a way to define a set amount of loops.
Javascript:
var animation = bodymovin.loadAnimation({
container: document.getElementById('animation-test'),
renderer: 'svg',
loop: false,
autoplay: true,
path: 'data.json'
})
This works as expected, and it runs once.
Is there a way to define a set amount of loops?
Thank you!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Looping a Set Number of Times - FutureLearn
You can do this by adjusting the way you use a for loop. To do something five times, you could create a for...
Read more >For Loops: Repeating Operations a Set Number of Times - NI
A For Loop executes the section of code inside the loop, called a subdiagram, a set number of times. The count (N) terminal...
Read more >Function with varying number of For Loops (python)
I want to create a function that contains nested for loops, the amount of which is proportional to an argument passed to the...
Read more >19. For Loops | Python Tutorial
This kind of for loop iterates over an enumeration of a set of items. It is usually characterized by the use of an...
Read more >For loop with range - Learn Python 3 - Snakify
The last number is not included. There's a reduced form of range() - range(max_value) , in which case min_value is implicitly set to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

you can pass a number to the loop param instead of
false.