Different edges color in same cube?

Hi,

Could anyone give some suggestions for the below question?

I added edges to my cube through using THREE.lineSegments and THREE.EdgesGeometry.

I am wondering how to set the different edges of the same cube with a different color.

Currently, I use THREE.LineBasicMaterial to set color.

Thanks!!

We lately discussed a similar issue at stackoverflow:

Short answer: You can render your line segments with an additional color geometry attribute and by setting Material.vertexColors to THREE.VertexColors.