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&rt; element and outputs a snapshot of it into the console. It makes debugging the canvas a less dramatic task. See this demo. console.snapshot is a fork of the console.image that implements something useful.
Usage
console.snapshot( <canvas&rt; )
console.snapshot takes in a HTMLCanvasElement, base64 encodes it using toDataURL and then outputs it to the canvas using canvas.image.
var canvas = document.createElement("canvas"),
ctx = canvas.getContext("2d");
// ...
//draw
// ...
console.snapshot(canvas);
console.image( <url&rt; )
console.image outputs and 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%
