mirror of
https://github.com/adriancooney/console.snapshot.git
synced 2025-12-08 21:26:19 +00:00
console.snapshot( canvas )
Snapshot a canvas and output it to the console.
console.snapshot takes and inputted <canvas> element and outputs a snapshot of it into the console. It makes debugging the canvas a little less dramatic. See this demo. console.snapshot is a fork of the console.image and actually does something useful.
Usage
console.snapshot( <canvas> )
console.snapshot takes in a HTMLCanvasElement, base64 encodes it using toDataURL and then outputs it to the canvas using console.image.
var canvas = document.createElement("canvas"),
ctx = canvas.getContext("2d");
// ...
//draw
// ...
console.snapshot(canvas);
console.image( <url> )
console.image outputs an image from a url into the console. See console.image.
console.image("http://i.imgur.com/wWPQK.gif");
License: MIT
Description
An actual useful fork of the console.image. Snapshot the canvas and output it to the console.
Languages
JavaScript
61%
HTML
39%
