Rogo
1
can i do a rect (); animate like that? I tried it for 3 hours but it doesn’t quite work

Rogo
2
I need this without lags

and instead of the right I wanted to take an image like this:
I think what you are trying to achieve is oscilating motion.
Please see