mirror of
https://github.com/photonstorm/phaser
synced 2024-12-25 04:23:30 +00:00
10 lines
182 B
JavaScript
10 lines
182 B
JavaScript
|
var CanvasSnapshot = function (canvas)
|
||
|
{
|
||
|
var src = canvas.toDataURL();
|
||
|
var image = new Image();
|
||
|
image.src = src;
|
||
|
return image;
|
||
|
};
|
||
|
|
||
|
module.exports = CanvasSnapshot;
|