+ 3

Canvas Animations [SOLVED]

How do I animate this square. I have watched a YouTube tutorial (ChrisCourses) about it and I don't understand why the requestAnimationFrame function is not working. https://code.sololearn.com/Wd8UQuSeaFKC/?ref=app

5th Apr 2019, 5:52 PM
Clueless Coder
Clueless Coder - avatar
3 Réponses
+ 2
to see the animation effect you have to change the position of rectangle each and every time So that you can see that change.. In this program you forgot to call the animate function after the declaration and the position you have fixed that's why you feel difficulty https://code.sololearn.com/Who6EuncW9eZ/?ref=app
5th Apr 2019, 7:29 PM
Prabhat Kumar Singh
Prabhat Kumar Singh - avatar
+ 5
Thanks!
5th Apr 2019, 7:39 PM
Clueless Coder
Clueless Coder - avatar
5th Apr 2019, 7:40 PM
Prabhat Kumar Singh
Prabhat Kumar Singh - avatar