UNPKG

@creenv/capture

Version:

Creenv Capture allows you to export your work as a video file, in the easiest possible way

23 lines (20 loc) 469 B
/** * @license MIT * @author Baptiste Crespy * * Intanciation a new class will result in the creation of an image from the canvas passed as argument */ import BlobDownload from "./blob-download"; class Screenshot { /** * saves a PNG of the canvas sent as parameter * * @param {HTMLCanvasElement} canvas */ constructor (canvas) { canvas.toBlob(blob => { new BlobDownload(blob, "capture.png"); }); } } export default Screenshot;