Open glumb opened 9 years ago
I discovered, that it works, if we use the toDataUrl
method which was removed in a8a03b40aa0cc1a822291aa6538efcd5f27b3de9
Can you give an example of how you got this to work. I am struggling to export the canvas to an image.
Hey @stuarteaton, add the method a8a03b40aa0cc1a822291aa6538efcd5f27b3de9 back to the source and try something like this:
that.renderingCanvas = fx.canvas();
that.renderingCanvas.draw(texture).perspective( //or any other transform
[0, 0, w, 0, 0, h, w, h],
points
).update();
that.renderingCanvas.toDataURL()
Hi @glumb,
I am also facing the same issue and I'm using npm package of glfx.js with react where exactly should I add metthod back to the source
that.renderingCanvas = fx.canvas(); that.renderingCanvas.draw(texture).perspective( //or any other transform [0, 0, w, 0, 0, h, w, h], points ).update(); that.renderingCanvas.toDataURL()
I'm trying to export an image from the canvas using
canvas.toDataURL()
. This does not work for me on Chrome nor Firefox. Also the 'canvas.toDataURL.html' test does not show a second exported image.How to export or save a screenshot of the canvas the right way?