Closed fleduc closed 7 years ago
You should only call gif.render
once you're done adding frames.
Then you should receive a finished
event when it's done.
window.open
might need to be called during a user action such as a click
though, so as not to be blocked.
Try adding a console.log
to see if you are actually getting the finished
event.
You could go with an in-page popup, or you could add a link to the page with target="_blank"
or download="creation.gif"
Thanks!
I didn't catch that this render was to be executed only when all frames were added, since I'm working with three.js which render's must be called on every frame... ;-)
Thanks again
My implementation of gif creator is controlled by an other process loop. I have declared gif this way:
I'm processing all frames (around 300) and add them to gif:
gif.addFrame(context, {copy: true});
Then when I'm finished, I nee to have my Gif animation opened in an other window, but don't know how trigger the "finished" event.
Any help please