Update recordFrames.md

This commit is contained in:
atomiks
2018-02-25 14:32:23 +11:00
committed by GitHub
parent 206fd7f111
commit b1a76d02b8

View File

@ -2,9 +2,8 @@
Invokes the provided callback on each animation frame.
Use recursion. Provided that `running` is `true`, continue invoking `window.requestAnimationFrame`. Return an object
with two methods `start` and `stop` to allow manual control of the recording. Omit the second argument, `autoStart`,
to implicitly call start when the function is invoked.
Use recursion. Provided that `running` is `true`, continue invoking `window.requestAnimationFrame()` and invoking the
provided callback. Return an object with two methods `start` and `stop` to allow manual control of the recording. Omit the second argument, `autoStart`, to implicitly call `start` when the function is invoked.
```js
const recordFrames = (callback, autoStart = true) => {