update API
requestAnimationFrame support, fixes #1