Thanks for your reply. The gif.js or any canvas-capture lib need animation duration. May I know how can I get or calculate the duration of each animation in the JSON file?
Edit: I knew how to get the animation duration.
FYI, the capture canvas seems not the best solution to render GIF in the browser because it depends on the time you start and stop the record, and it may not be from the start of the animation cycle. As a result, the exported GIF is not the same for each render. Sometimes there is a blink in the image; some don't.
I am still looking for the solution to use Spine cmd to export GIF animation from the file on the modified JSON file