Line.Sys line width issue.
When I work with CanvasRendereer then LineBasicMaterial line width works fine, but when I switch to WebGL then only custom line width is applied in material. I found a post about this issue and I got the idea that it doesn't work on Windows for the ANGLE problem.
Is this problem still there?
If this problem is solved, then how to use it or if it is not solved, is there any other way to implement line width in WebGL?
Thank.
+3
source to share
1 answer
WebGL doesn't support line width for three js
See https://threejs.org/docs/index.html#api/geometries/TubeGeometry
WebGL renderer on Windows platforms line width will always be 1, regardless of the value set.
You can use TubeGeometry
https://github.com/jjcc1421/Three3DExtras
var line=new three3DExtras.tubeLine([-1,-1,0],[1,1,0],0.02,'#FFF');
var line2=new three3DExtras.tubeLine([-1,0,0],[1,0,0],0.02,'#E3DC1C');
var line3=new three3DExtras.tubeLine([-1,0,1],[1,0,1],0.02,'#B02735');
scene.add(line.getObject3D());
scene.add(line2.getObject3D());
scene.add(line3.getObject3D());
+1
source to share