I just upgraded to three .js r72 and I get the following warning in the console regarding THREE.LinePieces ...
THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead.
Lines will appear disconnected, notify the warnings, however, in the following example, if I upgrade THREE.LinePieces to THREE.LineSegments, all disconnected lines are connected.
var lineMaterial = new THREE.LineBasicMaterial({color: 0x000000, linewidth: 1}); var lineGeom = new THREE.Geometry(); var xstrt = 0; for (nn=0; nn<numLines; nn++) { lineGeom.vertices.push(new THREE.Vector3(xstrt, -5, 0)); lineGeom.vertices.push(new THREE.Vector3(xstrt, 5, 0)); xstrt += 5; } var Line = new THREE.Line(lineGeom, lineMaterial, THREE.LinePieces);
Do I intend to create separate geometries (containing two vertices) for each line segment or can I combine several line segments into one geometry, as was the case with LinePieces?
source share