title: How can Iset WebGL camera aspect ratio to canvas (window) aspect ratio?
body: <p>I've made my webGL content fill the browser window using:</p>
  
  <p>css:</p>
  
  <pre><code>canvas
    {
      float: left;
      width: 100%;
      height: 100%;
    }
  </code></pre>
  
  <p>And also:</p>
  
  <pre><code>function webGLStart() {
      var canvas = document.getElementById("cool3D");
      canvas.width  = window.innerWidth;
      canvas.height = window.innerHeight;
      ...
  </code></pre>
  
  <p>So far, this is effective for maintaining full coverage, no matterthe size of the window or fullscreen. The problem is assigning the aspect ratio of the camera to avoid distortion.</p>
  
  <p>How can I set it to ~"window.innerWidth/window.innerHeight"? OnWindowResize?</p>