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

parcels

This module tiles a city block's building line into individual lots, specifically designed for perimeter blocks in old towns or dense urban areas. It walks the building line, creating corner lots at sharp turns and cutting the frontage into regular lots with lines square to the s…

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

parcels

This module tiles a city block's building line into individual lots, specifically designed for perimeter blocks in old towns or dense urban areas. It walks the building line, creating corner lots at sharp turns and cutting the frontage into regular lots with lines square to the street. It ensures that neighboring lots share party walls precisely, without gaps or overlaps, regardless of the street's curvature. It also defines a yard strip behind each building and an inner court for the block. The module outputs a list of lots, each with its polygon footprint, side classifications (street, party, yard), and other attributes. It is called by the cityGen.lots module when a district's rules specify wall-to-wall construction.

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.parcels: a block's building line TILED into lots (the perimeter block of an old town). The building line is walked once. Where it turns sharply between two streets a corner lot WRAPS the corner: a kite whose two outer sides are its two street fronts and whose two inner sides stand square to them. Between corners the frontage is cut into lots by lines square to it (always at a kink of the line, so a front never bends inside a lot); each lot runs back `depth`, or to the middle of a shallow block, where it meets the lot that fronts the other street. Neighbours share the two ends of their common wall exactly: no gaps, no steps, no overlaps, whatever the curve of the street. Behind each building its plot may keep a yard strip (`yard`), and what no plot takes is the block's court. local out = Parcels.tile(poly, fronts, { width, depth, yard, jitter, unit = function(...) -> 0..1 }) poly the building line, a closed list of { x, z } fronts fronts[i] describes the side poly[i] -> poly[i + 1] when lots may front it: { key = <edge id>, rank } (nil or false: no lot faces that side: a shore, a highway, a path) out.lots = { { poly, kinds, key, key2, corner, cornerSide, front, depth, yard?, deep } ... } poly: counter-clockwise seen from above (north up; Geo.area < 0), poly[1] -> poly[2] the main street front with poly[1] on the left as seen from that street; kinds[i] says what side poly[i] -> poly[i + 1] is: "street" | "party" | "yard" out.court = the block's inner court as a polygon, or nil

unit(x: ?, z: ?) → void

argtypedescription
x?
z?

rays(px: ?, pz: ?, ux: ?, uz: ?, qx: ?, qz: ?, vx: ?, vz: ?) → void

Where two rays meet: p + u t = q + v s. Answers t, s (nil when they run parallel).

argtypedescription
px?
pz?
ux?
uz?
qx?
qz?
vx?
vz?

tile(source: ?, sourceFronts: ?, opt: ?) → void

argtypedescription
source?
sourceFronts?
opt?

crowded(x: ?, z: ?, need: ?, ownA: ?, ownB: ?, needOwn: ?, ownSeg: ?) → void

argtypedescription
x?
z?
need?
ownA?
ownB?
needOwn?
ownSeg?

reach(x: ?, z: ?, ux: ?, uz: ?, most: ?, ratio: ?, ownA: ?, ownB: ?, ownSeg: ?) → void

How far a wall can run in from (x, z) along (ux, uz) before it is nearer another side than its own: the middle of the block. `ratio` is how fast its own side falls behind (1 square to it).

argtypedescription
x?
z?
ux?
uz?
most?
ratio?
ownA?
ownB?
ownSeg?

ok(t: ?) → void

argtypedescription
t?

cutAtVertex(i: ?) → void

argtypedescription
i?

along(side: ?, s: ?) → void

a point of a side at a distance along it: position, and the segment it lies on

argtypedescription
side?
s?

endCut(side: ?, atStart: ?) → void

the end of a side where no kite wraps it: a wall shared with the next side (a re-entrant corner, a corner too small to wrap, the seam of a loop), or the side wall of the last lot against a side nobody fronts

argtypedescription
side?
atStart?

polyArea(pts: ?) → void

argtypedescription
pts?

build(a: ?, b: ?, final: ?) → void

a lot between two walls: its front follows the line (the points of the line between the walls that bow outward are kept), its back joins the two walls' ends

argtypedescription
a?
b?
final?

add(x: ?, z: ?) → void

argtypedescription
x?
z?

Problems

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

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬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.