Help | Sololearn: Learn to code for FREE!

+1

Help

Why is the blue cube moving fast? And this is provided that the variable DX is equal to 1, which in the end should not speed up the blue cube so much https://code.sololearn.com/WtGC0dkn9lLw/?ref=app

4/8/2021 12:30:42 PM

Alexander Sokolov

2 Answers

New Answer

+1

because you do not use the timestamp argument available in the callback function function passed in the requestAnimationFrame function call ^^ that's the minimum to handle how fast move anything animated by this way (you cannot expect any animation cross browser/device speed without handling this ;P)

-1

How many age to start this app