I am working on an HTML5 game, and it's about rotating a div element constantly and adding elelments to it.
I am noticing that the rotation is not as smooth and regular as it should be, sometimes little jumps can be noticed.
I was using a setInterval with a rotate transformation to create the effect, but it was really bad and unstable. Then I changed the code to use the requestAnimationFrame, which goes much better but still not perfect, and limits the speed control.
I am also using this CSS code to pass the animation processing to the GPU:
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
perspective: 1000;
-webkit-transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-perspective: 1000;
Does somebody know what else can I do to improve the animation? It looks like simple and one time animations are ok with cordova, but when we need to make some element be animated constantly the performance is not really good.