block by veltman 7d893d6f9273e5f920e3

Gif rendering - canvg

Full Screen

Testing in-browser gif generation from an SVG with gif.js and canvg.

Uses canvg to render out each “frame” of the SVG to an in-between canvas, so styling via CSS is still a little iffy. Rendering more directly seems to make more sense. The only upside to this is that the frames can be added synchronously, before the browser paints at all. At the very least, would need to add SVG Crowbar-style traversal with explicit styling in before the canvas conversion.

index.html

gif.js

gif.worker.js