The snapshot is not clear enough

Hi All,

I tried to take a snapshot by this code :

    html2canvas(c).then(async (canvas) => {  
        var image = canvas.toDataURL().replace("data:image/png;base64,", "");}

But the resolution is not good enough to view the details, especially when I zoom in on some details.

Can I do it in another way to make it more clearly?

  1. How that related to three.js :smiling_face_with_tear: ?
  2. html2canvas doesn’t seem to be maintained for the past 2 years - a bit risky to use it, unless you plan on maintaining it personally.
1 Like

Hi @mjurczyk ,
Thank you for your answer,
I asked to get another way to do it, if the question is not good I will delete it.

html2canvas has it’s own documentation you can read.

But, you don’t need to use it.
You can copy straight from the canvas that the renderer is updating


Found a nice repo to solve this: GitHub - taseenb/THREE.Highres: High resolution and depth rendering to PNG for Three.js

1 Like