How to make animation JS constant (Codepen.io the source)?

There is an example in codepen, which shows the influence of FPS on the perception of the animation. The source code is not mine, but how to make so that the ball does not fall, and jump infinitely, or after the fall started from the beginning, that's fine too. We need any solution in which the animation will go on forever and it will be possible to watch forever.
I would be very grateful to anyone who can help solve the problem.
October 3rd 19 at 01:38
1 answer
October 3rd 19 at 01:40
Solution
Option BOUNCE_DAMPENING put equal to 1. Low FPS is a slowdown due to the inaccuracies of the calculations (you can put BOUNCE_DAMPENING = 1.01 to smooth out inaccuracies).
Thank you, as I understand it has increased height. But that does not stop. Anyway, the decision suitable. - Taryn.Hintz commented on October 3rd 19 at 01:43

Find more questions by tags JavaScript