+ 2

How do we make animations move back and forth

27th Jul 2019, 2:35 PM
GeneralšŸ˜øJAPCat(=^ļ½„ļ½Ŗļ½„^=)
GeneralšŸ˜øJAPCat(=^ļ½„ļ½Ŗļ½„^=) - avatar
3 Answers
+ 9
Thanks to YouTube šŸ‘‡ watch this https://m.youtube.com/watch?v=CZAXucMryxU šŸŽ„ JavaScript Animation Tutorial - Animating a UI with the ...
27th Jul 2019, 4:42 PM
KingDaniel2004
KingDaniel2004 - avatar
+ 4
If you want to move a rectangle back and forth, then you can have a variable representing the current x-axis position of the rectangle and have another variable representing how much to increase the x-axis of the rectangle. If the rectangle is at the edge of the screen to the right, then the variable that represents how much to increase the x-axis position becomes its value in negative form. And if the rectangle is at the edge of the screen to the left, then the variable representing how much to increase the x-axis of the rectangle becomes positive. https://code.sololearn.com/WxB5T8Zbr3YT/?ref=app
27th Jul 2019, 6:15 PM
androidCoder255
androidCoder255 - avatar
+ 2
Thanks
28th Jul 2019, 12:08 AM
GeneralšŸ˜øJAPCat(=^ļ½„ļ½Ŗļ½„^=)
GeneralšŸ˜øJAPCat(=^ļ½„ļ½Ŗļ½„^=) - avatar