src/components/scene/screenshot.js
function () {
    this.canvas.toBlob(function (blob) {
      var fileName = 'screenshot-' + document.title.toLowerCase() + '-' + Date.now() + '.png';
      var linkEl = document.createElement('a');
      var url = URL.createObjectURL(blob);
      linkEl.href = url;
      linkEl.setAttribute('download', fileName);
      linkEl.innerHTML = 'downloading...';
      linkEl.style.display = 'none';
      document.body.appendChild(linkEl);
      setTimeout(function () {
        linkEl.click();
        document.body.removeChild(linkEl);
      }, 1);
    }, 'image/png');
  }
function () {
    this.canvas.toBlob(function (blob) {
      var fileName = 'screenshot-' + document.title.toLowerCase() + '-' + Date.now() + '.png';
      var linkEl = document.createElement('a');
      var url = URL.createObjectURL(blob);
      linkEl.href = url;
      linkEl.setAttribute('download', fileName);
      linkEl.innerHTML = 'downloading...';
      linkEl.style.display = 'none';
      document.body.appendChild(linkEl);
      setTimeout(function () {
        linkEl.click();
        document.body.removeChild(linkEl);
      }, 1);
    }, 'image/png');
  }
function ( ) { this . canvas . toBlob ( function ( blob ) { var fileName = 'screenshot-' + document . title . toLowerCase ( ) + '-' + Date . now ( ) + '.png' ; var linkEl = document . createElement ( 'a' ) ; var url = URL . createObjectURL ( blob ) ; linkEl . href = url ; linkEl . setAttribute ( 'download' , fileName ) ; linkEl . innerHTML = 'downloading...' ; linkEl . style . display = 'none' ; document . body . appendChild ( linkEl ) ; setTimeout ( function ( ) { linkEl . click ( ) ; document . body . removeChild ( linkEl ) ; } , 1 ) ; } , 'image/png' ) ; }
Download capture to file.
Download capture to file .