Closed astrofrog closed 5 years ago
Using the staged WebGL SDK, there is an issue with the filling of polygons when the vertices are in one direction versus the other:
poly1 = wwt.createPolygon() poly1.addPoint(0,0) poly1.addPoint(0,1) poly1.addPoint(1,0) poly1.set_fill(true) wwt.addAnnotation(poly1) poly2 = wwt.createPolygon() poly2.addPoint(2,0) poly2.addPoint(3,0) poly2.addPoint(2,1) poly2.set_fill(true) wwt.addAnnotation(poly2)
The result is:
With poly2 on the left, and poly1 on the right.
Polygons have a specific counter-clockwise winding direction. The fill faces the normal of the triangles generated by tessellation. This behaviour is by design.
Using the staged WebGL SDK, there is an issue with the filling of polygons when the vertices are in one direction versus the other:
The result is:
With poly2 on the left, and poly1 on the right.