When I working with CanvasRendereer then linewidth of LineBasicMaterial working fine but when I switch to WebGL then its not working only default linewidth is applied in material. I found some post regarding this issue and I got idea that its not working in windows for ANGLE issue.
Is this problem still there?
If this problem is solved then how to use it or if not solved then is there any other way to implement linewidth in WebGL?
Thank you.
WebGL does not support line width for three js
See https://threejs.org/docs/index.html#api/geometries/TubeGeometry
WebGL renderer on Windows platforms linewidth will always be 1 regardless of the set value.
You could 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());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With