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

blocks

The `cityGen.blocks` module identifies and defines the building blocks of a city from its road graph. It processes each face of the planar graph (excluding water and the map's exterior) and insets them to create building lines, considering road widths and district-specific quay d…

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

blocks

The cityGen.blocks module identifies and defines the building blocks of a city from its road graph. It processes each face of the planar graph (excluding water and the map's exterior) and insets them to create building lines, considering road widths and district-specific quay distances along the shore. Dead-end ways within a face are preserved as inner courts. Each block is represented as a closed curve with attributes like ID, district, kind (e.g., built, yard, park), area, and whether it's waterside. This module is called by cityGen.city.blocks to generate the city's building parcels.

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.blocks: the blocks of a city, the faces of its road graph. Every face of the planar graph (ground edges only: a span passes over) is walked; the faces that are water or the outside of the map are dropped; each of the rest is drawn in from its edges by half the width of the way along that edge (the building line), or by the district's `quay` along the shore. A dead-end way inside a face stays in its outline, so the block has a slot where the close runs and lots can front it. Result: one closed curve per block (the building line). Point `edge` is the id of the graph edge that side fronts, `off` how far it was drawn in. Primitive: `id`, `district`, `kind` (built | yard | park | open | square | roundabout | precinct | sliver), `place`, `area` (inside the building line), `gross` (the face), `waterside`.

faces(nodes: ?, edges: ?) → void

The faces of the graph: each a list of half-edges { edge, forward }.

argtypedescription
nodes?
edges?

leave(pts: ?, forward: ?) → void

argtypedescription
pts?
forward?

outline(face: ?) → void

The outline of a face: points, each naming the edge its segment runs along.

argtypedescription
face?

interior(poly: ?) → void

A point inside a polygon, for asking what the block is.

argtypedescription
poly?

inset(poly: ?, offsets: ?, sign: ?) → void

Draw a polygon in: each side by its own distance. Answers the points that stand clear of every side.

argtypedescription
poly?
offsets?
sign?

plan(S: ?, nodes: ?, edges: ?, districts: ?, placeKinds: ?, options: ?) → void

argtypedescription
S?
nodes?
edges?
districts?
placeKinds?
options?

read(geometry: ?) → void

argtypedescription
geometry?

build(survey: ?, seaLevel: ?, nodesGeometry: ?, edgesGeometry: ?, districtsGeometry: ?, places: ?, options: ?) → void

The node's function.

argtypedescription
survey?
seaLevel?
nodesGeometry?
edgesGeometry?
districtsGeometry?
places?
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.