Search code examples
javascriptwebglthree.js

How to change the thickness of lines using Three.js


I am using the code below to create hundreds of lines in my Three.js scene:

edgeGeometry[i] = new THREE.Geometry();
edgeGeometry[i].vertices[0] = v(x1,y1,z1);
edgeGeometry[i].vertices[1] = v(x2,y2,z2);
edgesMat[i] = new THREE.LineBasicMaterial({
    color: 0x6699FF, linewidth: 1, fog:true});
edge[i] = new THREE.Line(edgeGeometry[i], edgesMat[i]);
edge[i].type = THREE.Lines;
scene2.add(edge[i]);

It works fine, but when I change the value of linewidth to a bigger OR smaller value, I see NO difference in the scene.

How do I change the thickness of the lines?


Solution

  • This doesn't work on Windows because it wasn't implemented in the ANGLE project.