title: Z-Axis Coordination in WebGL and Three.js
body: <p>I'm experimenting with WebGL and Three.js,
  But how to calculate the Z-Axis coordination while moving mouse?</p>
  
  <p>I use this for X and Y:</p>
  
  <pre><code>  function getCoord(e) {
        X = e.layerX - canvas.offsetLeft;
        Y = e.layerY - canvas.offsetTop;
    }
  </code></pre>
  
  <p>how to get Z coordination?</p>
  
  <p>Edit: I find this example, but can't figure it out myself...
  <a href="https://github.com/mrdoob/three.js/blob/master/examples/webgl_interactive_voxelpainter.html" rel="nofollow">https://github.com/mrdoob/three.js/blob/master/examples/webgl_interactive_voxelpainter.html</a></p>
  
  <p>Thanks</p>