puppeteer-lottie icon indicating copy to clipboard operation
puppeteer-lottie copied to clipboard

Output Specific Frame of Animation

Open amiantos opened this issue 4 years ago • 1 comments

  • Adds frame option to output single specific frame.
await renderLottie({
  path: 'fixtures/bodymovin.json',
  output: 'preview.jpg',
  frame: 12,
})

I'm sure there's some cleanup that can be done here to better integrate it into the architecture of this package, but as far as rough working draft that gets the job done, this works for me.

Fixes #40

amiantos avatar Jan 05 '21 02:01 amiantos

After I opened this PR, I saw this other PR trying to do the same thing: https://github.com/transitive-bullshit/puppeteer-lottie/pull/44

I thought their solution looked more flexible since it can be used for video files, but after testing it out, it doesn't seem to work. At least I couldn't get a test to pass.

amiantos avatar Jan 05 '21 02:01 amiantos