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

lots

This module generates the individual lots within a city block, each fronting a street. It processes a block's building line, dividing it into sides and then marching lots along these sides based on district rules for width, depth, and setbacks. It handles corner lots, ensures nei…

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

lots

This module generates the individual lots within a city block, each fronting a street. It processes a block's building line, dividing it into sides and then marching lots along these sides based on district rules for width, depth, and setbacks. It handles corner lots, ensures neighbors share party walls correctly, and defines yard strips and inner courts. It also reserves ground for template landmarks. The module outputs a record for each lot, including its footprint, dimensions, and attributes for later stages. It is called by the city generation pipeline after blocks have been defined.

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.lots: the lots of a city, each FRONTING a street. A block's building line is cut into sides (one per street it fronts, split again at corners). Along each side, the grandest street first, lots are marched at the district's `lotWidth`: a lot is a rectangle whose front lies on the building line (set back where the line curves inward or the district says `setback`) and which runs back `lotDepth`, or to the middle of a shallow block. A lot that would stand on another or leave the block is made shallower, then dropped. What is left behind the lots is the block's court. Landmarks of the template reserve their ground first. Where a district builds wall to wall (no `gap`, no `setback`, full `coverage`: the old town, the downtown, the terraces) the block is not marched with rectangles but TILED (cityGen.parcels): wrapped corner lots, lots cut square to the frontage whatever its curve, neighbours sharing their party walls exactly, a yard strip behind each building and the block's court inside. Every lot carries its footprint as a polygon (`poly`, counter- clockwise seen from above, the street front first) and what each of its sides is (`kinds`: street | party | yard); a rectangle lot carries its four corners the same way. Result: one POINT per lot, at the middle of the building's footprint on the level it is built at, with the record every later stage reads (see the README, "The lot record"): `id`, `yaw`, `fx`, `fz`, `orient`, `width`, `depth`, `g0`..`g3`, `low`, `high`, `parcelWidth`, `parcelDepth`, `setback`, `edge`, `edge2`, `corner`, `cornerSide` (the second street of a corner lot: 1 to its right, -1 to its left, seen from the street; else 0), `partyL`, `partyR`, `block`, `district`, `use`, `frontClass`, `storefront`, `landmark`.

overlap(a: ?, b: ?) → void

Do two rectangles (four corners each, in order) overlap by more than a sliver?

argtypedescription
a?
b?

rayOut(poly: ?, x: ?, z: ?, dx: ?, dz: ?, far: ?) → void

How far a ray from (x, z) along (dx, dz) travels before it leaves a polygon.

argtypedescription
poly?
x?
z?
dx?
dz?
far?

overlapConvex(a: ?, b: ?) → void

Do two convex polygons overlap by more than a sliver?

argtypedescription
a?
b?

sidesOf(poly: ?, edgesById: ?) → void

The sides of a block's building line: runs of one edge, split at corners.

argtypedescription
poly?
edgesById?

plan(S: ?, blocks: ?, edges: ?, districts: ?, landmarks: ?, seed: ?, options: ?) → void

argtypedescription
S?
blocks?
edges?
districts?
landmarks?
seed?
options?

finish(lot: ?) → void

argtypedescription
lot?

fits(x: ?, z: ?, sw: ?, sd: ?) → void

argtypedescription
x?
z?
sw?
sd?

corner(a: ?, b: ?) → void

argtypedescription
a?
b?

grown(a: ?, b: ?) → void

argtypedescription
a?
b?

tileBlock(block: ?, r: ?) → void

A block of a wall-to-wall district: its building line tiled into lots.

argtypedescription
block?
r?

lineOf(e: ?) → void

argtypedescription
e?

unit(...: ?) → void

argtypedescription
...?

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

argtypedescription
a?
b?

lineOf(e: ?) → void

argtypedescription
e?

corner(a: ?, b: ?) → void

argtypedescription
a?
b?

corner(a: ?, b: ?) → void

argtypedescription
a?
b?

shape(lot: ?) → void

The footprint of a lot read back from its columns: `poly` ({ x, y, z } corners, counter-clockwise seen from above, the street front first), `kinds` (what each side is) and `yard` (its yard strip, or nil).

argtypedescription
lot?

writeCourts(courts: ?) → void

The courts as closed curves.

argtypedescription
courts?

readCourts(geometry: ?) → void

argtypedescription
geometry?

write(lots: ?, extra: ?) → void

The lots as points. `extra` adds attributes a later stage wrote on the lot tables.

argtypedescription
lots?
extra?

read(geometry: ?, extraNames: ?) → void

argtypedescription
geometry?
extraNames?

corners(lot: ?) → void

The four corners of a lot's footprint (front-left, front-right, back-right, back-left seen from the street).

argtypedescription
lot?

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

argtypedescription
a?
b?

build(survey: ?, seaLevel: ?, blocksGeometry: ?, nodesGeometry: ?, edgesGeometry: ?, districtsGeometry: ?, landmarks: ?, seed: ?, options: ?) → void

The node's function.

argtypedescription
survey?
seaLevel?
blocksGeometry?
nodesGeometry?
edgesGeometry?
districtsGeometry?
landmarks?
seed?
options?

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.