Thanks for the reply! I want the requestAnimationFrame to be watching a variable simple because there are more factors influencing it during the Life Cycle of the app. It'll be increased over time automatically and different types of interactions will take place so I was considering this hack of tweening, increasing, decreasing and resetting the variable rather than the css property. Just for simplifying things in coding. I am fine with it. The only thing is whether it would influence the performance in a bad way or no.
https://codepen.io/mindfulness/pen/povzgjL
I suck in Codepening but here's the example. The thing is that the cube shall have various ways of interaction like swiping, automove and such so the idea of having one variable changing and the rest done by every frame loop seems quite nice to me, but...