您可以使用顶点着色器和片元着色器来改变线段的第一个点和第二个点的颜色。 请参考http://mrdoob.github.com/three.js/examples/webgl_custom_attributes_lines.html。