Concave, holed, either winding: the shape is whatever triangulatePolygon
accepts, and everything it refuses (§85 — self-intersections, zero area, a
hole outside its outline) this builder refuses with the same error, because
it is the same error. See tessellation.ts for the full list and for why a
self-intersecting outline is refused rather than approximated.
Vertices are the caller's points, in the caller's order
Vertex i is outline point i, then the first hole's points, then the
second's — the concatenation §52's tessellator indexes. Nothing is inserted,
merged, or moved, so a caller animating the outline can rewrite positions
in place and keep the index buffer (§52 "index-buffer reuse"). A vertex the
tessellator found redundant — one collinear with its neighbours — is still
there; it simply appears in no triangle.
Attributes
Positions (z = 0) and uvs, no normals — the same choice
circleGeometry2D makes and for the same reason: 2D shapes are unlit
in the §120 tier, and a (0, 0, 1) repeated per vertex would be dead weight
in every upload. Uv is the outline's bounding box normalized to
[0, 1]², matching extrudeGeometry's caps, so the same texture lines up on
a filled shape and on the front of its extrusion.
An arbitrary polygon filled in the XY plane, facing +Z — §50's "arbitrary polygon" row, built on §52's tessellator.
Concave, holed, either winding: the shape is whatever
triangulatePolygonaccepts, and everything it refuses (§85 — self-intersections, zero area, a hole outside its outline) this builder refuses with the same error, because it is the same error. Seetessellation.tsfor the full list and for why a self-intersecting outline is refused rather than approximated.Vertices are the caller's points, in the caller's order
Vertex
iis outline pointi, then the first hole's points, then the second's — the concatenation §52's tessellator indexes. Nothing is inserted, merged, or moved, so a caller animating the outline can rewritepositionsin place and keep the index buffer (§52 "index-buffer reuse"). A vertex the tessellator found redundant — one collinear with its neighbours — is still there; it simply appears in no triangle.Attributes
Positions (
z = 0) and uvs, no normals — the same choice circleGeometry2D makes and for the same reason: 2D shapes are unlit in the §120 tier, and a(0, 0, 1)repeated per vertex would be dead weight in every upload. Uv is the outline's bounding box normalized to[0, 1]², matchingextrudeGeometry's caps, so the same texture lines up on a filled shape and on the front of its extrusion.