title: Subclass THREE.Mesh using prototypal inheritance
body: <p>I am trying to subclass <code>THREE.Mesh</code> like below (<a href="https://github.com/mrdoob/three.js/blob/master/src/objects/Mesh.js" rel="nofollow">THREE.Mesh</a> inherits from <a href="https://github.com/mrdoob/three.js/blob/master/src/core/Object3D.js" rel="nofollow">THREE.Object3D</a>).</p>
  
  <pre><code>Planet = function(geometry, material) {
      THREE.Mesh.call(this);
  
      this.geometry = geometry;
      this.material = material;
  };
  
  Planet.prototype = Object.create(THREE.Mesh.prototype);
  </code></pre>
  
  <p>It seems to work fine when I pass in a <code>SphereGeometry</code>, except that the <code>boundRadius</code> property <strong>is not set</strong> like it would be if I were using just a <code>THREE.Mesh</code>.  The scene draws correctly though.  </p>
  
  <p>However, when I pass in a <code>CubeGeometry</code>, the render loop becomes very not happy.</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'radius' of null three.min.js:105
  THREE.Frustum.intersectsObject three.min.js:105
  render three.min.js:414
  starsgl.Application.render Application.js:60
  starsgl.Application.animate Application.js:55
  starsgl.Application Application.js:50
  (anonymous function)
  </code></pre>
  
  <p>I imitated the way that <code>Three.js</code> was subclassing <code>THREE.Object3D</code> with <code>THREE.Mesh</code>.  I must be missing something though.</p>