CCapture.jsCanvas 动画捕获包
CCapture.js 可以使用固定的帧率实现对网页中 Canvas 的动画进行捕获,录制成视频。CCapture.js 依赖于 Whammy.js 和 gif.js。
示例代码:
// Create a capturer that exports a WebM video var capturer = new CCapture( { format: 'webm' } ); // Create a capturer that exports an animated GIF // Notices you have to specify the path to the gif.worker.js var capturer = new CCapture( { format: 'gif', workersPath: 'js/' } ); // Create a capturer that exports PNG images in a TAR file var capturer = new CCapture( { format: 'png' } ); // Create a capturer that exports JPEG images in a TAR file var capturer = new CCapture( { format: 'jpg' } );
评论