Remember: Run your animations with requestAnimationFrame
Why do you want to start with requestAnimationFrame, instead of passing in a time value?
So use it.
Need a polyfill use this one by +Paul Irish .
- performance.now is not widely supported
- Date.now() may not give you the same format as used by requestAnimationFrame. In fact most cases where requestAnimationFrame is natively supported it doesn't.
- Starting your animation with it insures that it passes in the correct time format.
So use it.
Need a polyfill use this one by +Paul Irish .
Comments