by jz

add requestAnimationFrame method when possible.