netjsongraph.js
netjsongraph.js copied to clipboard
Using triangles to replace line.
gl.lineWidth() has no effect in common modern browsers. The corresponding Chromium bug and Firefox bug are closed as Won't Fix and the WebGL specification now defines that gl.lineWidth() does not change the line width anymore. If you need lines of any width other than 1px, consider drawing a narrow strip of triangles.
so, we have to simulating the line width by creating triangles.
reference:
- https://blog.artzub.com/webgl-width-of-line-into-the-windows-browsers-f199d7252fc
- https://mattdesl.svbtle.com/drawing-lines-is-hard
- https://stackoverflow.com/questions/28009734/webgl-line-strip-width/28046235#28046235
- https://github.com/Jam3/three-path-geometry