Three.js Screenshot

前端 未结 3 1286
梦如初夏
梦如初夏 2021-01-18 04:52

I need to make screenshot of website. I tried using html2canvas and all and it\'s working. But problem is i\'m using THREE.WebGLRenderer and THREE.CSS3DRenderer (for html in

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-18 05:06

    I implemented this feature thanks to the file saver js lib

     
    
    $("#btn_print").click(function() {
        Render.domElement.toBlob(function(blob) {
            saveAs(blob, "Final");
        });
    });
    

    I hope this helps !

提交回复
热议问题