question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library independence.

See original GitHub issue

Currently anime.js creates it’s own animation loop with requestAnimationFrame, which makes it undesirable to add anime.js to an existing project that has it’s own loop in which it produces it’s own time stamps.

For example, suppose we have a game that makes it’s own loop (with requestAnimationFrame, or something else in some other JS engine…). In order for anime.js to be integrated into that custom loop, it would be nice for anime.js API to accept a timestamp that was created outside of anime.js.

For a real-world example of an API that is independent in this fashion and can be placed into any existing animation/game loop, see Tween.js. Note in particular the .update() method of the Tween class.


But! it would also be nice if the anime.js API was able use requestAnimationFrame in cases where the developer doesn’t already have their own loop. That’s something both anime.js and tween.js don’t do yet, which would be nice (having both forms of API for both crowds somehow)!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rohan-deshpandecommented, Aug 24, 2017

Understand that this is closed, but this would be an excellent feature, I’m currently using anime in my threejs powered game engine but I am about to consolidate all raf calls into the game loop and, if I understand correctly, this is impossible with anime. A real shame because I wouldn’t like to drop anime if I didn’t have to. Once I do the consolidation I’ll have a look under the hood and see what I can do.

1reaction
ngokevincommented, Jul 22, 2016

Working on A-Frame, a WebVR framework. Just looking for a way to hook into the existing game loop (without introducing anime into the core library), and a way for anime to not create any requestAnimationFrames. Like tween’s global TWEEN.tick method.

Thanks for the library though! It exploded. If I get around to it, I can see if I can help out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Independence | Chicago Public Library
Independence Branch is in the Irving Park neighborhood on Chicago's Northwest Side.
Read more >
Independence Library
Independence Branch opened on February, 28, 2001. The library serves as a community center for Chinatown and the other nearby neighborhoods.
Read more >
Library | The City of Independence Oregon - Official Website
Address: 175 Monmouth St. Independence, OR 97351 ; Telephone: 503-838-1811 ; Email: library@ci.independence.or.us.
Read more >
Independence Regional | Charlotte Mecklenburg Library
Located across from East Mecklenburg High School at the corner of Monroe Road and Conference Drive, the 18,700 sq. ft. library is large...
Read more >
North Independence | Mid-Continent Public Library
North Independence. 317 W. 24 Hwy. Independence, MO 64050 (816)252-0950. Branch Manager: Andrew Phillips. NI_Librarian@mymcpl.org.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found