Color Gradient for Three.js line

前端 未结 1 1480
失恋的感觉
失恋的感觉 2021-01-20 10:37

I only can find THREE.LineBasicMaterial(). Is there a way to have a simple color gradient from point a to point b?

相关标签:
1条回答
  • 2021-01-20 11:09

    You can use Vertex & fragment shaders for change color for vertices[0] and vertices[1]. (Line points) See http://mrdoob.github.com/three.js/examples/webgl_custom_attributes_lines.html

    0 讨论(0)
提交回复
热议问题