anime icon indicating copy to clipboard operation
anime copied to clipboard

add limit to `getDuration()` in `spring` function to avoid infinite loops

Open okikio opened this issue 2 years ago • 1 comments

The way the getDuration() method in the spring() function is setup it doesn't have any way of stopping an infinite loop. I added a INTINITE_LOOP_LIMIT of 10,000 to stop possible infinite loop situations.

okikio avatar Jan 17 '22 21:01 okikio

After re-looking though the problem I've determined that the issue I had doesn't require an infinite loop limit, I still believe we should apply a loop limit to the getDuration() method, but it's not required for my problem.

If you'd like to see the problem I aiming to fix, here is a Codepen, https://codepen.io/okikio/pen/GRMeapZ?editors=0010

cc @RafaelKr

okikio avatar Jan 17 '22 22:01 okikio