phaser/v3/src/snapshot/CanvasSnapshot.js

10 lines
182 B
JavaScript
Raw Normal View History

2017-05-16 19:15:01 +00:00
var CanvasSnapshot = function (canvas)
{
var src = canvas.toDataURL();
var image = new Image();
image.src = src;
return image;
};
module.exports = CanvasSnapshot;