Thickness of lines using THREE.LineBasicMaterial

后端 未结 8 1668
小鲜肉
小鲜肉 2020-11-27 06:53

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);         


        
8条回答
  •  野性不改
    2020-11-27 06:56

    This is no longer an issue just in ANGLE it's an issue on all platforms. Browsers needed to switching to the OpenGL 4+ core profile to support WebGL2 and the OpenGL 4+ core profile does not support line widths greater than 1. From the OpenGL 4.0+ spec, section E.2.1

    E.2.1 Deprecated But Still Supported Features

    The following features are deprecated, but still present in the core profile. They may be removed from a future version of OpenGL, and are removed in a forward compatible context implementing the core profile.

    • Wide lines - LineWidth values greater than 1.0 will generate an INVALID_VALUE error.

    To draw thicker lines you need generate geometry. For three.js there is this library (pointed out by Wilt as well)

    https://github.com/spite/THREE.MeshLine

提交回复
热议问题