Screenshot using html2canvas in Krpano

  • I'm trying to take a screen shot that captures all elements within a panoramic, hotspots, polygon hotspots, text etc..

    I have tried the plugin on the plugin page, but it doesn't capture all the elements I want

    I am using html2canvas and canvas.toblog to out put a jpg

    but when I output I get text, and skin element but the scene and lines/polygons do not appear.

    The embedded pano has these settings
    html5:"only+webgl", webglsettings:{preserveDrawingBuffer:true}


    anyone got any ideas, I'm using the script below to take the screenshot...


    <script>
    document.querySelector(".print-btn").addEventListener("click", function() {
    html2canvas(document.body).then(function(canvas) {
    canvas.toBlob(function(blob) {
    saveAs(blob, "screenshot.jpeg");
    }, "image/jpeg");
    });}, false);
    </script>

    Attached are the the output and what it should look like

  • Hi,

    the pano-image and the hotspots are WebGL content and polygonal hotspots are currently SVG (but soon also WebGL) - and html2canvas might not have WebGL or SVG support.

    You could eventually try to capture the WebGL content as show here:
    Generate snapshot of current view serverside
    and then to mix the webgl image somehow (?) with the html/css image from html2canvas...

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!