A builder for the given attributes, e.g. { position: 3, normal: 3, uv: 2 }.
Vertices emitted so far.
Triangle indices added so far.
Trims the arrays to size (16-bit indices when the vertex count allows).
Adds a flat quad from four corners given counter-clockwise as seen from the front, with the
normal computed from them. uvs = [u0, v0, u1, v1, …] per corner.
Sets the current value of an attribute (used by following vertices).
Adds a flat triangle from three corners counter-clockwise as seen from the front.
Adds a triangle.
Emits a vertex at (x, y, z) with uv (u, v) and the current values of the other attributes. Returns its index.
Accumulates indexed triangles straight into growable typed arrays with a fixed set of float attributes. Set the "current" value of an attribute with MeshBuilder.set, then emit vertices with MeshBuilder.vertex; attributes keep their last value.