@adatechnology/game-urban 0.3.13 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1087 @@
1
+ import * as _adatechnology_game_floorplan from '@adatechnology/game-floorplan';
2
+ import { SilhouettePart, SilhouetteWindow, RandomSource, Silhouette } from '@adatechnology/game-floorplan';
3
+
4
+ type Trig = 'sin' | 'cos';
5
+ type Point = readonly [number, number];
6
+ type Rect = readonly [number, number, number, number];
7
+ /** One term of a rolling surface. `product`: `fx(kx·px) · fy(ky·py) · amplitude`. `diagonal`: `sin(kx·px + ky·py) · amplitude`. */
8
+ type Wave = {
9
+ kind: 'product';
10
+ x: readonly [Trig, number];
11
+ y: readonly [Trig, number];
12
+ amplitude: number;
13
+ } | {
14
+ kind: 'diagonal';
15
+ kx: number;
16
+ ky: number;
17
+ amplitude: number;
18
+ };
19
+ /** A factor of a mask: a smoothstep along one axis. With `fullUntil`, everything before that value counts as 1. */
20
+ type Ramp = {
21
+ axis: 'x' | 'y';
22
+ from: number;
23
+ to: number;
24
+ fullUntil?: number;
25
+ };
26
+ /** A region that adds relief: `mask · (level + waves)`. The mask is the product of its ramps. */
27
+ type TerrainLayer = {
28
+ id: string;
29
+ mask: readonly Ramp[];
30
+ level: number;
31
+ waves: readonly Wave[];
32
+ };
33
+ /** Levels a rectangle (a city) towards `level`, from `margin` outside it to the inside, by a smoothstep of the distance to its nearest edge. */
34
+ type Flatten = {
35
+ id: string;
36
+ rect: Rect;
37
+ margin: number;
38
+ edge: readonly [number, number];
39
+ level: number;
40
+ };
41
+ /** The bed of a river: a fixed height, or `below` the surrounding ground but never lower than `floor`. */
42
+ type RiverBed = {
43
+ fixed: number;
44
+ } | {
45
+ below: number;
46
+ floor: number;
47
+ };
48
+ /** A river as a polyline; the ground eases from the bed to the land between the two distances of `width`. */
49
+ type River = {
50
+ id: string;
51
+ points: readonly Point[];
52
+ width: readonly [number, number];
53
+ bed: RiverBed;
54
+ };
55
+ /** A lake as an ellipse; the ground eases from `level` to the land between the two fractions of `edge` and is untouched past `reach`. */
56
+ type Lake = {
57
+ id: string;
58
+ center: Point;
59
+ radius: Point;
60
+ level: number;
61
+ edge: readonly [number, number];
62
+ reach: number;
63
+ };
64
+ /** Where trees grow: the strongest of the masked zones and a patchy noise. */
65
+ type ForestOptions = {
66
+ zones: readonly {
67
+ mask: readonly Ramp[];
68
+ }[];
69
+ patch?: {
70
+ waves: readonly Wave[];
71
+ edge: readonly [number, number];
72
+ weight: number;
73
+ };
74
+ };
75
+ /** What colours a vertex, tried in this order; the first rule that matches wins. */
76
+ type ColorRule = {
77
+ kind: 'below';
78
+ height: number;
79
+ color: number;
80
+ } | {
81
+ kind: 'above';
82
+ height: number;
83
+ color: number;
84
+ } | {
85
+ kind: 'ellipse';
86
+ center: Point;
87
+ radius: Point;
88
+ color: number;
89
+ } | {
90
+ kind: 'rects';
91
+ rects: readonly Rect[];
92
+ margin: number;
93
+ color: number;
94
+ } | {
95
+ kind: 'forest';
96
+ above: number;
97
+ color: number;
98
+ };
99
+ /** Map coordinates (the ground plan) to world metres: `world = map · scale + origin`. The mesh is a square of `size` metres with `segments` cells a side. */
100
+ type WorldFrame = {
101
+ size: number;
102
+ scale: number;
103
+ origin: number;
104
+ segments: number;
105
+ };
106
+ /** Everything that makes a terrain; the numbers of a place live in the game, not here. */
107
+ type TerrainOptions = {
108
+ world: WorldFrame;
109
+ base: {
110
+ level: number;
111
+ waves: readonly Wave[];
112
+ };
113
+ layers: readonly TerrainLayer[];
114
+ flatten: readonly Flatten[];
115
+ rivers: readonly River[];
116
+ lakes: readonly Lake[];
117
+ forest: ForestOptions;
118
+ colors: readonly ColorRule[];
119
+ /** Colours of the open ground, picked by a hash of the map cell. */
120
+ fields: {
121
+ colors: readonly number[];
122
+ cell: Point;
123
+ };
124
+ /** The water plane under the whole terrain. */
125
+ water: {
126
+ level: number;
127
+ color: number;
128
+ roughness: number;
129
+ metalness: number;
130
+ };
131
+ /** Shape of the last touch: changes the height after every layer, river and lake. */
132
+ custom?: (px: number, py: number, height: number) => number;
133
+ };
134
+ /** The ground as numbers a drawer turns into a mesh: a grid of `segments + 1` vertices a side, rows along z. */
135
+ type TerrainGrid = {
136
+ segments: number;
137
+ size: number;
138
+ /** x and z of each vertex in world metres. */
139
+ x: Float32Array;
140
+ z: Float32Array;
141
+ heights: Float32Array;
142
+ /** Colour of each vertex as 0xRRGGBB. */
143
+ colors: Uint32Array;
144
+ };
145
+
146
+ /** How a drawer treats a part when the default (standard material, rough 0.9, shadows on) is not what the team's page does. */
147
+ type PartStyle = {
148
+ /** Metal and paint of the standard material. */
149
+ roughness?: number;
150
+ metalness?: number;
151
+ /** Shadows: boxes, cylinders, cones and prisms cast and receive by default, planes only receive, crowns only cast, signs and lines neither. */
152
+ castShadow?: boolean;
153
+ receiveShadow?: boolean;
154
+ };
155
+ type Styled<TPart> = TPart & {
156
+ style?: PartStyle;
157
+ };
158
+ /** A part of a failing lamp (its lens and its light): they flicker together on this phase (radians, `flickerPhaseOf`). Absent on everything else. */
159
+ type Flickering = {
160
+ flickerPhase?: number;
161
+ };
162
+ /** A cone (pointed cap of an iron pole, pine foliage); `y` is the centre. Flat shaded. */
163
+ type ConePart = {
164
+ shape: 'cone';
165
+ parent: number;
166
+ x: number;
167
+ y: number;
168
+ z: number;
169
+ radius: number;
170
+ height: number;
171
+ color: number;
172
+ segments: number;
173
+ style?: PartStyle;
174
+ };
175
+ /** A rough ball of leaves (a dodecahedron of the given radius). Casts shadows only. */
176
+ type CrownPart = {
177
+ shape: 'crown';
178
+ parent: number;
179
+ x: number;
180
+ y: number;
181
+ z: number;
182
+ radius: number;
183
+ color: number;
184
+ style?: PartStyle;
185
+ };
186
+ /** Half (or any arc) of a cylinder lying down, for a barrel-vault roof. Casts shadows only. `rotation` and `scale` are the mesh's own. */
187
+ type VaultPart = {
188
+ shape: 'vault';
189
+ parent: number;
190
+ x: number;
191
+ y: number;
192
+ z: number;
193
+ radius: number;
194
+ length: number;
195
+ arc: number;
196
+ segments: number;
197
+ color: number;
198
+ rotation: {
199
+ x: number;
200
+ y: number;
201
+ z: number;
202
+ };
203
+ scale: {
204
+ x: number;
205
+ y: number;
206
+ z: number;
207
+ };
208
+ style?: PartStyle;
209
+ };
210
+ /** The ground: a square mesh of the grid's vertices with a colour each, flat shaded, that casts and receives shadows. */
211
+ type TerrainPart = {
212
+ shape: 'terrain';
213
+ parent: number;
214
+ grid: TerrainGrid;
215
+ style?: PartStyle;
216
+ };
217
+ /** A flat rectangle lying on the ground (`y` is its height). */
218
+ type PlanePart = {
219
+ shape: 'plane';
220
+ parent: number;
221
+ x: number;
222
+ y: number;
223
+ z: number;
224
+ width: number;
225
+ depth: number;
226
+ color: number;
227
+ style?: PartStyle;
228
+ };
229
+ /** Text over one or more lines on a canvas texture (street names, strip labels). */
230
+ type LabelPart = {
231
+ shape: 'label';
232
+ parent: number;
233
+ x: number;
234
+ y: number;
235
+ z: number;
236
+ width: number;
237
+ height: number;
238
+ ry: number;
239
+ lines: string[];
240
+ background: string;
241
+ foreground: string;
242
+ font: string;
243
+ canvas: {
244
+ width: number;
245
+ height: number;
246
+ };
247
+ };
248
+ /** A real light. A lamp that did not get one from the budget keeps its glowing lens and has no part like this. */
249
+ type LightPart = ({
250
+ shape: 'light';
251
+ kind: 'point';
252
+ parent: number;
253
+ x: number;
254
+ y: number;
255
+ z: number;
256
+ color: number;
257
+ intensity: number;
258
+ distance: number;
259
+ decay: number;
260
+ flicker: boolean;
261
+ } & Flickering) | {
262
+ shape: 'light';
263
+ kind: 'spot';
264
+ parent: number;
265
+ x: number;
266
+ y: number;
267
+ z: number;
268
+ color: number;
269
+ intensity: number;
270
+ distance: number;
271
+ decay: number;
272
+ angle: number;
273
+ penumbra: number;
274
+ /** Where the beam points at rest. */
275
+ target: {
276
+ x: number;
277
+ y: number;
278
+ z: number;
279
+ };
280
+ /** When set the target circles the light: `target = (x + sin(t·speed + x)·radius, 0, z + cos(t·speed + x)·radius)`. */
281
+ sweep?: {
282
+ speed: number;
283
+ radius: number;
284
+ };
285
+ };
286
+ /**
287
+ * A thing another package draws where the scene says: a vehicle of the fleet or a plant of the species pack. The scene keeps only
288
+ * what to put and where; the drawer asks the resolver of that kind for an object (nothing is drawn when it has none).
289
+ * `y` is the base on the ground, `color` the body paint of a vehicle (omitted: the palette of its group by `seed`).
290
+ */
291
+ type PlacementPart = {
292
+ shape: 'placement';
293
+ parent: number;
294
+ kind: 'vehicle' | 'plant';
295
+ /** Id of the vehicle in the fleet or of the species in the pack. */
296
+ id: string;
297
+ x: number;
298
+ y: number;
299
+ z: number;
300
+ ry: number;
301
+ scale: number;
302
+ color?: number;
303
+ seed: number | string;
304
+ };
305
+ /** The parts of an urban scene: the silhouette vocabulary of game-floorplan plus what streets and poles need. */
306
+ type UrbanPart = (Styled<SilhouettePart> & Flickering) | ConePart | CrownPart | PlanePart | VaultPart | TerrainPart | LabelPart | LightPart | PlacementPart;
307
+ /** One small box drawn as an instance of a single mesh (dashes of a road, sandbags). `y` is the base. */
308
+ type ItemBox = {
309
+ x: number;
310
+ y: number;
311
+ z: number;
312
+ width: number;
313
+ height: number;
314
+ depth: number;
315
+ color: number;
316
+ rx: number;
317
+ ry: number;
318
+ rz: number;
319
+ };
320
+ /** Everything a pole, a street, a block or a prop adds to a scene, in the order the team's page adds it. */
321
+ type UrbanScene = {
322
+ parts: UrbanPart[];
323
+ items: ItemBox[];
324
+ windows: {
325
+ lit: SilhouetteWindow[];
326
+ dark: SilhouetteWindow[];
327
+ };
328
+ };
329
+ /**
330
+ * How many lights a scene may spend (a counter, not the render budget of `@adatechnology/game-render-three`). Every lamp that is on takes one, and the first ones win; the rest keep only their
331
+ * glowing lens.
332
+ */
333
+ type LightAllowance = {
334
+ /** Lights left. It goes below zero when more lamps ask than the budget had, as the team's counter does. */
335
+ left: number;
336
+ /** True while the budget lasts (spends one either way). */
337
+ take(): boolean;
338
+ };
339
+ /** @deprecated Renamed `LightAllowance`: `LightBudget` is the name of the render budget of `@adatechnology/game-render-three`. Removed in the next major. */
340
+ type LightBudget = LightAllowance;
341
+
342
+ /** How the lamps of a street are kept: `lit` is the share of lamps that work, `flicker` the share of all lamps that work badly (a part of `lit`). The rest are burnt out. */
343
+ type LampShares = {
344
+ readonly lit: number;
345
+ readonly flicker: number;
346
+ };
347
+ /** One lamp: `on` for `PoleOptions.on`, `flicker` for `PoleOptions.flicker`. */
348
+ type LampState = {
349
+ readonly on: boolean;
350
+ readonly flicker: boolean;
351
+ };
352
+ type LampStateParams = {
353
+ readonly seed: number;
354
+ readonly x: number;
355
+ readonly z: number;
356
+ readonly shares: LampShares;
357
+ };
358
+ /** The phase (radians, [0, 2π)) a failing lamp at `x, z` flickers on: its lens and its light share it. A drawer may round it: game-urban-three rounds it to 4 groups, so about a quarter of the failing lamps blink in step. */
359
+ declare const flickerPhaseOf: (x: number, z: number) => number;
360
+ /** Throws when the shares are not `0 <= flicker <= lit <= 1`. */
361
+ declare function assertLampShares(shares: LampShares): void;
362
+ /**
363
+ * Whether the lamp standing at `x, z` works, flickers or is burnt out, by a hash of the seed and the spot: the same street with the same seed keeps the same dead and failing lamps,
364
+ * and the choice does not draw from the builder's random, so the scene around it keeps its draw order.
365
+ */
366
+ declare function lampStateOf({ seed, x, z, shares }: LampStateParams): LampState;
367
+
368
+ type BoxOptions = {
369
+ parent?: number;
370
+ ry?: number;
371
+ rz?: number;
372
+ emissive?: boolean;
373
+ style?: PartStyle;
374
+ flickerPhase?: number;
375
+ };
376
+ type UrbanBuilderOptions = {
377
+ /** Lights the scene may spend; omitted means no limit. */
378
+ budget?: LightAllowance;
379
+ };
380
+ /**
381
+ * Collects the parts of an urban scene the way the team's page adds them to its root: every helper appends in call order, so a
382
+ * scene drawn with the same seeded random has the same parts, the same instances and the same windows.
383
+ * Heights follow the page: `y` is the base of a box, a cylinder, a cone and a prism, and the centre of a crown.
384
+ */
385
+ declare function createUrbanBuilder(random: RandomSource, options?: UrbanBuilderOptions): {
386
+ random: RandomSource;
387
+ pick: <TEntry>(list: readonly TEntry[]) => TEntry;
388
+ lights: LightAllowance;
389
+ parts: UrbanPart[];
390
+ items: ItemBox[];
391
+ windows: {
392
+ lit: _adatechnology_game_floorplan.SilhouetteWindow[];
393
+ dark: _adatechnology_game_floorplan.SilhouetteWindow[];
394
+ };
395
+ group: (x: number, y: number, z: number, ry?: number, parent?: number) => number;
396
+ box: (x: number, y: number, z: number, width: number, height: number, depth: number, color: number, o?: BoxOptions) => void;
397
+ cylinder: (x: number, y: number, z: number, radiusTop: number, radiusBottom: number, height: number, color: number, parent?: number, segments?: number, style?: PartStyle) => void;
398
+ cone: (x: number, y: number, z: number, radius: number, height: number, color: number, parent?: number, segments?: number) => void;
399
+ prism: (x: number, y: number, z: number, width: number, height: number, depth: number, color: number, parent?: number, ry?: number) => void;
400
+ plane: (x: number, y: number, z: number, width: number, depth: number, color: number, style?: PartStyle, parent?: number) => void;
401
+ vault: (part: Omit<Extract<UrbanPart, {
402
+ shape: "vault";
403
+ }>, "shape" | "parent"> & {
404
+ parent?: number;
405
+ }) => void;
406
+ terrain: (grid: TerrainGrid, parent?: number) => void;
407
+ crown: (x: number, y: number, z: number, radius: number, color: number, parent?: number) => void;
408
+ line: (points: [number, number, number][], color: number, parent?: number) => void;
409
+ label: (lines: string[], x: number, y: number, z: number, width: number, height: number, ry: number, o: {
410
+ background: string;
411
+ foreground: string;
412
+ font?: string;
413
+ canvas?: {
414
+ width: number;
415
+ height: number;
416
+ };
417
+ }, parent?: number) => void;
418
+ light: (part: Omit<Extract<LightPart, {
419
+ kind: "point";
420
+ }>, "shape" | "kind" | "parent" | "decay" | "flicker"> & {
421
+ flicker?: boolean;
422
+ decay?: number;
423
+ }) => void;
424
+ spot: (part: Omit<Extract<LightPart, {
425
+ kind: "spot";
426
+ }>, "shape" | "kind" | "parent">) => void;
427
+ place: (kind: PlacementPart["kind"], id: string, x: number, z: number, o?: {
428
+ y?: number;
429
+ ry?: number;
430
+ scale?: number;
431
+ color?: number;
432
+ seed?: number | string;
433
+ parent?: number;
434
+ }) => void;
435
+ item: (x: number, y: number, z: number, width: number, height: number, depth: number, color: number, ry?: number, rx?: number, rz?: number) => void;
436
+ fence: (x0: number, z0: number, x1: number, z1: number, height: number, color?: number) => void;
437
+ add: (silhouette: Silhouette) => void;
438
+ scene: () => UrbanScene;
439
+ };
440
+ type UrbanBuilder = ReturnType<typeof createUrbanBuilder>;
441
+
442
+ /** The pole that carries the lamp: a tapered cylinder. */
443
+ type MastSpec = {
444
+ radiusTop: number;
445
+ radiusBottom: number;
446
+ height: number;
447
+ color: number;
448
+ segments?: number;
449
+ style?: PartStyle;
450
+ };
451
+ /** A bar or a box of the pole, placed by its base `y`. `reach` is how far from the mast its centre sits. */
452
+ type BarSpec = {
453
+ reach: number;
454
+ y: number;
455
+ width: number;
456
+ height: number;
457
+ depth: number;
458
+ color: number;
459
+ };
460
+ /** The box of a lamp head: its colour is the lens, lit or unlit. */
461
+ type LampSpec = {
462
+ reach: number;
463
+ y: number;
464
+ width: number;
465
+ height: number;
466
+ depth: number;
467
+ };
468
+ /** Colour of the lamp lens when the lamp is on (it glows) and when it is off. */
469
+ type LensSpec = {
470
+ lit: number;
471
+ unlit: number;
472
+ };
473
+ /** The real light a lamp that is on may get from the budget. `reach` moves it along the arm. */
474
+ type LampLightSpec = {
475
+ color: number;
476
+ intensity: number;
477
+ distance: number;
478
+ y: number;
479
+ reach?: number;
480
+ z?: number;
481
+ };
482
+ /** Double arm with two LED heads (the avenue pole of the downtown pattern). */
483
+ type DoubleArmSpec = {
484
+ mast: MastSpec;
485
+ arm: BarSpec;
486
+ lamp: LampSpec;
487
+ lens: LensSpec;
488
+ light: LampLightSpec;
489
+ };
490
+ /** Concrete pole with one arm and a sodium lamp, with an optional transformer drum. */
491
+ type SingleArmSpec = {
492
+ mast: MastSpec;
493
+ arm: BarSpec;
494
+ lamp: LampSpec;
495
+ lens: LensSpec;
496
+ light: LampLightSpec;
497
+ transformer: {
498
+ offset: number;
499
+ y: number;
500
+ radius: number;
501
+ height: number;
502
+ color: number;
503
+ segments: number;
504
+ };
505
+ };
506
+ /** The bands of a distribution pole, top down: medium voltage, transformer, low voltage, street light, telecom. */
507
+ type PoleSlotBand = 'mv' | 'transformer' | 'lv' | 'lighting' | 'telecom';
508
+ /**
509
+ * Where each network is fixed on a distribution pole: `[bottom, top]` in metres over the ground. `height` is the whole pole and
510
+ * `embedment` what is buried of it (`postEmbedment(height)` of game-destruction), so the bands fit in `height - embedment`.
511
+ */
512
+ type PoleSlots = {
513
+ readonly height: number;
514
+ readonly embedment: number;
515
+ readonly bands: Readonly<Record<PoleSlotBand, readonly [number, number]>>;
516
+ };
517
+ /**
518
+ * A distribution pole: the single arm pole plus the bands its networks are fixed at and the hardware that fixes them (`distributionHardwareOf`):
519
+ * the crossarm (`reach` its centre toward the road) with its pin insulators (`at` along it), the transformer's bushings (`spread` apart on its lid),
520
+ * the low-voltage cable's clamp and the telecom clamps `out` on the field side, and the guy wire (`reach` from the mast to its anchor).
521
+ */
522
+ type DistributionSpec = SingleArmSpec & {
523
+ readonly slots: PoleSlots;
524
+ readonly crossarm: {
525
+ readonly reach: number;
526
+ readonly width: number;
527
+ readonly height: number;
528
+ readonly depth: number;
529
+ readonly color: number;
530
+ };
531
+ readonly insulators: {
532
+ readonly at: readonly number[];
533
+ readonly radius: number;
534
+ readonly color: number;
535
+ };
536
+ readonly bushings: {
537
+ readonly spread: number;
538
+ readonly radius: number;
539
+ readonly height: number;
540
+ readonly color: number;
541
+ };
542
+ readonly lowVoltage: {
543
+ readonly out: number;
544
+ readonly color: number;
545
+ };
546
+ readonly telecom: {
547
+ readonly out: number;
548
+ readonly color: number;
549
+ };
550
+ readonly guy: {
551
+ readonly reach: number;
552
+ readonly color: number;
553
+ };
554
+ };
555
+ /** A registry entry of a distribution pole: the `distribution` shape reads a `DistributionSpec`. */
556
+ type DistributionPoleDef = PoleDef & {
557
+ shape: 'distribution';
558
+ spec: DistributionSpec;
559
+ };
560
+ type PoleDef = {
561
+ id: string;
562
+ /** Key of the shape builder that reads `spec`. */
563
+ shape: string;
564
+ spec: object;
565
+ };
566
+
567
+ /** Short iron post with a lantern box and a pointed cap. */
568
+ type LanternSpec = {
569
+ mast: MastSpec;
570
+ lamp: LampSpec;
571
+ cap: {
572
+ y: number;
573
+ radius: number;
574
+ height: number;
575
+ color: number;
576
+ segments: number;
577
+ };
578
+ lens: LensSpec;
579
+ light: LampLightSpec;
580
+ };
581
+ /** Wooden pole with a crossarm and a hanging lamp. */
582
+ type CrossarmSpec = {
583
+ mast: MastSpec;
584
+ arm: BarSpec;
585
+ lamp: LampSpec;
586
+ lens: LensSpec;
587
+ light: LampLightSpec;
588
+ };
589
+ /** Four-legged tower with a deck and a row of floodlights. */
590
+ type FloodTowerSpec = {
591
+ legs: {
592
+ offset: number;
593
+ height: number;
594
+ size: number;
595
+ color: number;
596
+ };
597
+ deck: BarSpec;
598
+ heads: {
599
+ count: number;
600
+ start: number;
601
+ spacing: number;
602
+ y: number;
603
+ z: number;
604
+ width: number;
605
+ height: number;
606
+ depth: number;
607
+ };
608
+ lens: LensSpec;
609
+ light: LampLightSpec;
610
+ };
611
+ /** What a game says when it places a pole. */
612
+ type PoleOptions = {
613
+ x: number;
614
+ z: number;
615
+ /** Lit lamp (glowing lens and, while the budget lasts, a real light). Default true. */
616
+ on?: boolean;
617
+ /**
618
+ * Turns the whole pole about y (radians, as three.js turns an object): its arm, lamp and light leave the mast along the turned +x, so a pole by a street running along x reaches over
619
+ * the road with `ry = ±π/2`. Default 0 (the arm along +x).
620
+ */
621
+ ry?: number;
622
+ /** The real light flickers (a failing lamp). */
623
+ flicker?: boolean;
624
+ /** Which way the arm points along the turned x, 1 or -1 (single arm). Default 1. */
625
+ dir?: number;
626
+ /** Adds the transformer drum (single arm). */
627
+ transformer?: boolean;
628
+ };
629
+ /** Draws a pole from its `spec`. Declared as a method so the registry can hold each builder with its own spec type (the `PoleDef` names the builder that reads its spec). */
630
+ type PoleShapeBuilder<TSpec extends object = object> = {
631
+ build(b: UrbanBuilder, spec: TSpec, o: PoleOptions): void;
632
+ }['build'];
633
+ /** The shape builders the default poles use; a game adds its own through `createUrban({ shapes })`. */
634
+ declare const POLE_SHAPES: Readonly<Record<string, PoleShapeBuilder>>;
635
+ /**
636
+ * The five poles of the neighbourhood patterns, with the numbers of the Galeria (heights, arms, lens colours, the colour,
637
+ * strength and reach of the real light), and the distribution pole the utility networks stand on. A game patches a number by id or adds a pole with its own shape.
638
+ */
639
+ declare const DEFAULT_POLES: readonly PoleDef[];
640
+
641
+ /**
642
+ * One kind of tower the city can put on a tall lot: the numbers of a typology of `game-floorplan-commercial` (office) or `game-floorplan-residential`
643
+ * (residential), which the tests keep equal to theirs. The city only draws the outside; the plan of the inside is the typology's.
644
+ */
645
+ type TowerPreset = {
646
+ id: string;
647
+ /** Chance weight among the presets (the one the random picks). */
648
+ weight: number;
649
+ /** Floor to floor in metres: the clear height of the typology plus its slab. */
650
+ storeyHeight: number;
651
+ /** A plant floor (darker band, no windows) every this many storeys; `false` none. */
652
+ mechanicalEvery: number | false;
653
+ /** A glass curtain wall (a ribbon of tall windows on a tinted skin) or a punched facade (a window in each bay of the masonry). */
654
+ glass: boolean;
655
+ /** Fewest and most storeys this preset's towers have (the lot height is raised or cut to it); omitted: no minimum, and `TowerOptions.maxStoreys` for the top. */
656
+ minStoreys?: number;
657
+ maxStoreys?: number;
658
+ /** Colour of the skin; omitted: the facade colour the block drew for the lot (glass: a blue tint of it). */
659
+ color?: number;
660
+ };
661
+ /** The two typologies: the office tower (4.0 m storeys: 3.6 clear and 0.4 slab, a plant floor every 20, glass) and the residential tower (3.1 m, every 25, masonry). */
662
+ declare const DEFAULT_TOWER_PRESETS: readonly TowerPreset[];
663
+ /**
664
+ * A preset from the layout of a typology (`officeTowerLayout(opts)`, `residentialTowerLayout(opts)`), so the city draws the tower the game configured:
665
+ * the storey pitch and the facade come from the layout, the storey range from its `range` when given.
666
+ */
667
+ declare const towerPresetOf: (id: string, weight: number, layout: {
668
+ pitch: number;
669
+ facade: "curtain" | "punched";
670
+ }, extra?: Partial<Omit<TowerPreset, "id" | "weight" | "storeyHeight" | "glass">>) => TowerPreset;
671
+ /** What a game asks a tower provider to put on the ground: the lot, the height, the preset the random chose and the facade colour. */
672
+ type TowerRequest = {
673
+ x: number;
674
+ z: number;
675
+ width: number;
676
+ depth: number;
677
+ height: number;
678
+ color: number;
679
+ preset: TowerPreset;
680
+ lit: number;
681
+ use?: string;
682
+ storeys?: number;
683
+ };
684
+ /** Draws a tower in place of the default one (the game's own model, or the plan of the typology rendered by `game-floorplan-three`). */
685
+ type TowerProvider = (request: TowerRequest, b: UrbanBuilder) => void;
686
+ type TowerOptions = {
687
+ /** A building at least this tall (metres) is drawn as a tower. Default 60. */
688
+ minHeight?: number;
689
+ /** Kinds of tower and their weights. Default `DEFAULT_TOWER_PRESETS`. */
690
+ presets?: readonly TowerPreset[];
691
+ /** Replaces the default drawing. */
692
+ provider?: TowerProvider;
693
+ /** The crown: height of the mast over the roof as a share of the tower (default 0.06, at most 25 m), 0 for none. */
694
+ mast?: number;
695
+ /** Most storeys a tower may have (default 60, the structural limit of the kit): a taller lot is drawn at this many storeys of its preset. */
696
+ maxStoreys?: number;
697
+ /** Chance that a window is lit when the block did not say (default 0.12). */
698
+ lit?: number;
699
+ };
700
+ declare const TOWER_DEFAULTS: {
701
+ readonly minHeight: 60;
702
+ readonly maxStoreys: 60;
703
+ readonly mast: 0.06;
704
+ readonly lit: 0.12;
705
+ };
706
+ /** The preset the random picks by weight; draws once. */
707
+ declare function pickTowerPreset(b: UrbanBuilder, presets: readonly TowerPreset[]): TowerPreset;
708
+ /** Storeys of a tower of this height, the podium (a taller ground storey) included. */
709
+ declare const towerStoreys: (height: number, preset: TowerPreset) => number;
710
+ /**
711
+ * A tower: a podium with a taller ground storey, the shaft with a row of windows on every storey of its four faces, darker bands where the plant
712
+ * floors are (no windows), the top plant floor set back, the parapet and the mast. Draws one random per window (lit or not), after the preset's.
713
+ */
714
+ declare function drawTower(b: UrbanBuilder, request: TowerRequest, options?: Pick<TowerOptions, 'mast'>): BlockBuilding;
715
+ /** The drawer a kit uses for a building of the block or the avenue: a tower from the minimum height up, the plain city building under it. */
716
+ declare function createTowerDrawer(towers: TowerOptions, plain: (b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, o?: BuildingOptions) => BlockBuilding): (b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, o?: BuildingOptions) => BlockBuilding;
717
+
718
+ /** Facade colours of the city buildings (the Galeria's `FAC`). */
719
+ declare const DEFAULT_FACADES: readonly number[];
720
+ type FillBlockOptions = {
721
+ /** The block is split into `k x k` lots. Default 2. */
722
+ k?: number;
723
+ /** Chance that a lot stays empty. Default 0.08. */
724
+ gap?: number;
725
+ /** Chance that a window is lit. */
726
+ lit?: number;
727
+ /** Chance of a ground-floor shop on a building. */
728
+ shop?: number;
729
+ /** Facade colours. Default `DEFAULT_FACADES`. */
730
+ palette?: readonly number[];
731
+ /**
732
+ * Storeys of each building, a number or `[min, max]` (the same name and shape as a city block's `building.floors`). Given, the height is storeys times the
733
+ * storey height of the use's preset instead of `minHeight..maxHeight`; the random draws are the same.
734
+ */
735
+ floors?: number | readonly [number, number];
736
+ /** Share of the buildings by use (`commercial`, `residential`, ...); each building picks one (one more random draw). Needs no `floors`. */
737
+ uses?: Readonly<Record<string, number>>;
738
+ /** Which tower preset gives the storey height of a use. Default `{ commercial: 'office', residential: 'residential' }`. */
739
+ storeyPresets?: Readonly<Record<string, string>>;
740
+ /** The presets whose storey heights are used (default `DEFAULT_TOWER_PRESETS`; the kit passes its `towers.presets`). */
741
+ presets?: readonly TowerPreset[];
742
+ /** Storey height when no preset applies, metres. Default the residential preset's. */
743
+ storeyHeight?: number;
744
+ /** Draws each building (default `drawBuilding`): the kit passes its own to put towers on the tall lots. */
745
+ draw?: (b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, options: BuildingOptions) => BlockBuilding;
746
+ };
747
+ /** A building a block ended up with, for the game's own bookkeeping (collisions, minimap). */
748
+ type BlockBuilding = {
749
+ x: number;
750
+ z: number;
751
+ width: number;
752
+ depth: number;
753
+ height: number;
754
+ color: number;
755
+ };
756
+ type BuildingOptions = {
757
+ lit?: number;
758
+ shop?: number;
759
+ /** Use of the building (`commercial`, `residential`...), when the block gave `uses`. */
760
+ use?: string;
761
+ /** Storeys of the building, when the block gave `floors`; the height is already storeys times the storey height. */
762
+ storeys?: number;
763
+ /** Id of the tower preset the use maps to; a tower drawer with that preset uses it instead of picking at random. */
764
+ preset?: string;
765
+ };
766
+ declare const DEFAULT_STOREY_PRESETS: Readonly<Record<string, string>>;
767
+ /** One city building: block, roof slab, maybe a vent on the roof, maybe a shop front on both long faces, windows on the four faces. Draws from the builder's random. */
768
+ declare function drawBuilding(b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, options?: BuildingOptions): BlockBuilding;
769
+ /**
770
+ * Fills a square block with city buildings: a `k x k` split of the block less 2 m of street, each lot maybe empty, each building a
771
+ * little smaller than its lot and as tall as `lerp(min, max, random^1.6)` (more low buildings than tall ones). Draws from the
772
+ * builder's random in the page's order: gap, width, depth, height, facade, then the building's own.
773
+ */
774
+ declare function fillBlock(b: UrbanBuilder, cx: number, cz: number, size: number, minHeight: number, maxHeight: number, options?: FillBlockOptions): BlockBuilding[];
775
+
776
+ /** What a game asks a house provider to put on the ground. Fields a typology does not use are ignored. */
777
+ type HouseRequest = {
778
+ x: number;
779
+ z: number;
780
+ /** Turn of the whole house; the default provider turns the group. */
781
+ ry?: number;
782
+ width?: number;
783
+ depth?: number;
784
+ floors?: number;
785
+ color?: number;
786
+ roofColor?: number;
787
+ hasDoor?: boolean;
788
+ isBoarded?: boolean;
789
+ };
790
+ /** Draws a house of the given typology into the builder (and may add vehicles, plants or anything else around it). */
791
+ type HouseProvider = (typology: string, request: HouseRequest, b: UrbanBuilder) => void;
792
+ /** Draws a vehicle where the pattern parks one. A pattern parks none unless a provider is given. */
793
+ type VehicleRequest = {
794
+ x: number;
795
+ z: number;
796
+ ry: number;
797
+ color: number;
798
+ };
799
+ type VehicleProvider = (request: VehicleRequest, b: UrbanBuilder) => void;
800
+ /** Draws a tree where the pattern plants one. The default is the cone pine and the ball tree of the street props. */
801
+ type PlantRequest = {
802
+ kind: 'pine' | 'tree';
803
+ x: number;
804
+ z: number;
805
+ scale: number;
806
+ };
807
+ type PlantProvider = (request: PlantRequest, b: UrbanBuilder) => void;
808
+ type Providers = {
809
+ house?: HouseProvider;
810
+ vehicle?: VehicleProvider;
811
+ plant?: PlantProvider;
812
+ };
813
+ /** The cell of the sample sheet and what was put there, as data. */
814
+ type UrbanPlan = {
815
+ id: string;
816
+ origin: {
817
+ x: number;
818
+ z: number;
819
+ };
820
+ houses: {
821
+ typology: string;
822
+ x: number;
823
+ z: number;
824
+ ry: number;
825
+ }[];
826
+ buildings: BlockBuilding[];
827
+ poles: {
828
+ pole: string;
829
+ x: number;
830
+ z: number;
831
+ on: boolean;
832
+ }[];
833
+ vehicles: VehicleRequest[];
834
+ plants: PlantRequest[];
835
+ };
836
+ type Locale = 'pt-BR' | 'en';
837
+ type PatternText = {
838
+ label: string;
839
+ title: string;
840
+ caption: string;
841
+ detail: string;
842
+ };
843
+ /**
844
+ * A neighbourhood pattern: numbers a game can change and a key into the registry of composers, which draw the street.
845
+ * `params` are the numbers of that composer (counts, pitch, palettes, positions of the poles).
846
+ */
847
+ type NeighbourhoodPattern<TParams = Record<string, unknown>> = {
848
+ id: string;
849
+ /** Width of the main paved strip (a road, a cobbled street, a yard or a boardwalk). */
850
+ streetWidth: number;
851
+ /** Width of the sidewalks; 0 when the pattern has none. */
852
+ walkWidth: number;
853
+ /** House and building typologies the pattern places (ids of the house provider). */
854
+ typologies: readonly string[];
855
+ /** Id of the kind of pole the pattern uses; empty when it has no public lighting. */
856
+ pole: string;
857
+ /** Colour of the light the lamps give. */
858
+ lightColor: number;
859
+ /** Metres between poles (0 when it has none). */
860
+ spacing: number;
861
+ /** Share of the lamps that are on; the rest are burnt out. 1 means all, without drawing from the random. */
862
+ lit: number;
863
+ /** Key into the composers. */
864
+ compose: string;
865
+ /** Where a map marker stands over the sample: its height and its shift in z from the origin. */
866
+ marker: {
867
+ height: number;
868
+ dz?: number;
869
+ };
870
+ /** Title, caption under the sample and marker text, by locale. */
871
+ text: Record<Locale, PatternText>;
872
+ params: TParams;
873
+ };
874
+ /** The parts of the kit a composer draws with: poles, streets, blocks and props. */
875
+ interface UrbanKitCore {
876
+ poles: {
877
+ get(id: string): {
878
+ build(b: UrbanBuilder, options: PoleOptions): void;
879
+ };
880
+ };
881
+ streets: {
882
+ road(b: UrbanBuilder, x: number, z: number, w: number, l: number, along: 'x' | 'z'): void;
883
+ walk(b: UrbanBuilder, x: number, z: number, w: number, d: number): void;
884
+ ground(b: UrbanBuilder, color?: number, size?: number): void;
885
+ grid(b: UrbanBuilder, g: {
886
+ block: number;
887
+ count: number;
888
+ width: number;
889
+ }): void;
890
+ };
891
+ block: {
892
+ facades: readonly number[];
893
+ building(b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, o?: BuildingOptions): BlockBuilding;
894
+ fill(b: UrbanBuilder, g: {
895
+ cx: number;
896
+ cz: number;
897
+ size: number;
898
+ minHeight: number;
899
+ maxHeight: number;
900
+ } & FillBlockOptions): BlockBuilding[];
901
+ };
902
+ props: {
903
+ fence(b: UrbanBuilder, x0: number, z0: number, x1: number, z1: number, height: number, color?: number): void;
904
+ tent(b: UrbanBuilder, x: number, z: number, ry: number, w: number, d: number, color?: number): void;
905
+ pine(b: UrbanBuilder, x: number, z: number, scale?: number, y?: number): void;
906
+ tree(b: UrbanBuilder, x: number, z: number, scale?: number): void;
907
+ container(b: UrbanBuilder, x: number, y: number, z: number, ry: number, color: number): void;
908
+ watchtower(b: UrbanBuilder, x: number, z: number, searchlight?: boolean): void;
909
+ sandbags(b: UrbanBuilder, x: number, z: number, length: number, along: 'x' | 'z', rows?: number): void;
910
+ label(b: UrbanBuilder, x: number, z: number, title: string, subtitle: string): void;
911
+ wires(b: UrbanBuilder, points: readonly (readonly [number, number])[], y: number, color?: number): void;
912
+ };
913
+ }
914
+ type ComposeContext<TParams = Record<string, unknown>> = {
915
+ kit: UrbanKitCore;
916
+ b: UrbanBuilder;
917
+ pattern: NeighbourhoodPattern<TParams>;
918
+ params: TParams;
919
+ x0: number;
920
+ z0: number;
921
+ plan: UrbanPlan;
922
+ /** True with the probability `share`; draws from the random unless the share is 1. */
923
+ isLit(share: number): boolean;
924
+ pole(options: PoleOptions & {
925
+ id?: string;
926
+ }): void;
927
+ house(typology: string, request: HouseRequest): void;
928
+ vehicle(request: VehicleRequest): void;
929
+ plant(request: PlantRequest): void;
930
+ building(x: number, z: number, width: number, depth: number, height: number, color: number, options?: {
931
+ lit?: number;
932
+ shop?: number;
933
+ }): void;
934
+ };
935
+ /**
936
+ * Draws a pattern from its params. Declared as a method so a registry of composers can hold each with its own params type
937
+ * (the pattern that names the composer carries the matching params).
938
+ */
939
+ type Composer<TParams = Record<string, unknown>> = {
940
+ compose(context: ComposeContext<TParams>): void;
941
+ }['compose'];
942
+ type ComposeOptions = {
943
+ locale?: Locale;
944
+ providers?: Providers;
945
+ };
946
+ type SilhouetteFactory = (request: HouseRequest, random: () => number) => Silhouette;
947
+
948
+ type DistrictKindText = {
949
+ name: string;
950
+ description: string;
951
+ };
952
+ /**
953
+ * A kind of district: what a patch of the city is. Numbers a game can change; the ids of `zone` and `pattern` point into other catalogues.
954
+ */
955
+ type DistrictKindDef = {
956
+ id: string;
957
+ /** Colour on the map (css hex). */
958
+ color: string;
959
+ /** Id of a zone of `game-floorplan-residential` / `game-floorplan-commercial` (`zt`, `zc`, `zr1`, ...); null for ground that is not built. */
960
+ zone: string | null;
961
+ /** Id of a neighbourhood pattern of `urban.neighbourhoods` (or `financial_district` of `TOWER_PATTERNS`); null for ground that is not built. */
962
+ pattern: string | null;
963
+ /** Storeys of the buildings, `[min, max]`. */
964
+ floors: readonly [number, number];
965
+ /** Share of the buildings by use (`commercial`, `residential`, `industrial`, `institutional`, `agricultural`, ...). */
966
+ uses: Readonly<Record<string, number>>;
967
+ /** Size of a block in metres; 0 means the kind has no blocks. */
968
+ block: number;
969
+ text: Record<Locale, DistrictKindText>;
970
+ };
971
+ type PlanRect = readonly [x0: number, z0: number, x1: number, z1: number];
972
+ type PlanPoint = readonly [x: number, z: number];
973
+ type PlanDistrict = {
974
+ id: string;
975
+ /** Id of a `DistrictKindDef`. */
976
+ kind: string;
977
+ rect: PlanRect;
978
+ /** Replaces the name of the kind; a string or one string by locale. */
979
+ name?: string | Partial<Record<Locale, string>>;
980
+ /** Replaces the storeys of the kind. */
981
+ floors?: readonly [number, number];
982
+ /** Replaces the shares of use of the kind. */
983
+ uses?: Readonly<Record<string, number>>;
984
+ };
985
+ type PlanLine = {
986
+ id: string;
987
+ /** `avenue`, `street`, `highway`, `rail`, `river` or any string a drawer knows. */
988
+ kind: string;
989
+ width: number;
990
+ points: readonly PlanPoint[];
991
+ };
992
+ type PlanLandmark = {
993
+ kind: string;
994
+ at: PlanPoint;
995
+ name?: string | Partial<Record<Locale, string>>;
996
+ };
997
+ type CityScale = 'metropolis' | 'city' | 'town' | 'village' | (string & {});
998
+ /**
999
+ * A city plan: districts painted on a map of metres (centre 0,0; x east, z south), roads, rails and rivers, and landmarks.
1000
+ * Districts are listed from the outer to the inner one: the LAST district that contains a point wins.
1001
+ */
1002
+ type CityPlanDef = {
1003
+ id: string;
1004
+ scale: CityScale;
1005
+ /** Width and depth of the map in metres. */
1006
+ size: readonly [w: number, d: number];
1007
+ text: Record<Locale, {
1008
+ name: string;
1009
+ description: string;
1010
+ }>;
1011
+ /** Id of another plan to start from: its districts, lines and landmarks come first; a district or line of the same id replaces, a new one appends. */
1012
+ extends?: string;
1013
+ districts: readonly PlanDistrict[];
1014
+ lines: readonly PlanLine[];
1015
+ landmarks: readonly PlanLandmark[];
1016
+ };
1017
+ /** A plan as a game writes it: with `extends`, everything but the id is optional and comes from the parent. */
1018
+ type CityPlanInput = {
1019
+ id: string;
1020
+ extends?: string;
1021
+ } & Partial<Omit<CityPlanDef, 'id' | 'extends'>>;
1022
+ type BlockUse = {
1023
+ floors: readonly [number, number];
1024
+ uses: Readonly<Record<string, number>>;
1025
+ zone: string | null;
1026
+ pattern: string | null;
1027
+ };
1028
+ type ResolvedDistrict = {
1029
+ id: string;
1030
+ kind: string;
1031
+ rect: PlanRect;
1032
+ name: string;
1033
+ description: string;
1034
+ color: string;
1035
+ zone: string | null;
1036
+ pattern: string | null;
1037
+ /** Storeys after the district's override, clamped to `[0, maxFloors]`. */
1038
+ floors: readonly [number, number];
1039
+ uses: Readonly<Record<string, number>>;
1040
+ block: number;
1041
+ };
1042
+ /** A block of a district: its centre, its dimensions less the street, and the config a building generator takes. */
1043
+ type Block = {
1044
+ x: number;
1045
+ z: number;
1046
+ size: readonly [w: number, d: number];
1047
+ district: string;
1048
+ building: BlockUse;
1049
+ };
1050
+ type CityLayout = {
1051
+ id: string;
1052
+ scale: string;
1053
+ size: readonly [number, number];
1054
+ name: string;
1055
+ description: string;
1056
+ districts: ResolvedDistrict[];
1057
+ lines: PlanLine[];
1058
+ landmarks: (Omit<PlanLandmark, 'name'> & {
1059
+ name?: string;
1060
+ })[];
1061
+ /** The district at a point; the last one in the list that contains it. */
1062
+ districtAt(x: number, z: number): ResolvedDistrict | undefined;
1063
+ /** The grid of blocks of a district (by the kind's block size), less the cells another district was painted over. */
1064
+ blocks(districtId: string, options?: {
1065
+ street?: number;
1066
+ }): Block[];
1067
+ };
1068
+ type LayoutOptions = {
1069
+ maxFloors?: number;
1070
+ locale?: Locale;
1071
+ };
1072
+ type KindStats = {
1073
+ kind: string;
1074
+ area: number;
1075
+ share: number;
1076
+ districts: number;
1077
+ };
1078
+ type FillBlockCityOptions = Omit<FillBlockOptions, 'shop'> & {
1079
+ /** Chance of a ground-floor shop; default the commercial share of the block. */
1080
+ shop?: number;
1081
+ /** Which tower preset gives the storey height of a use: default `{ commercial: 'office', residential: 'residential' }`. */
1082
+ storeyPresets?: Readonly<Record<string, string>>;
1083
+ /** Storey height when no preset applies, metres. Default the residential preset's. */
1084
+ storeyHeight?: number;
1085
+ };
1086
+
1087
+ export { type ForestOptions as $, type CrossarmSpec as A, type BlockBuilding as B, type CityPlanInput as C, type DistrictKindDef as D, type CrownPart as E, type FillBlockOptions as F, DEFAULT_FACADES as G, type HouseProvider as H, DEFAULT_POLES as I, DEFAULT_STOREY_PRESETS as J, type KindStats as K, type LightAllowance as L, DEFAULT_TOWER_PRESETS as M, type NeighbourhoodPattern as N, type DistributionPoleDef as O, type Point as P, type DistributionSpec as Q, type Rect as R, type SilhouetteFactory as S, type TowerPreset as T, type UrbanBuilder as U, type VehicleRequest as V, type DistrictKindText as W, type DoubleArmSpec as X, type Flatten as Y, type Flickering as Z, type FloodTowerSpec as _, type CityPlanDef as a, type HouseRequest as a0, type ItemBox as a1, type LabelPart as a2, type Lake as a3, type LampLightSpec as a4, type LampShares as a5, type LampSpec as a6, type LampState as a7, type LampStateParams as a8, type LanternSpec as a9, type TowerRequest as aA, type Trig as aB, type UrbanBuilderOptions as aC, type UrbanPart as aD, type UrbanScene as aE, type VaultPart as aF, type Wave as aG, type WorldFrame as aH, assertLampShares as aI, createTowerDrawer as aJ, createUrbanBuilder as aK, drawBuilding as aL, drawTower as aM, fillBlock as aN, flickerPhaseOf as aO, lampStateOf as aP, pickTowerPreset as aQ, towerPresetOf as aR, towerStoreys as aS, type LensSpec as aa, type LightBudget as ab, type LightPart as ac, type MastSpec as ad, POLE_SHAPES as ae, type PartStyle as af, type PatternText as ag, type PlacementPart as ah, type PlanDistrict as ai, type PlanLandmark as aj, type PlanLine as ak, type PlanPoint as al, type PlanRect as am, type PlanePart as an, type PoleSlotBand as ao, type PoleSlots as ap, type Providers as aq, type Ramp as ar, type ResolvedDistrict as as, type River as at, type RiverBed as au, type SingleArmSpec as av, TOWER_DEFAULTS as aw, type TerrainLayer as ax, type TerrainPart as ay, type TowerProvider as az, type LayoutOptions as b, type CityLayout as c, type Block as d, type FillBlockCityOptions as e, type ComposeOptions as f, type UrbanKitCore as g, type Composer as h, type UrbanPlan as i, type Locale as j, type TerrainOptions as k, type TerrainGrid as l, type PoleDef as m, type PoleOptions as n, type PoleShapeBuilder as o, type TowerOptions as p, type BuildingOptions as q, type PlantRequest as r, type PlantProvider as s, type VehicleProvider as t, type BarSpec as u, type BlockUse as v, type CityScale as w, type ColorRule as x, type ComposeContext as y, type ConePart as z };