cf_geo
One-paragraph description of what this module provides and who consumes it.
[name]
One-paragraph description of what this module provides and who consumes it.
Exports
M.exampleFn(arg) -> result— what it does and when to call it.M.exampleValue: type— what value it carries.
Usage
local M = require("@<youridentity>::modules.[name]")
M.exampleFn("foo")
Notes
- Anything callers need to know about THIS module: required runtime ordering, state ownership, side effects.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2COINFALL's low-poly mesh lathe. Builds hard-edged, UV-atlassed geometry one quad at a time -- the way a 1998 model was actually made. Every model in the game is assembled from these primitives against a single 128px atlas, so each finished mesh lands in the 300-800 triangle band with one texture.
builder( ) → void
Start a mesh. Faces are hard-edged: every quad contributes its own four vertices with a flat face normal, which is what gives low-poly its faceting.
sub(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
cross(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
norm(v: ?) → void
| arg | type | description |
|---|---|---|
| v | ? |
quad(a: ?, b: ?, c: ?, d: ?, uvRect: ?, tint: ?) → void
One quad from four corners wound counter-clockwise as seen from outside. `uvRect` is `{u0, v0, u1, v1}` in 0..1 atlas space; `tint` is an optional per-vertex `{r, g, b}` in 0..1 that the shader multiplies into the surface.
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| d | ? | |
| uvRect | ? | |
| tint | ? |
tri(a: ?, b: ?, c: ?, uvRect: ?, tint: ?) → void
One triangle, wound counter-clockwise as seen from outside. UVs are the rect's bottom-left, bottom-right and top-centre.
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| uvRect | ? | |
| tint | ? |
gridQuad(origin: ?, du: ?, dv: ?, nu: number, nv: number, uvRect: ?, tint: ?, stretch: ?, flip: ?) → void
A subdivided quad: `origin` plus the two full edge vectors `du` and `dv`, cut into `nu` x `nv` cells. The UV rect spans the whole surface. Every large surface in the game goes through this rather than a single quad. Fog and lighting are evaluated PER VERTEX, so a 6-metre floor drawn as one quad would sample fog at four corners and interpolate a flat wash across the middle. Subdivision is what makes the fog wall and the sodium pools read. By default each subdivision cell wears one full copy of `uvRect`, so the paint TILES across the surface. Pass `stretch = true` to spread the rect once over the whole plane instead. `flip` reverses each cell's winding, which flips the surface normal. The normal comes from the winding of `du` x `dv`, so a plane laid out in the reading order that feels natural (left-to-right, near-to-far) faces DOWN -- wrong for a floor, right for a ceiling. Rather than making every call site reason about a cross product, pass `flip` and check the result in the `normal` capture pass.
| arg | type | description |
|---|---|---|
| origin | ? | |
| du | ? | |
| dv | ? | |
| nu | number | |
| nv | number | |
| uvRect | ? | |
| tint | ? | |
| stretch | ? | |
| flip | ? |
at(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
box(min: ?, max: ?, faces: ?, tint: ?, skip: ?) → void
An axis-aligned box from `min` to `max`. `faces` maps face keys (`px`,`nx`,`py`,`ny`,`pz`,`nz`) to UV rects; a missing key falls back to `faces.all`. Pass `skip = { py = true }` to omit faces that are never seen -- the single biggest triangle saving on a boxy model.
| arg | type | description |
|---|---|---|
| min | ? | |
| max | ? | |
| faces | ? | |
| tint | ? | |
| skip | ? |
uvFor(key: ?) → void
| arg | type | description |
|---|---|---|
| key | ? |
frustum(min: ?, max: ?, insetX: ?, insetZ: ?, faces: ?, tint: ?, skip: ?) → void
A box whose top face is inset -- the wedge every arcade cabinet's control deck and marquee hood is cut from. `inset` shrinks the top in x and z.
| arg | type | description |
|---|---|---|
| min | ? | |
| max | ? | |
| insetX | ? | |
| insetZ | ? | |
| faces | ? | |
| tint | ? | |
| skip | ? |
uvFor(key: ?) → void
| arg | type | description |
|---|---|---|
| key | ? |
cylinder(center: ?, radius: ?, height: ?, segments: ?, sideUV: ?, capUV: ?, tint: ?, skipCaps: ?) → void
A capped cylinder about the Y axis. `segments` is the polygon count of the ring -- 8 to 12 is the era-correct range for a coin or a lamp housing.
| arg | type | description |
|---|---|---|
| center | ? | |
| radius | ? | |
| height | ? | |
| segments | ? | |
| sideUV | ? | |
| capUV | ? | |
| tint | ? | |
| skipCaps | ? |
capUVAt(x: ?, z: ?) → void
| arg | type | description |
|---|---|---|
| x | ? | |
| z | ? |
rawTri(a: ?, b: ?, c: ?, ua: ?, ub: ?, uc: ?, tint: ?) → void
A triangle with an explicit UV per corner -- what the cylinder caps and any hand-fitted face need when the rect mapping of `tri` is too coarse.
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| ua | ? | |
| ub | ? | |
| uc | ? | |
| tint | ? |
triCount( ) → number
How many triangles the builder holds. The budget check every model runs before it is written.
geometry( ) → void
The raw geometry table, ready for `asset.create("mesh", ...)` or `renderer.mesh.create`.
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.