Babylon canvas to IMG


I used before “createScreenshot” (works greate) but I need to pass that screenshot to an img. Is there a way to achieve that?

Thank you.


Tools.createScreenshot accepts a callback passing in a base64 image url that you can directly set to img.src:


Thanks DK, I’ll check it


Thanks Deltakosh, I used the rendertarget option and it works fine on web.