Hello, I’m working on modeling roofs in 3D with three.js.

I have the coordinates of each vertices of the roof, until now it worked fine by creating a face3, but when the roof has more than 4vertices the roof doesn’t always correspond to the reality. Which makes sense since there are multiple ways to make a face considering 4 vertices or more.

I recieve the vertices in a certain order, which means that consecutive vertices are connected in real life by a roof’s edge.

So i figured out, that I could draw the roof with edges, but I don’t know how I can color it.

Basically, I need a way to make a face with unlimited vertices or to connected edges and coloring the inside, like if I had faces.

I hope I’m clear enough, thanks for the help.