mirror of
https://github.com/photonstorm/phaser
synced 2025-01-12 21:28:53 +00:00
9 lines
182 B
JavaScript
9 lines
182 B
JavaScript
var CanvasSnapshot = function (canvas)
|
|
{
|
|
var src = canvas.toDataURL();
|
|
var image = new Image();
|
|
image.src = src;
|
|
return image;
|
|
};
|
|
|
|
module.exports = CanvasSnapshot;
|