Continuing the discussion from Free Hype Templates:
@Photics and everyone else who is viewing. I’m continuing the discussion here so that it doesn’t get too bloated in the other post.
So, I believe the open problem was getting around the ability to store the timestamps in an array (I’ll leave out whether this is good or not) and how to “trim” it as Michael has suggested.
Rather than post a solution here I’ll give it some time for you guys to think of how it could be done. I’m sure there are many ways. So, thinking caps on and reply with any suggestions or solutions you can think of
As an example, my first approach will be using the shift() and pop() methods
Just to keep things organised we should use the following convention
var timelist = [];
Good Luck!
@Photics, By the way, why did you add the setInterval when you are already using requestAnimationFrame? I mean, to me it seems redundant. You could just add the setter to the calculating() function.