Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for getting output of specific frames #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

affankhan43
Copy link

Just need to use to options for rendering specific frame images

  • @param {object} [opts.startFrame] - Optional lottie-web initialSegment set segment for exporting specific frame
  • @param {object} [opts.endFrame] - Optional lottie-web initialSegment set segment for exporting specific frame

Just need to use to options for rendering specific frame images
* @param {object} [opts.startFrame] - Optional lottie-web initialSegment set segment for exporting specific frame
 * @param {object} [opts.endFrame] - Optional lottie-web initialSegment set segment for exporting specific frame
@@ -69,6 +71,8 @@ module.exports = async (opts) => {
rendererSettings = { },
style = { },
inject = { },
startFrame = 0,
startFrame = 1000000,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
startFrame = 1000000,
endFrame = 1000000,

@amiantos
Copy link

amiantos commented Jan 5, 2021

How would you use this to get a single frame of animation? I'm confused by the -1 you're doing to the endFrame value. If you want frame 0 of the animation, how would you get it in this context? startFrame = 0, endFrame = 1? I dunno if that makes sense to me.

Can you add some tests? Full disclosure, I tried out this solution on my own and it didn't appear to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants