How to add a triangle with three vertices having three different colors?

Hi!

I’m trying to render a triangle on which I can assign a color to any of the three vertices. Now I use polygonGeometry class to draw a triangle. But the triangle can be filled with one color only.

How can I add a triangle with three vertices having three different colors?

Thanks for your time.

PolygonGeometry will need some small changes to support this. Do you need a filled triangle? If it can be just an outline, polylines support per-vertex colors.

Patrick

Yes, I need a filled triangle. Is there any other class that can achieve the function?
My original intention is to draw a polygon on which the color can reflect the temperature. In other words, the polygon can be composed of many triangles. Each vertex can be assigned a color indepedently. Is there any solution to this problem?
Thanks for your time.

在 2014年6月8日星期日UTC+8上午8时20分21秒,Patrick Cozzi写道: