▣
module · drop-in viewer
geom
The procedural geometry kit the four clowns of GREASEPAINT are cut from. A lathe, a box, a tapered tube, a cone, a frilled ruff, a shoe, and the ability to stamp any of them into a growing buffer under a transform. Everything a performer is made of is one of those.
by·posted 1mo ago
What it does
game.clowns.geom
The procedural geometry kit the four clowns of GREASEPAINT are cut from. A lathe, a box, a tapered tube, a cone, a frilled ruff, a shoe, and the ability to stamp any of them into a growing buffer under a transform. Everything a performer is made of is one of those.
A geometry value is exactly the table renderer.mesh.create takes:
{ positions, normals, uvs, indices }.
Exports
Geom.new() -> geometry— an empty accumulator.Geom.stamp(dst, src, xf) -> dst— copysrcintodstunder{ pos, rot = {yaw, pitch, roll}, scale }. Angles are radians.Geom.stampFlat(dst, src, xf, u, v)— asstamp, then collapse the added vertices onto one texture coordinate, so a part that wears a painted material can point at a plain patch of it.Geom.lathe(profile, segments, opts) -> geometry— revolve{ r, y }points running bottom to top.opts.uOffsetturns the unwrap around the axis without turning the geometry;opts.vFromYmaps v to height rather than arc length.Geom.spheroid(rx, ry, rings, segments, opts)Geom.tube(r0, r1, height, segments, opts)— capped, optionally bulged.Geom.limbDown(r0, r1, len, segments, opts)— the same tube built pointing DOWN from a joint at the origin, which is the rest pose an arm and a leg hang in.Geom.cone(radius, height, segments, opts)Geom.ruff(rInner, rOuter, thickness, lobes, segments)— a pleated collar, skinned on both sides.Geom.box(sx, sy, sz)— centred on x/z, sitting on y = 0.Geom.shoe(length, width, height)— far too long, turned up at the toe.Geom.upload(geometry, guid?) -> MeshHandle
Notes
- A ring puts
x = r*sin(theta),z = r*cos(theta), so u = 0 faces +Z. The clowns face +Z (the audience), so a head takesuOffset = 0.5to bring the painted face round to the front. - Triangles wind counter-clockwise seen from outside. The engine reports a mesh whose winding disagrees with its own normals, which is the check to read after changing any index order here.
- Adapted from
figures.geomin the ZeroMind world "Standing Ovation".
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.