animate only when raf is available