code: function calculateVertexCount ( w, h, d ) {
  
  		var vertices = 0;
  
  		// calculate the amount of vertices for each side (plane)
  		vertices += (w + 1) * (h + 1) * 2; // xy
  		vertices += (w + 1) * (d + 1) * 2; // xz
  		vertices += (d + 1) * (h + 1) * 2; // zy
  
  		return vertices;
  
  	}
docs: helper functions