title: merge multiple lines in three.js
body: <p><strong>What I want</strong>merge multiple lines into one line to improve performance(lines maybe line,polyline(closed),arc,circle,ellipse). Encountered a problem <a href="https://github.com/mrdoob/three.js/issues/1370" rel="nofollow noreferrer">#1370</a>,the same dpatro described.</p>
  
  <p><strong>What I found</strong>I found the solution:<a href="https://stackoverflow.com/questions/32915473/three-js-r72-no-longer-supports-three-linepieces-how-to-merge-multiple-disconne">here</a>,my code was below:</p>
  
  <pre><code>case "Line":
              var startPoint = me.stripStringToPoint(entity.StartPoint);
              var endPoint = me.stripStringToPoint(entity.EndPoint);
              var p1 = new THREE.Vector3(startPoint[0],startPoint[1],startPoint[2]);
              var p2 = new THREE.Vector3(endPoint[0],endPoint[1],endPoint[2]);
              geometry.vertices.push(p1);
              geometry.vertices.push(p2);
  
              var line = new THREE.LineSegments(geometry, material);
              return line;
              break;
  
          case "Polyline":
              var vertices = entity.Vertices;
              var color = me.stripStringToColor(entity.Color);
              for (var j = 0, len1 = vertices.length; j &lt; len1; j = j + 2) {
                  var p = new THREE.Vector3(entity.Vertices[j], entity.Vertices[j + 1],0);
                  geometry.vertices.push(p);
              }
              if ( entity.Closed === true &amp;&amp; geometry.vertices.length &gt;0) {
                  geometry.vertices.push(new THREE.Vector3(entity.Vertices[0], entity.Vertices[1],0));
              }
  
              var line = new THREE.LineSegments(geometry, material);//
              return line;
  
  
  var mergeGeometry = new THREE.Geometry();
  mergeGeometry.merge(line.geometry, line.matrix);
  scene.add(new THREE.LineSegments(mergeGeometry,material ));
  </code></pre>
  
  <p>I use three.js r.73 while he use r.72,does this matters?needs your help~</p>