I am working on a Three JS application with a CSS 3D Renderer, using the html2canvas library to capture screenshots of the document.body.
Unfortunately, the issue arises when the screenshot doesn't include the CSS 3D Renderer.
Below is the code snippet used for capturing the screenshot:
window.addEventListener("keyup", function(e){
//Listen for the 'P' key press
if(e.which !== 80) return;
html2canvas(document.body, {
onrendered: function(canvas) {
var img = canvas.toDataURL();
window.open( img , 'Final' );
}
});
});
To see a demonstration, please visit:
and
Note: Press the 'P' key to take a screenshot (Disable any pop-up blockers).
Thank you