upgrade jsqis to use requestAnimationFrame