Timeline for Simple animation method with requestAnimationFrame code structure
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 9, 2015 at 20:51 | comment | added | Flambino |
@lolol You can have both, but I'd recommend setTimeout for that. Set the timeout to match the desired frame timing, but still use the overall delta time (i.e. since the start) to determine progress and whether the animation's complete.
|
|
Oct 9, 2015 at 17:07 | comment | added | lolol | the idea behind it to keep as close as possible of the desired fps and duration. with non marginal values the function does that pretty well. but you have a point, i will think more about it. | |
Oct 9, 2015 at 14:12 | comment | added | lolol | sorry, i did some code updates and forgot to update the usage. | |
Oct 8, 2015 at 22:45 | history | answered | Flambino | CC BY-SA 3.0 |