i using requestanimationframe method animate canvas. unsupported browsers, using polyfill
//i posting code polyfill. //actual code uses methods webkit, mozilla , other browsers if(!window.requestanimationframe){ requestanimationframe = function(callback){ return window.settimeout(callback, 1000/60); } }
my code animation is
//animationcanvas canvas static image of speedometer //drawpointeroncanvas method draw pointer animate = function(context, animationcanvas){ context.drawimage(animationcanvas, 0, 0); drawpointeroncanvas(); requestanimationframe(this.animate); }
i want animate continuously polyfill makes animation random in android os 4.1 , 4.2. requirement similar clock in following mdn link https://developer.mozilla.org/en-us/docs/web/api/canvas_api/tutorial/basic_animations#an_animated_clock
note: actual requirement speedometer. if change speed, should animate point smoothly.
question: there reliable polyfill or fallbacks available? because if use requestanimationframe method, animation smooth. animation random if polyfill used.
edit: checked in ie9 switching through console of ie11, animation smooth. related memory (ram) , processor speed in android devices?