I've had a quick peek at the source code. Do you exclusively use requestAnimationFrame for the animations? I noticed you also have setTimeOut as well but I wasn't sure if you use that as well.
Also what are your thoughts on using a service worker for off the main thread animations?
So the animations use requestAnimationFrame - the key thing being to use generators to create imperative for next loops in that case.
The processing stuff uses requestIdleCallback. I polyfill that in a variety of ways.
The problem with other threads is the effort of moving things to and from them, so if the animation was basically a ton of processing that resulted in something simple and small enough to move then it would work. I'm thinking some kind of complex particle simulation or 3d work.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Very cool!
I've had a quick peek at the source code. Do you exclusively use requestAnimationFrame for the animations? I noticed you also have setTimeOut as well but I wasn't sure if you use that as well.
Also what are your thoughts on using a service worker for off the main thread animations?
So the animations use requestAnimationFrame - the key thing being to use generators to create imperative for next loops in that case.
The processing stuff uses requestIdleCallback. I polyfill that in a variety of ways.
The problem with other threads is the effort of moving things to and from them, so if the animation was basically a ton of processing that resulted in something simple and small enough to move then it would work. I'm thinking some kind of complex particle simulation or 3d work.