geo
A small vertex-coloured mesh builder (quads, boxes, cylinders) that uploads through `renderer.mesh.create`. Used by `game.arena.build`.
game.arena.geo
A small vertex-coloured mesh builder (quads, boxes, cylinders) that uploads through renderer.mesh.create. Used by game.arena.build.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game/arena/geo.module — a small vertex-coloured mesh builder for the amphitheatre. Everything the arena raises (tiers, facade, crowd, gates, props) is merged into a handful of runtime meshes built here: flat-shaded quads and boxes whose colour rides in the vertex colour stream, worn by a white PBR material (game/arena/materials/arena_*), so one draw carries thousands of stones. local G = require("game.arena.geo") local b = G.new() b:quad(a, b, c, d, { r, g, b }, outwardHint) b:box3(cx, cy, cz, u, v, w, sx, sy, sz, col, skip, faceColours) local handle = b:mesh() -- renderer.mesh.create(...) handle for a Model
new( ) → void
A new empty builder.
rng(seed: number) → void
Deterministic Park–Miller generator: rng() in [0,1), rng(a, b) in [a, b).
| arg | type | description |
|---|---|---|
| seed | number |
shade(col: ?, k: number) → void
| arg | type | description |
|---|---|---|
| col | ? | |
| k | number |
mix(a: ?, b: ?, t: number) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| t | number |
vert(x: number, y: number, z: number, nx: number, ny: number, nz: number, col: ?) → number
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number | |
| nx | number | |
| ny | number | |
| nz | number | |
| col | ? |
triIdx(a: number, b: number, c: number, hint: ?) → void
Triangle over existing vertex indices; flipped so its front faces `hint`.
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| c | number | |
| hint | ? |
normalOf(a: ?, b: ?, c: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? |
tri(a: ?, b: ?, c: ?, col: ?, hint: ?) → void
Flat triangle of points, front side facing `hint` when given.
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| col | ? | |
| hint | ? |
quad(a: ?, b: ?, c: ?, d: ?, col: ?, hint: ?) → void
Flat quad a-b-c-d (a cycle), front side facing `hint` when given.
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| d | ? | |
| col | ? | |
| hint | ? |
quadc(a: ?, b: ?, c: ?, d: ?, ca: ?, cb: ?, cc: ?, cd: ?, hint: ?) → void
Quad with a colour per corner (baked occlusion / grime gradients).
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| d | ? | |
| ca | ? | |
| cb | ? | |
| cc | ? | |
| cd | ? | |
| hint | ? |
quad2(a: ?, b: ?, c: ?, d: ?, col: ?, colBack: ?) → void
Double-sided quad (cloth): both faces drawn.
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? | |
| c | ? | |
| d | ? | |
| col | ? | |
| colBack | ? |
box3(cx: ?, cy: ?, cz: ?, u: ?, v: ?, w: ?, sx: ?, sy: ?, sz: ?, col: ?, skip: ?, over: ?) → void
Box centred at (cx,cy,cz) on unit axes u, v, w with full sizes sx, sy, sz.
| arg | type | description |
|---|---|---|
| cx | ? | |
| cy | ? | |
| cz | ? | |
| u | ? | |
| v | ? | |
| w | ? | |
| sx | ? | |
| sy | ? | |
| sz | ? | |
| col | ? | |
| skip | ? | set of face names to leave out ("+u","-u","+v","-v","+w","-w") |
| over | ? | per-face colour overrides keyed the same way |
boxY(cx: ?, cy: ?, cz: ?, yaw: ?, sx: ?, sy: ?, sz: ?, col: ?, skip: ?, over: ?) → void
Box turned `yaw` radians about +Y (same convention as an entity's yaw).
| arg | type | description |
|---|---|---|
| cx | ? | |
| cy | ? | |
| cz | ? | |
| yaw | ? | |
| sx | ? | |
| sy | ? | |
| sz | ? | |
| col | ? | |
| skip | ? | |
| over | ? |
cross(a: ?, b: ?) → void
| arg | type | description |
|---|---|---|
| a | ? | |
| b | ? |
norm(a: ?) → void
| arg | type | description |
|---|---|---|
| a | ? |
cyl3(c: ?, axis: ?, r: number, h: number, sides: number, col: ?, caps: boolean?, capCol: ?) → void
Faceted cylinder centred at c along unit `axis`, radius r, length h.
| arg | type | description |
|---|---|---|
| c | ? | |
| axis | ? | |
| r | number | |
| h | number | |
| sides | number | |
| col | ? | |
| caps | boolean? | |
| capCol | ? |
ring(k: ?, side: ?) → void
| arg | type | description |
|---|---|---|
| k | ? | |
| side | ? |
mesh( ) → void
Upload what was built; nil when empty.
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.