Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage cityGen.package·originates fromworld 0a0b119f-a…

scMesh

The streetscape's triangle builder (`Mesh`: v, tri, quad, triUp, filter, append, geometry; `uvx`) and the plane geometry its corners are drawn with: lineLine, earClip (keeps every outline point), fillet (a true arc with straight leads), blend (a cubic between two headings), offse…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

cityGen.scMesh

The streetscape's triangle builder (Mesh: v, tri, quad, triUp, filter, append, geometry; uvx) and the plane geometry its corners are drawn with: lineLine, earClip (keeps every outline point), fillet (a true arc with straight leads), blend (a cubic between two headings), offset (mitred), dedupe. See STREETS.md in the package.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

cityGen.scMesh: the triangles of a streetscape, and the plane geometry its corners are drawn with. A `Mesh` gathers positions, normals, one uv and indices. Faces are wound counter-clockwise seen from the side their normal points to ((b - a) x (c - a) along the normal). `uvx(kind, u)` packs a surface kind into uv.x.

new( ) → void

uvx(kind: ?, u: ?) → void

argtypedescription
kind?
u?

v(x: ?, y: ?, z: ?, nx: ?, ny: ?, nz: ?, u: ?, v: ?) → void

A vertex; answers its index (from 0).

argtypedescription
x?
y?
z?
nx?
ny?
nz?
u?
v?

tri(a: ?, b: ?, c: ?) → void

argtypedescription
a?
b?
c?

quad(a: ?, b: ?, c: ?, d: ?) → void

a, b, c, d counter-clockwise seen from the face's front.

argtypedescription
a?
b?
c?
d?

triUp(a: ?, b: ?, c: ?) → void

A triangle wound so that it faces up, whatever order its corners came in.

argtypedescription
a?
b?
c?

triangles( ) → void

empty( ) → void

geometry( ) → void

The mesh as a procgen Geometry (nil when it holds nothing).

filter(keep: ?) → void

The triangles whose kind (the whole part of their first corner's uv.x) `keep(kind)` accepts, as a mesh of their own.

argtypedescription
keep?

append(other: ?) → void

Lay another mesh's triangles into this one.

argtypedescription
other?

lineLine(ax: ?, az: ?, adx: ?, adz: ?, bx: ?, bz: ?, bdx: ?, bdz: ?) → void

Plane geometry (x, z) Where the line through (ax, az) along (adx, adz) meets the line through (bx, bz) along (bdx, bdz): the two parameters, or nil when they run alongside.

argtypedescription
ax?
az?
adx?
adz?
bx?
bz?
bdx?
bdz?

area2(poly: ?) → void

Twice the signed area of a polygon given as a list of { x, z }.

argtypedescription
poly?

earClip(poly: ?) → void

A polygon cut into triangles (ear clipping). Answers a flat list of indices into `poly` (1-based), three a triangle. Every point of the outline is used, points that lie on a straight run included (a neighbouring strip has a vertex there). Points nearer than 1 mm to their neighbour should have been dropped by the caller.

argtypedescription
poly?

cross(a: ?, b: ?, c: ?) → void

argtypedescription
a?
b?
c?

ear(i: ?) → void

Is the corner at i an ear: it turns the outline's own way, and no other point lies in its triangle or on the diagonal that would close it (such a point would be left without a triangle of its own).

argtypedescription
i?

fillet(ax: ?, az: ?, kx: ?, kz: ?, bx: ?, bz: ?, r: ?, step: ?) → void

A circular arc that rounds the corner a -> k -> b with radius r (clamped to what the two legs allow). Answers the points from a to b (both included), the legs straight where the arc does not reach.

argtypedescription
ax?
az?
kx?
kz?
bx?
bz?
r?
step?

blend(ax: ?, az: ?, adx: ?, adz: ?, bx: ?, bz: ?, bdx: ?, bdz: ?, k: ?, step: ?) → void

A smooth run from a (heading (adx, adz)) to b (heading (bdx, bdz)): a cubic whose handles are `k` of the chord.

argtypedescription
ax?
az?
adx?
adz?
bx?
bz?
bdx?
bdz?
k?
step?

offset(pts: ?, d: ?) → void

A polyline drawn to one side: each point moved `d` along its left normal (d < 0: right), mitred at the turns. `d` may be a number or a list (one per point).

argtypedescription
pts?
d?

dedupe(pts: ?, eps: ?, closed: ?) → void

Drop points that sit on their neighbour (closer than `eps`).

argtypedescription
pts?
eps?
closed?

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.