code: function HexSphere(r, level) {
    r = r || 0.5;
    level = level || 1;
  
    var baseGeom = new Icosahedron(r);
    for(var i=0; i<level; i++) {
      baseGeom = baseGeom.subdivideEdges();
    }
  
    var vertices = [];
    var faces = [];
  
  
    var halfEdgeForVertex = [];
    var halfEdges = baseGeom.computeHalfEdges();
    halfEdges.forEach(function(e) {
      halfEdgeForVertex[e.face[e.slot]] = e;
    });
  
    for(var i=0; i<baseGeom.vertices.length; i++) {
      var vertexIndex = vertices.length;
      var midPoints = [];
      //collect center points of neighbor faces
      vertexEdgeLoop(halfEdgeForVertex[i], function(e) {
        var midPoint = centroid(elements(baseGeom.vertices, e.face));
        midPoints.push(midPoint);
      });
      midPoints.forEach(function(p, i){
        vertices.push(p);
      });
      if (midPoints.length == 5) {
        faces.push([vertexIndex, vertexIndex+1, vertexIndex+2, vertexIndex+3, vertexIndex+4]);
      }
      if (midPoints.length == 6) {
        faces.push([vertexIndex, vertexIndex+1, vertexIndex+2, vertexIndex+3, vertexIndex+4, vertexIndex+5]);
      }
    }
  
    vertices.forEach(function(v) {
      v.normalize().scale(r);
    });
  
    Geometry.call(this, { vertices: vertices, faces: faces });
  
    this.computeEdges();
  }
docs: ### HexSphere ( r, level ) `r` - radius *{ Number = 0.5 }* `level` - number of subdivisions *{ Number/Int = 1 }*