title: Three.js - Export a texture as an image
body: <p>I render some part of my scene and I use this as a texture on my object. But now I want to export this texture as an image. Any idea on that?</p>
  
  <p>This is how I create my texture object:</p>
  
  <pre><code>frameTexture = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter});
  </code></pre>
  
  <p>And I assign this texture on my material:</p>
  
  <pre><code>var material = new THREE.MeshBasicMaterial( {map:frameTexture.texture} );
  </code></pre>
  
  <p>And this is how I render it to the texture:</p>
  
  <pre><code>renderer.render(frameScene,frameCamera,frameTexture);
  </code></pre>
  
  <p>Now the question is how to save frameTexture as an image.</p>