javascript - three.js r72 no longer supports THREE.LinePieces, how to merge multiple disconnected lines with THREE.LineSegments? -


i updated three.js r72 , getting following warning in console concerning three.linepieces ...

three.line: parameter three.linepieces no longer supported. created three.linesegments instead. 

the lines appear disconnected dispite warnings, however, following example, if update three.linepieces three.linesegments disconnected lines become connected.

var linematerial = new three.linebasicmaterial({color: 0x000000, linewidth: 1}); var linegeom = new three.geometry(); var xstrt = 0; (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); // seperate lines, warnings //var line  = new three.line(linegeom, linematerial, three.linesegments); // connected 1 line :( 

am expected create separate geometries (containing 2 vertices) each line segment or possible merge multiple line segments 1 geometry had linepieces?

here pattern follow create collection of line segments single draw call.

var line = new three.linesegments( geometry, material ); 

three.js r.72


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -