▣
module · drop-in viewer
CatMesh
The small geometry kit Wick is built from: lofted tubes, ellipsoids, and a way to merge one into another.
by·posted 1mo ago
What it does
art.wick.CatMesh
The small geometry kit Wick is built from: lofted tubes, ellipsoids, and a way to merge one into another.
| Call | What it makes |
|---|---|
loft(rings, opts) | A tube through a list of rings. A ring is { y, rx, rz, ox?, oz?, tint? } — an ellipse in XZ at a height, so a body can be deeper than it is wide and a tail can taper. Capped at both ends by default. |
ellipsoid(rx, ry, rz, opts) | A closed blob centred on its own origin — a cheek ruff, a haunch, an eye, a lantern globe. |
append(dst, src, xf) | Merges src into dst under scale → rotZ → rotY → translate, so a head can carry its own ears. |
recomputeNormals(g) | Accumulates face normals over the whole geometry. Robust at the pole fans, where an analytic normal is wrong. |
opts.tint sets a base vertex colour and opts.belly lifts the -X side of
every ring toward white by that fraction, which is how the underside comes out
lighter than the back without a texture. A ring's own tint overrides the base,
which is how the muzzle, the socks and the tail's banding are drawn.
Geometry comes back as flat arrays — positions, indices, normals, uvs,
colors — the shape both renderer.mesh.create and asset.create("mesh", ...)
read.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.