CCapture.js
A library to capture canvas-based animations at a fixed framerate
...The library supports multiple export formats including WebM, GIF, PNG sequences, and JPEG archives, making it flexible for different workflows. It integrates easily into browser-based creative coding environments like Three.js and p5.js, making it especially valuable for artists and developers producing generative visuals.