Search the Community
Showing results for tags 'performance.now'.
Hello & Thanks , From topic : http://w3schools.invisionzone.com/index.php?showtopic=55453#entry304554 I have lots of questions about requestAnimationFrame So I decided to make this question a separate issue : The code size is trimmed way down from the actual running game , to make it easy to follow . Here is the updated function to start and stop animation : How come the 'stop' function doesn't work ? And here is the game loop : Also : Here are my ?s : How come the 'stop' function doesn't work ? Why is it so slow ? I have tried several speeds , but always , soooo slow . And this really puzzles me : I can increase the speed by simply clicking the 'start' button repeatedly . Though , I suppose I could add another 'start' button and call it 'Increase Speed' button I would rather use the methods (timestamp & performance.now) here : and here : But I can't piece it all together , to make it work . I would like some help with this also . Thanks