How to save a texture localy as a image

I’m currently working with 8th wall in playcanvas.

I want to take a screenshot and save it to the local system. for achieving it I am sending a screenshot request to 8thWall engine using ‘xr:screenshotready’ event and receiving it in a dom Image element from where I am able convert it into a texture. now, what I should do to give user the option to save it locally.


Hi @Shubham_D and welcome,

You can use any regular Javascript method or library to download an DOM image element, no need to push it to a Playcanvas texture.

Here is a Javascript library that makes it easy: