HTML canvas animation inside application



I was wondering if it is possible to create smooth animations on HTML canvas included in Ionic app. I am using <canvas> with render loop in javascript using requestAnimationFrame(). It works very nicely when debuging on my PC, but when I put the app on my Android phone, the animation is far from smooth.

I am wondering if this is general problem with canvas animations in mobile browsers or maybe it is a problem with such animations in Ionic app. Maybe there is some trick I don’t know that would make the animation smoother?

The animation I am trying is just moving rectangle from one place to another (fillRect(), clearRect()) - nothing sophisticated.

Thanks in advance for any suggestions!