▣
module · drop-in viewer
geom
The mesh lathe the `vale` slice of *Sexton's Bell* is built with. A builder accumulates one triangle stream — positions, normals, uvs, indices — under a transform stack, and mints it as a `.mesh` asset.
by·posted 1mo ago
What it does
geom
The mesh lathe the vale slice of Sexton's Bell is built with. A builder
accumulates one triangle stream — positions, normals, uvs, indices — under a
transform stack, and mints it as a .mesh asset.
One merged mesh per material is the unit of geometry here: four hundred monuments become three draws rather than four hundred entities.
Exports
geom.builder()— a fresh builder.geom.trs(tx, ty, tz, yaw, pitch, roll, sx, sy, sz)/geom.compose(a, b)— transforms;b:push(m)/b:pop()/b:at(...)stack them.geom.ring(n, r, rot)— a regular n-gon in the XZ plane, for lofts.
On a builder: vert, face, tri, quad, box, pier, polyFan,
extrudeZ, extrudeY, loft, grid, tris, mint.
Conventions
- Emitters are flat-shaded by default: every face owns its vertices, which
is what dressed stone wants.
lofttakessmooth = true(the yews, the urns, the ridge treeline) andgridis always smooth. - A face's front is the side its three vertices turn counter-clockwise as seen
from.
quad/tri/boxderive the normal from the winding they are given, so those two can never disagree;polyFan,loft(smooth),gridand theextrudeYcaps write normals of their own, so their winding is chosen from the outline's signed area rather than assumed. extrudeZandpolyFantake an outline wound either way and still come out facing outward.mint(identity, name, folder, force)asksasset.existsrather than resolving a handle from a computed name, so a mesh identity built by concatenation never becomes an unpublishable reference on the content that wears it.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.