Color Gradient for Three.js line

走远了吗. 提交于 2019-12-20 02:56:17

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/11589274/color-gradient-for-three-js-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!