@adatechnology/game-urban 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +80 -2
- package/dist/index.d.ts +1428 -0
- package/dist/index.global.js +31313 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +1087 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/budget.ts","../src/scene.ts","../src/poles.ts","../src/streets.ts","../src/block.ts","../src/props.ts","../src/kit.ts","../src/neighbourhoods/houses.ts","../src/neighbourhoods/compose.ts","../src/neighbourhoods/composers.ts","../src/neighbourhoods/patterns.ts","../src/terrain/math.ts","../src/terrain/terrain.ts","../src/neighbourhoods/providers.ts"],"sourcesContent":["import type { LightBudget } from './types'\n\n/** The team's counter: `take()` is `left-- > 0`, so the count keeps falling after the budget is spent. */\nexport function createLightBudget(count: number): LightBudget {\n const budget: LightBudget = {\n left: count,\n take() {\n return budget.left-- > 0\n },\n }\n return budget\n}\n","import { boxRadius } from '@adatechnology/game-floorplan'\n\nimport { createLightBudget } from './budget'\nimport type { TerrainGrid } from './terrain/types'\nimport type { ItemBox, LightBudget, LightPart, PartStyle, PlacementPart, RandomSource, Silhouette, UrbanPart, UrbanScene } from './types'\n\nconst ROOT = -1\nconst DEFAULT_CYLINDER_SEGMENTS = 14\nconst DEFAULT_CONE_SEGMENTS = 6\nconst DEFAULT_FENCE_WIRE = 0x8a8c8e\nconst DEFAULT_FENCE_POST = 0x6a6c6e\nconst DEFAULT_LABEL_FONT = '700 56px \"Arial Narrow\", Arial, sans-serif'\n\ntype BoxOptions = { parent?: number; ry?: number; rz?: number; emissive?: boolean; style?: PartStyle }\n\nexport type UrbanBuilderOptions = {\n /** Lights the scene may spend; omitted means no limit. */\n budget?: LightBudget\n}\n\n/**\n * 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\n * scene drawn with the same seeded random has the same parts, the same instances and the same windows.\n * Heights follow the page: `y` is the base of a box, a cylinder, a cone and a prism, and the centre of a crown.\n */\nexport function createUrbanBuilder(random: RandomSource, options: UrbanBuilderOptions = {}) {\n const parts: UrbanPart[] = []\n const items: ItemBox[] = []\n const windows: UrbanScene['windows'] = { lit: [], dark: [] }\n const lights = options.budget ?? createLightBudget(Number.POSITIVE_INFINITY)\n const pick = <TEntry>(list: readonly TEntry[]): TEntry => list[Math.floor(random() * list.length)] as TEntry\n\n const group = (x: number, y: number, z: number, ry = 0, parent = ROOT): number => parts.push({ shape: 'group', parent, x, y, z, ry }) - 1\n const box = (x: number, y: number, z: number, width: number, height: number, depth: number, color: number, o: BoxOptions = {}): void => {\n const part: UrbanPart = { shape: 'box', parent: o.parent ?? ROOT, x, y: y + height / 2, z, width, height, depth, color, emissive: o.emissive ?? false, ry: o.ry ?? 0, rz: o.rz ?? 0, radius: boxRadius(width, height, depth) }\n if (o.style) part.style = o.style\n parts.push(part)\n }\n const cylinder = (x: number, y: number, z: number, radiusTop: number, radiusBottom: number, height: number, color: number, parent = ROOT, segments = DEFAULT_CYLINDER_SEGMENTS, style?: PartStyle): void => {\n const part: UrbanPart = { shape: 'cylinder', parent, x, y: y + height / 2, z, radiusTop, radiusBottom, height, color, segments }\n if (style) part.style = style\n parts.push(part)\n }\n const cone = (x: number, y: number, z: number, radius: number, height: number, color: number, parent = ROOT, segments = DEFAULT_CONE_SEGMENTS): void => {\n parts.push({ shape: 'cone', parent, x, y: y + height / 2, z, radius, height, color, segments })\n }\n const prism = (x: number, y: number, z: number, width: number, height: number, depth: number, color: number, parent = ROOT, ry = 0): void => {\n parts.push({ shape: 'prism', parent, x, y, z, width, height, depth, color, ry })\n }\n const plane = (x: number, y: number, z: number, width: number, depth: number, color: number, style?: PartStyle, parent = ROOT): void => {\n const part: UrbanPart = { shape: 'plane', parent, x, y, z, width, depth, color }\n if (style) part.style = style\n parts.push(part)\n }\n const vault = (part: Omit<Extract<UrbanPart, { shape: 'vault' }>, 'shape' | 'parent'> & { parent?: number }): void => {\n parts.push({ shape: 'vault', ...part, parent: part.parent ?? ROOT })\n }\n const terrain = (grid: TerrainGrid, parent = ROOT): void => {\n parts.push({ shape: 'terrain', parent, grid })\n }\n const crown = (x: number, y: number, z: number, radius: number, color: number, parent = ROOT): void => {\n parts.push({ shape: 'crown', parent, x, y, z, radius, color })\n }\n const line = (points: [number, number, number][], color: number, parent = ROOT): void => {\n parts.push({ shape: 'line', parent, points, color })\n }\n const label = (lines: string[], x: number, y: number, z: number, width: number, height: number, ry: number, o: { background: string; foreground: string; font?: string; canvas?: { width: number; height: number } }, parent = ROOT): void => {\n parts.push({ shape: 'label', parent, x, y, z, width, height, ry, lines, background: o.background, foreground: o.foreground, font: o.font ?? DEFAULT_LABEL_FONT, canvas: o.canvas ?? { width: 512, height: 128 } })\n }\n const light = (part: Omit<Extract<LightPart, { kind: 'point' }>, 'shape' | 'kind' | 'parent' | 'decay' | 'flicker'> & { flicker?: boolean; decay?: number }): void => {\n parts.push({ shape: 'light', kind: 'point', parent: ROOT, decay: 2, flicker: false, ...part })\n }\n const spot = (part: Omit<Extract<LightPart, { kind: 'spot' }>, 'shape' | 'kind' | 'parent'>): void => {\n parts.push({ shape: 'light', kind: 'spot', parent: ROOT, ...part })\n }\n /** Asks the drawer for a vehicle or a plant at a spot; the scene does not know how it is drawn. */\n const place = (kind: PlacementPart['kind'], id: string, x: number, z: number, o: { y?: number; ry?: number; scale?: number; color?: number; seed?: number | string; parent?: number } = {}): void => {\n const part: PlacementPart = { shape: 'placement', parent: o.parent ?? ROOT, kind, id, x, y: o.y ?? 0, z, ry: o.ry ?? 0, scale: o.scale ?? 1, seed: o.seed ?? `${id}:${x}:${z}` }\n if (o.color !== undefined) part.color = o.color\n parts.push(part)\n }\n const item = (x: number, y: number, z: number, width: number, height: number, depth: number, color: number, ry = 0, rx = 0, rz = 0): void => {\n items.push({ x, y, z, width, height, depth, color, rx, ry, rz })\n }\n /** Cylinder posts every 3 m (at least two) and three wires, as the team's fence. */\n const fence = (x0: number, z0: number, x1: number, z1: number, height: number, color = DEFAULT_FENCE_POST): void => {\n const count = Math.ceil(Math.hypot(x1 - x0, z1 - z0) / 3)\n for (let index = 0; index <= count; index++) {\n const t = index / count\n cylinder(x0 + (x1 - x0) * t, 0, z0 + (z1 - z0) * t, 0.05, 0.05, height, color, ROOT, 5)\n }\n for (const level of [height * 0.35, height * 0.65, height * 0.98]) line([[x0, level, z0], [x1, level, z1]], DEFAULT_FENCE_WIRE)\n }\n /** Adds a silhouette of game-floorplan (a house far away, a city building): its parts keep their order and their groups are re-indexed, its windows join the scene's. */\n const add = (silhouette: Silhouette): void => {\n const offset = parts.length\n for (const part of silhouette.parts) parts.push(part.parent < 0 ? part : { ...part, parent: part.parent + offset })\n for (const window of silhouette.windows) (window.isLit ? windows.lit : windows.dark).push(window)\n }\n const scene = (): UrbanScene => ({ parts, items, windows })\n return { random, pick, lights, parts, items, windows, group, box, cylinder, cone, prism, plane, vault, terrain, crown, line, label, light, spot, place, item, fence, add, scene }\n}\n\nexport type UrbanBuilder = ReturnType<typeof createUrbanBuilder>\n","import type { UrbanBuilder } from './scene'\nimport type { PartStyle } from './types'\n\n/** The pole that carries the lamp: a tapered cylinder. */\nexport type MastSpec = { radiusTop: number; radiusBottom: number; height: number; color: number; segments?: number; style?: PartStyle }\n/** A bar or a box of the pole, placed by its base `y`. `reach` is how far from the mast its centre sits. */\nexport type BarSpec = { reach: number; y: number; width: number; height: number; depth: number; color: number }\n/** The box of a lamp head: its colour is the lens, lit or unlit. */\nexport type LampSpec = { reach: number; y: number; width: number; height: number; depth: number }\n/** Colour of the lamp lens when the lamp is on (it glows) and when it is off. */\nexport type LensSpec = { lit: number; unlit: number }\n/** The real light a lamp that is on may get from the budget. `reach` moves it along the arm. */\nexport type LampLightSpec = { color: number; intensity: number; distance: number; y: number; reach?: number; z?: number }\n\n/** Double arm with two LED heads (the avenue pole of the downtown pattern). */\nexport type DoubleArmSpec = { mast: MastSpec; arm: BarSpec; lamp: LampSpec; lens: LensSpec; light: LampLightSpec }\n/** Concrete pole with one arm and a sodium lamp, with an optional transformer drum. */\nexport type SingleArmSpec = {\n mast: MastSpec\n arm: BarSpec\n lamp: LampSpec\n lens: LensSpec\n light: LampLightSpec\n transformer: { offset: number; y: number; radius: number; height: number; color: number; segments: number }\n}\n/** Short iron post with a lantern box and a pointed cap. */\nexport type LanternSpec = { mast: MastSpec; lamp: LampSpec; cap: { y: number; radius: number; height: number; color: number; segments: number }; lens: LensSpec; light: LampLightSpec }\n/** Wooden pole with a crossarm and a hanging lamp. */\nexport type CrossarmSpec = { mast: MastSpec; arm: BarSpec; lamp: LampSpec; lens: LensSpec; light: LampLightSpec }\n/** Four-legged tower with a deck and a row of floodlights. */\nexport type FloodTowerSpec = {\n legs: { offset: number; height: number; size: number; color: number }\n deck: BarSpec\n heads: { count: number; start: number; spacing: number; y: number; z: number; width: number; height: number; depth: number }\n lens: LensSpec\n light: LampLightSpec\n}\n\n/** What a game says when it places a pole. */\nexport type PoleOptions = {\n x: number\n z: number\n /** Lit lamp (glowing lens and, while the budget lasts, a real light). Default true. */\n on?: boolean\n /** Turns the whole pole (the double arm only; the others are placed by their arm direction). */\n ry?: number\n /** The real light flickers (a failing lamp). */\n flicker?: boolean\n /** Which way the arm points, 1 or -1 (single arm). Default 1. */\n dir?: number\n /** Adds the transformer drum (single arm). */\n transformer?: boolean\n}\n\nexport type PoleShapeBuilder = (b: UrbanBuilder, spec: any, o: PoleOptions) => void\n\nexport type PoleDef = {\n id: string\n /** Key of the shape builder that reads `spec`. */\n shape: string\n spec: object\n}\n\nconst on = (o: PoleOptions): boolean => o.on ?? true\n\nfunction drawMast(b: UrbanBuilder, mast: MastSpec, x: number, z: number, parent = -1): void {\n b.cylinder(x, 0, z, mast.radiusTop, mast.radiusBottom, mast.height, mast.color, parent, mast.segments, mast.style)\n}\n\nfunction spendLight(b: UrbanBuilder, light: LampLightSpec, x: number, z: number, o: PoleOptions): void {\n if (on(o) && b.lights.take()) b.light({ x: x + (light.reach ?? 0), y: light.y, z: z + (light.z ?? 0), color: light.color, intensity: light.intensity, distance: light.distance, flicker: o.flicker ?? false })\n}\n\nconst doubleArm: PoleShapeBuilder = (b, spec: DoubleArmSpec, o) => {\n const group = b.group(o.x, 0, o.z, o.ry ?? 0)\n drawMast(b, spec.mast, 0, 0, group)\n for (const side of [-1, 1]) {\n b.box(side * spec.arm.reach, spec.arm.y, 0, spec.arm.width, spec.arm.height, spec.arm.depth, spec.arm.color, { parent: group })\n b.box(side * spec.lamp.reach, spec.lamp.y, 0, spec.lamp.width, spec.lamp.height, spec.lamp.depth, on(o) ? spec.lens.lit : spec.lens.unlit, { parent: group, emissive: on(o) })\n }\n spendLight(b, spec.light, o.x, o.z, o)\n}\n\nconst singleArm: PoleShapeBuilder = (b, spec: SingleArmSpec, o) => {\n const dir = o.dir ?? 1\n drawMast(b, spec.mast, o.x, o.z)\n b.box(o.x + dir * spec.arm.reach, spec.arm.y, o.z, spec.arm.width, spec.arm.height, spec.arm.depth, spec.arm.color)\n b.box(o.x + dir * spec.lamp.reach, spec.lamp.y, o.z, spec.lamp.width, spec.lamp.height, spec.lamp.depth, on(o) ? spec.lens.lit : spec.lens.unlit, { emissive: on(o) })\n if (o.transformer) b.cylinder(o.x - dir * spec.transformer.offset, spec.transformer.y, o.z, spec.transformer.radius, spec.transformer.radius, spec.transformer.height, spec.transformer.color, -1, spec.transformer.segments)\n spendLight(b, { ...spec.light, reach: dir * (spec.light.reach ?? spec.lamp.reach) }, o.x, o.z, o)\n}\n\nconst lantern: PoleShapeBuilder = (b, spec: LanternSpec, o) => {\n drawMast(b, spec.mast, o.x, o.z)\n b.box(o.x + spec.lamp.reach, spec.lamp.y, o.z, spec.lamp.width, spec.lamp.height, spec.lamp.depth, on(o) ? spec.lens.lit : spec.lens.unlit, { emissive: on(o) })\n b.cone(o.x, spec.cap.y, o.z, spec.cap.radius, spec.cap.height, spec.cap.color, -1, spec.cap.segments)\n spendLight(b, spec.light, o.x, o.z, o)\n}\n\nconst crossarm: PoleShapeBuilder = (b, spec: CrossarmSpec, o) => {\n drawMast(b, spec.mast, o.x, o.z)\n b.box(o.x + spec.arm.reach, spec.arm.y, o.z, spec.arm.width, spec.arm.height, spec.arm.depth, spec.arm.color)\n b.box(o.x + spec.lamp.reach, spec.lamp.y, o.z, spec.lamp.width, spec.lamp.height, spec.lamp.depth, on(o) ? spec.lens.lit : spec.lens.unlit, { emissive: on(o) })\n spendLight(b, { ...spec.light, reach: spec.light.reach ?? spec.lamp.reach }, o.x, o.z, o)\n}\n\nconst floodTower: PoleShapeBuilder = (b, spec: FloodTowerSpec, o) => {\n for (const a of [-1, 1]) for (const c of [-1, 1]) b.box(o.x + a * spec.legs.offset, 0, o.z + c * spec.legs.offset, spec.legs.size, spec.legs.height, spec.legs.size, spec.legs.color)\n b.box(o.x + spec.deck.reach, spec.deck.y, o.z, spec.deck.width, spec.deck.height, spec.deck.depth, spec.deck.color)\n for (let index = 0; index < spec.heads.count; index++) {\n b.box(o.x + spec.heads.start + index * spec.heads.spacing, spec.heads.y, o.z + spec.heads.z, spec.heads.width, spec.heads.height, spec.heads.depth, on(o) ? spec.lens.lit : spec.lens.unlit, { emissive: on(o) })\n }\n spendLight(b, spec.light, o.x, o.z, o)\n}\n\n/** The shape builders the five default poles use; a game adds its own through `createUrban({ shapes })`. */\nexport const POLE_SHAPES: Readonly<Record<string, PoleShapeBuilder>> = { double_arm: doubleArm, single_arm: singleArm, lantern, crossarm, flood_tower: floodTower }\n\nconst LED: DoubleArmSpec = {\n mast: { radiusTop: 0.1, radiusBottom: 0.14, height: 9, color: 0x55595e, style: { metalness: 0.6, roughness: 0.5 } },\n arm: { reach: 0.8, y: 8.8, width: 1.6, height: 0.1, depth: 0.12, color: 0x55595e },\n lamp: { reach: 1.5, y: 8.6, width: 0.6, height: 0.12, depth: 0.3 },\n lens: { lit: 0xeef4ff, unlit: 0x3a3a3a },\n light: { color: 0xdfe8ff, intensity: 1.3, distance: 24, y: 8 },\n}\n\nconst CONCRETE: SingleArmSpec = {\n mast: { radiusTop: 0.12, radiusBottom: 0.2, height: 8, color: 0x8a8a84, segments: 4 },\n arm: { reach: 0.7, y: 7.6, width: 1.4, height: 0.1, depth: 0.1, color: 0x6a6a66 },\n lamp: { reach: 1.35, y: 7.45, width: 0.5, height: 0.16, depth: 0.3 },\n lens: { lit: 0xffa040, unlit: 0x3a3a3a },\n light: { color: 0xff9a40, intensity: 1.3, distance: 20, y: 7.2 },\n transformer: { offset: 0.35, y: 6.2, radius: 0.28, height: 0.7, color: 0x5a5e62, segments: 8 },\n}\n\nconst IRON: LanternSpec = {\n mast: { radiusTop: 0.06, radiusBottom: 0.12, height: 4, color: 0x1e2022, segments: 8 },\n lamp: { reach: 0, y: 4, width: 0.42, height: 0.5, depth: 0.42 },\n cap: { y: 4.5, radius: 0.36, height: 0.3, color: 0x1e2022, segments: 4 },\n lens: { lit: 0xffd090, unlit: 0x2a2a2a },\n light: { color: 0xffc880, intensity: 1, distance: 14, y: 3.9 },\n}\n\nconst WOOD: CrossarmSpec = {\n mast: { radiusTop: 0.11, radiusBottom: 0.14, height: 7, color: 0x5a4630, segments: 6 },\n arm: { reach: 0, y: 6.6, width: 1.2, height: 0.08, depth: 0.08, color: 0x4a3a28 },\n lamp: { reach: 0.5, y: 6.35, width: 0.16, height: 0.22, depth: 0.16 },\n lens: { lit: 0xffe08a, unlit: 0x3a3a3a },\n light: { color: 0xffd27a, intensity: 0.9, distance: 16, y: 6.2 },\n}\n\nconst FLOOD: FloodTowerSpec = {\n legs: { offset: 0.4, height: 12, size: 0.12, color: 0x6a6c6e },\n deck: { reach: 0, y: 12, width: 2, height: 0.15, depth: 1.2, color: 0x6a6c6e },\n heads: { count: 3, start: -0.6, spacing: 0.6, y: 12.2, z: 0.4, width: 0.45, height: 0.35, depth: 0.2 },\n lens: { lit: 0xfff2d8, unlit: 0x3a3a3a },\n light: { color: 0xfff0d0, intensity: 1.6, distance: 34, y: 11.5, z: 2 },\n}\n\n/**\n * The five poles of the neighbourhood patterns, with the numbers of the Galeria (heights, arms, lens colours, the colour,\n * strength and reach of the real light). A game patches a number by id or adds a pole with its own shape.\n */\nexport const DEFAULT_POLES: readonly PoleDef[] = [\n { id: 'led_double', shape: 'double_arm', spec: LED },\n { id: 'concrete_arm', shape: 'single_arm', spec: CONCRETE },\n { id: 'cast_iron', shape: 'lantern', spec: IRON },\n { id: 'wood_crossarm', shape: 'crossarm', spec: WOOD },\n { id: 'flood_tower', shape: 'flood_tower', spec: FLOOD },\n]\n","import type { UrbanBuilder } from './scene'\n\n/** Look of the road surface and its centre line; the defaults are the Galeria's. */\nexport type RoadStyle = {\n color: number\n /** Painted dashes along the centre line. */\n dash: { color: number; every: number; first: number; length: number; width: number; height: number; y: number }\n}\n\nexport type WalkStyle = { color: number; height: number; castShadow: boolean }\n\nexport const DEFAULT_ROAD_STYLE: RoadStyle = { color: 0x222428, dash: { color: 0x8f7f4f, every: 5, first: 2, length: 1.8, width: 0.16, height: 0.01, y: 0.025 } }\nexport const DEFAULT_WALK_STYLE: WalkStyle = { color: 0x3a3b3c, height: 0.15, castShadow: false }\nconst ROAD_LEVEL = 0.02\nconst DEFAULT_GROUND_COLOR = 0x15181a\nconst DEFAULT_GROUND_SIZE = 600\n\nexport type StreetOptions = { road?: Partial<RoadStyle> & { dash?: Partial<RoadStyle['dash']> }; walk?: Partial<WalkStyle> }\n\nconst roadStyle = (o?: StreetOptions): RoadStyle => ({ ...DEFAULT_ROAD_STYLE, ...o?.road, dash: { ...DEFAULT_ROAD_STYLE.dash, ...o?.road?.dash } })\nconst walkStyle = (o?: StreetOptions): WalkStyle => ({ ...DEFAULT_WALK_STYLE, ...o?.walk })\n\n/** Road centred on (x, z), `w` wide and `l` long along `x` or `z`, with a dash every 5 m starting 2 m from its start. */\nexport function drawRoad(b: UrbanBuilder, x: number, z: number, w: number, l: number, along: 'x' | 'z', options?: StreetOptions): void {\n const style = roadStyle(options)\n const alongX = along === 'x'\n b.plane(x, ROAD_LEVEL, z, alongX ? l : w, alongX ? w : l, style.color)\n const { dash } = style\n for (let u = -l / 2 + dash.first; u < l / 2; u += dash.every) {\n b.item(alongX ? x + u : x, dash.y, alongX ? z : z + u, alongX ? dash.length : dash.width, dash.height, alongX ? dash.width : dash.length, dash.color)\n }\n}\n\n/** Sidewalk slab centred on (x, z). */\nexport function drawWalk(b: UrbanBuilder, x: number, z: number, w: number, d: number, options?: StreetOptions): void {\n const style = walkStyle(options)\n b.box(x, 0, z, w, style.height, d, style.color, { style: { castShadow: style.castShadow } })\n}\n\n/** The big plane under the scene. */\nexport function drawGround(b: UrbanBuilder, color = DEFAULT_GROUND_COLOR, size = DEFAULT_GROUND_SIZE): void {\n b.plane(0, 0, 0, size, size, color)\n}\n\n/**\n * A grid of `2n + 1` roads each way, `block` apart and `width` wide, with a sidewalk slab on every one of the `2n x 2n` blocks.\n * Roads first (z then x for each line), then the walks, as the page.\n */\nexport function drawStreetGrid(b: UrbanBuilder, block: number, count: number, width: number, options?: StreetOptions): void {\n for (let k = -count; k <= count; k++) {\n drawRoad(b, k * block, 0, width, block * 2 * count + width, 'z', options)\n drawRoad(b, 0, k * block, width, block * 2 * count + width, 'x', options)\n }\n for (let i = -count; i < count; i++) for (let j = -count; j < count; j++) drawWalk(b, i * block + block / 2, j * block + block / 2, block - width, block - width, options)\n}\n","import { createCityBuilding } from '@adatechnology/game-floorplan'\n\nimport type { UrbanBuilder } from './scene'\n\n/** Facade colours of the city buildings (the Galeria's `FAC`). */\nexport const DEFAULT_FACADES: readonly number[] = [0x3b3f45, 0x4a4038, 0x35403d, 0x463a3a, 0x3f3b34, 0x2f3439, 0x51493f, 0x5a564e]\n\nconst DEFAULT_PARTITIONS = 2\nconst DEFAULT_GAP = 0.08\nconst STREET_MARGIN = 2\nconst FOOTPRINT_TRIM = 1.2\nconst FOOTPRINT_JITTER = 1.5\nconst HEIGHT_CURVE = 1.6\n\nexport type FillBlockOptions = {\n /** The block is split into `k x k` lots. Default 2. */\n k?: number\n /** Chance that a lot stays empty. Default 0.08. */\n gap?: number\n /** Chance that a window is lit. */\n lit?: number\n /** Chance of a ground-floor shop on a building. */\n shop?: number\n /** Facade colours. Default `DEFAULT_FACADES`. */\n palette?: readonly number[]\n}\n\n/** A building a block ended up with, for the game's own bookkeeping (collisions, minimap). */\nexport type BlockBuilding = { x: number; z: number; width: number; depth: number; height: number; color: number }\n\nexport type BuildingOptions = { lit?: number; shop?: number }\n\n/** 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. */\nexport function drawBuilding(b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, options: BuildingOptions = {}): BlockBuilding {\n b.add(createCityBuilding({ x, z, width, depth, height, color, random: b.random, shopChance: options.shop, litChance: options.lit }))\n return { x, z, width, depth, height, color }\n}\n\nconst lerp = (a: number, b: number, t: number): number => a + (b - a) * t\n\n/**\n * 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\n * little smaller than its lot and as tall as `lerp(min, max, random^1.6)` (more low buildings than tall ones). Draws from the\n * builder's random in the page's order: gap, width, depth, height, facade, then the building's own.\n */\nexport function fillBlock(b: UrbanBuilder, cx: number, cz: number, size: number, minHeight: number, maxHeight: number, options: FillBlockOptions = {}): BlockBuilding[] {\n const placed: BlockBuilding[] = []\n const palette = options.palette ?? DEFAULT_FACADES\n const half = (size - STREET_MARGIN) / 2\n const k = options.k || DEFAULT_PARTITIONS\n const lot = (size - STREET_MARGIN) / k\n for (let i = 0; i < k; i++) {\n for (let j = 0; j < k; j++) {\n if (b.random() < (options.gap || DEFAULT_GAP)) continue\n const width = lot - FOOTPRINT_TRIM - b.random() * FOOTPRINT_JITTER\n const depth = lot - FOOTPRINT_TRIM - b.random() * FOOTPRINT_JITTER\n const height = lerp(minHeight, maxHeight, Math.pow(b.random(), HEIGHT_CURVE))\n const x = cx - half + lot * (i + 0.5)\n const z = cz - half + lot * (j + 0.5)\n const color = b.pick(palette)\n placed.push(drawBuilding(b, x, z, width, depth, height, color, options))\n }\n }\n return placed\n}\n","import type { UrbanBuilder } from './scene'\n\n/** Colours of the props; a game replaces the ones it wants. */\nexport type PropColors = {\n tent: number\n trunk: number\n pines: readonly number[]\n crowns: readonly number[]\n sandbags: number\n fence: number\n wire: number\n label: { background: string; foreground: string }\n watchtower: { leg: number; cabin: number; deck: number }\n}\n\nexport const DEFAULT_PROP_COLORS: PropColors = {\n tent: 0x4f5638,\n trunk: 0x3a2a1c,\n pines: [0x1f3324, 0x24382a, 0x1b2d20],\n crowns: [0x34452a, 0x3d4a2c, 0x2f3d26],\n sandbags: 0x8a7a5a,\n fence: 0x6a6c6e,\n wire: 0x2a2a2a,\n label: { background: 'rgba(16,18,22,.9)', foreground: '#e8dfcf' },\n watchtower: { leg: 0x4a3a2a, cabin: 0x4f5638, deck: 0x3a3a2a },\n}\n\nconst LABEL_FONT = '700 44px \"Arial Narrow\", Arial, sans-serif'\nconst LABEL_CANVAS = { width: 1024, height: 200 }\nconst SANDBAG_LENGTH = 0.56\n\nconst colors = (c?: Partial<PropColors>): PropColors => ({ ...DEFAULT_PROP_COLORS, ...c })\n\n/** Fence along a line: posts every 3 m and three wires. */\nexport function drawFence(b: UrbanBuilder, x0: number, z0: number, x1: number, z1: number, height: number, color?: number): void {\n b.fence(x0, z0, x1, z1, height, color)\n}\n\n/** Tent: a triangular prism `w` wide, 0.7 w high and `d` long, turned by `ry`. */\nexport function drawTent(b: UrbanBuilder, x: number, z: number, ry: number, w: number, d: number, color?: number, c?: Partial<PropColors>): void {\n b.prism(x, 0, z, w, w * 0.7, d, color ?? colors(c).tent, -1, ry)\n}\n\n/** Pine: a trunk and two cones of one of the greens (one draw from the random). */\nexport function drawPine(b: UrbanBuilder, x: number, z: number, scale = 1, y = 0, c?: Partial<PropColors>): void {\n const palette = colors(c)\n b.cylinder(x, y, z, 0.12 * scale, 0.16 * scale, 1 * scale, palette.trunk)\n const green = b.pick(palette.pines)\n b.cone(x, y + 0.8 * scale, z, 1.1 * scale, 2.2 * scale, green)\n b.cone(x, y + 2.1 * scale, z, 0.8 * scale, 1.8 * scale, green)\n}\n\n/** Tree: a trunk and a rough ball of leaves of one of the greens (one draw from the random). */\nexport function drawTree(b: UrbanBuilder, x: number, z: number, scale = 1, c?: Partial<PropColors>): void {\n const palette = colors(c)\n b.cylinder(x, 0, z, 0.12 * scale, 0.18 * scale, 1.8 * scale, palette.trunk)\n b.crown(x, 2.6 * scale, z, 1.3 * scale, b.pick(palette.crowns))\n}\n\n/** Shipping container (2.44 x 2.6 x 6.06 m) with five ribs on one end. */\nexport function drawContainer(b: UrbanBuilder, x: number, y: number, z: number, ry: number, color: number): void {\n const group = b.group(x, y, z, ry)\n b.box(0, 0, 0, 2.44, 2.6, 6.06, color, { parent: group, style: { roughness: 0.7, metalness: 0.3 } })\n for (let k = -2; k <= 2; k++) b.box(k * 0.5, 0, 3.04, 0.06, 2.6, 0.04, 0x1a1a1a, { parent: group })\n}\n\n/** Watch tower: four legs, a cabin, a roof deck and two posts; with a searchlight whose beam circles the ground. */\nexport function drawWatchtower(b: UrbanBuilder, x: number, z: number, searchlight = false, c?: Partial<PropColors>): void {\n const palette = colors(c).watchtower\n for (const a of [-1, 1]) for (const d of [-1, 1]) b.box(x + a * 1.2, 0, z + d * 1.2, 0.25, 7, 0.25, palette.leg)\n b.box(x, 7, z, 3.2, 1.2, 3.2, palette.cabin)\n b.box(x, 8.2, z, 3.6, 0.15, 3.6, palette.deck)\n for (const side of [-1.5, 1.5]) b.box(x + side, 8.2, z, 0.15, 1.6, 0.15, palette.deck)\n if (searchlight) b.spot({ x, y: 9, z, color: 0xe6eeff, intensity: 2.4, distance: 70, decay: 1.2, angle: 0.35, penumbra: 0.5, target: { x: x + 20, y: 0, z: z + 20 }, sweep: { speed: 0.5, radius: 25 } })\n}\n\n/** Rows of sandbags along `x` or `z`, each row shifted half a bag. Instances, no parts. */\nexport function drawSandbags(b: UrbanBuilder, x: number, z: number, length: number, along: 'x' | 'z', rows = 3, c?: Partial<PropColors>): void {\n const color = colors(c).sandbags\n for (let r = 0; r < rows; r++) {\n for (let i = 0; i < length / SANDBAG_LENGTH; i++) {\n const u = -length / 2 + 0.28 + i * SANDBAG_LENGTH + (r % 2) * 0.28\n b.item(along === 'x' ? x + u : x, r * 0.21, along === 'x' ? z : z + u, along === 'x' ? 0.55 : 0.32, 0.22, along === 'x' ? 0.32 : 0.55, color)\n }\n }\n}\n\n/** A big strip of text on the ground level (name of a street, caption of a cell): two lines on a 22 x 4.4 m board at 2.4 m. */\nexport function drawStripLabel(b: UrbanBuilder, x: number, z: number, title: string, subtitle: string, c?: Partial<PropColors>): void {\n const { background, foreground } = colors(c).label\n b.label([title, subtitle], x, 2.4, z, 22, 4.4, 0, { background, foreground, font: LABEL_FONT, canvas: LABEL_CANVAS })\n}\n\n/** Wires between poles: a polyline at one height. */\nexport function drawWires(b: UrbanBuilder, points: readonly (readonly [number, number])[], y: number, color?: number, c?: Partial<PropColors>): void {\n b.line(points.map(([px, pz]) => [px, y, pz] as [number, number, number]), color ?? colors(c).wire)\n}\n","import { applyPatches, mergeById, removeIds } from '@adatechnology/game-contracts'\nimport type { DeepPartial } from '@adatechnology/game-contracts'\nimport { createSilhouetteRandom } from '@adatechnology/game-floorplan'\n\nimport { drawBuilding, fillBlock, DEFAULT_FACADES } from './block'\nimport type { BlockBuilding, BuildingOptions, FillBlockOptions } from './block'\nimport { createLightBudget } from './budget'\nimport { DEFAULT_POLES, POLE_SHAPES } from './poles'\nimport type { PoleDef, PoleOptions, PoleShapeBuilder } from './poles'\nimport { drawContainer, drawFence, drawPine, drawSandbags, drawStripLabel, drawTent, drawTree, drawWatchtower, drawWires, DEFAULT_PROP_COLORS } from './props'\nimport type { PropColors } from './props'\nimport { composePattern, patternMarker, SAMPLE_GROUND } from './neighbourhoods/compose'\nimport type { Origin, SampleSheetOptions } from './neighbourhoods/compose'\nimport { COMPOSERS } from './neighbourhoods/composers'\nimport { DEFAULT_PATTERNS, SAMPLE_CELLS } from './neighbourhoods/patterns'\nimport type { ComposeOptions, Composer, Locale, NeighbourhoodPattern, UrbanKitCore, UrbanPlan } from './neighbourhoods/types'\nimport { createUrbanBuilder } from './scene'\nimport { createTerrain, drawTerrain } from './terrain'\nimport type { Terrain, TerrainOptions } from './terrain'\nimport type { UrbanBuilder } from './scene'\nimport { drawGround, drawRoad, drawStreetGrid, drawWalk } from './streets'\nimport type { StreetOptions } from './streets'\nimport type { RandomSource } from './types'\n\n/** Lights a scene may spend: the Galeria spends 16 real point lights. */\nexport const DEFAULT_LIGHT_BUDGET = 16\n/** Seed of the Galeria's generator. */\nexport const DEFAULT_URBAN_SEED = 7\n\nexport type UrbanOptions = {\n /** Entries added to the catalogues (an entry with an existing id replaces it). */\n packs?: { poles?: readonly PoleDef[]; neighbourhoods?: readonly NeighbourhoodPattern<any>[] }\n /** Numbers changed on shipped entries, by id (objects merge, arrays replace). */\n patch?: { poles?: Record<string, DeepPartial<PoleDef>>; neighbourhoods?: Record<string, DeepPartial<NeighbourhoodPattern<any>>> }\n /** Ids taken out of the catalogues. */\n remove?: { poles?: readonly string[]; neighbourhoods?: readonly string[] }\n /** Shape builders for the poles a pack adds; the five of the Galeria are always there. */\n shapes?: Readonly<Record<string, PoleShapeBuilder>>\n /** Composers for the patterns a pack adds; the ten of the Galeria are always there. */\n composers?: Readonly<Record<string, Composer>>\n lights?: { budget?: number }\n streets?: StreetOptions\n /** Facade colours of the city buildings. */\n facades?: readonly number[]\n props?: Partial<PropColors>\n}\n\nexport type Pole = { readonly def: PoleDef; build(b: UrbanBuilder, options: PoleOptions): void }\n\nexport type BuilderOptions = {\n /** Seed of the generator when no `random` is given. Default 7. */\n seed?: number\n random?: RandomSource\n /** Lights this scene may spend; default the kit's budget. */\n budget?: number\n}\n\nexport type UrbanKit = ReturnType<typeof createUrban>\n\n/** The urban pattern as data: poles, streets, blocks and props that add parts to a builder. Knows nothing about three.js, a game or a place. */\nexport function createUrban(options: UrbanOptions = {}) {\n const entries = mergeById(DEFAULT_POLES, options.packs?.poles)\n applyPatches(entries, options.patch?.poles)\n removeIds(entries, options.remove?.poles)\n const shapes: Record<string, PoleShapeBuilder> = { ...POLE_SHAPES, ...options.shapes }\n const patterns = mergeById(DEFAULT_PATTERNS, options.packs?.neighbourhoods)\n applyPatches(patterns, options.patch?.neighbourhoods)\n removeIds(patterns, options.remove?.neighbourhoods)\n const composers: Record<string, Composer> = { ...COMPOSERS, ...options.composers }\n const lightBudget = options.lights?.budget ?? DEFAULT_LIGHT_BUDGET\n const facades = options.facades ?? DEFAULT_FACADES\n const propColors: PropColors = { ...DEFAULT_PROP_COLORS, ...options.props }\n\n const poles = {\n ids: (): string[] => [...entries.keys()],\n list: (): PoleDef[] => [...entries.values()],\n get(id: string): Pole {\n const def = entries.get(id)\n if (!def) throw new Error(`Unknown pole \"${id}\"`)\n const shape = shapes[def.shape]\n if (!shape) throw new Error(`Pole \"${id}\" needs the shape \"${def.shape}\", which is not registered`)\n return { def, build: (b, o) => shape(b, def.spec, o) }\n },\n }\n\n const core: UrbanKitCore = {\n poles,\n streets: {\n road: (b: UrbanBuilder, x: number, z: number, w: number, l: number, along: 'x' | 'z') => drawRoad(b, x, z, w, l, along, options.streets),\n walk: (b: UrbanBuilder, x: number, z: number, w: number, d: number) => drawWalk(b, x, z, w, d, options.streets),\n ground: drawGround,\n grid: (b: UrbanBuilder, g: { block: number; count: number; width: number }) => drawStreetGrid(b, g.block, g.count, g.width, options.streets),\n },\n block: {\n facades,\n building: (b: UrbanBuilder, x: number, z: number, width: number, depth: number, height: number, color: number, o?: BuildingOptions): BlockBuilding => drawBuilding(b, x, z, width, depth, height, color, o),\n fill: (b: UrbanBuilder, g: { cx: number; cz: number; size: number; minHeight: number; maxHeight: number } & FillBlockOptions): BlockBuilding[] =>\n fillBlock(b, g.cx, g.cz, g.size, g.minHeight, g.maxHeight, { palette: facades, ...g }),\n },\n props: {\n fence: drawFence,\n tent: (b: UrbanBuilder, x: number, z: number, ry: number, w: number, d: number, color?: number) => drawTent(b, x, z, ry, w, d, color, propColors),\n pine: (b: UrbanBuilder, x: number, z: number, scale?: number, y?: number) => drawPine(b, x, z, scale, y, propColors),\n tree: (b: UrbanBuilder, x: number, z: number, scale?: number) => drawTree(b, x, z, scale, propColors),\n container: drawContainer,\n watchtower: (b: UrbanBuilder, x: number, z: number, searchlight?: boolean) => drawWatchtower(b, x, z, searchlight, propColors),\n sandbags: (b: UrbanBuilder, x: number, z: number, length: number, along: 'x' | 'z', rows?: number) => drawSandbags(b, x, z, length, along, rows, propColors),\n label: (b: UrbanBuilder, x: number, z: number, title: string, subtitle: string) => drawStripLabel(b, x, z, title, subtitle, propColors),\n wires: (b: UrbanBuilder, points: readonly (readonly [number, number])[], y: number, color?: number) => drawWires(b, points, y, color, propColors),\n },\n }\n /** A builder with its own seeded generator and light budget. */\n const builder = (o: BuilderOptions = {}): UrbanBuilder =>\n createUrbanBuilder(o.random ?? createSilhouetteRandom(o.seed ?? DEFAULT_URBAN_SEED), { budget: createLightBudget(o.budget ?? lightBudget) })\n const neighbourhoods = {\n ids: (): string[] => [...patterns.keys()],\n get(id: string) {\n const pattern = patterns.get(id)\n if (!pattern) throw new Error(`Unknown neighbourhood pattern \"${id}\"`)\n const composer = composers[pattern.compose]\n if (!composer) throw new Error(`Pattern \"${id}\" needs the composer \"${pattern.compose}\", which is not registered`)\n return {\n pattern,\n /** Draws the pattern at `origin` and gives back what it put there. */\n compose: (b: UrbanBuilder, origin: Origin, o?: ComposeOptions): UrbanPlan => composePattern(core, pattern, composer, b, origin, o),\n marker: (origin: Origin, locale?: Locale) => patternMarker(pattern, origin, locale),\n }\n },\n /** The Galeria's sample sheet: the ground, then each pattern in its cell, in the order the page builds them. */\n composeSampleSheet(b: UrbanBuilder, o: SampleSheetOptions = {}) {\n if (o.ground !== false) drawGround(b, (o.ground ?? SAMPLE_GROUND).color, (o.ground ?? SAMPLE_GROUND).size)\n const cells = { ...SAMPLE_CELLS, ...o.cells }\n const plans: UrbanPlan[] = []\n for (const id of o.ids ?? [...patterns.keys()]) {\n const cell = cells[id]\n if (!cell) throw new Error(`The sample sheet has no cell for \"${id}\"`)\n plans.push(neighbourhoods.get(id).compose(b, cell, o))\n }\n return { plans, markers: plans.map((plan) => neighbourhoods.get(plan.id).marker(plan.origin, o.locale)) }\n },\n }\n /** A ground from its layers (see TerrainOptions): the numbers of the place are the game's. */\n const terrain = (o: TerrainOptions): Terrain => createTerrain(o)\n return { ...core, poles, builder, neighbourhoods, terrain, drawTerrain }\n}\n","import { createChalet, createColonialHouse, createCompanyHouse, createDetachedHouse, createFarmhouse, createSlabHouse, createStiltHouse, createTwoStoreyHouse } from '@adatechnology/game-floorplan'\n\nimport type { HouseProvider, HouseRequest, SilhouetteFactory } from './types'\nimport type { Silhouette } from '../types'\n\nconst DEFAULT_WIDTH = 8\nconst DEFAULT_DEPTH = 10\nconst DEFAULT_COLOR = 0xc8b898\n\n/** Turns the group a silhouette starts with (the page turns a colonial or company house after drawing it). */\nfunction turned(silhouette: Silhouette, ry: number | undefined): Silhouette {\n const first = silhouette.parts[0]\n if (ry === undefined || !first || first.shape !== 'group') return silhouette\n return { ...silhouette, parts: [{ ...first, ry }, ...silhouette.parts.slice(1)] }\n}\n\n/** The far-away silhouettes of game-floorplan as the typologies of the default house provider. */\nexport const SILHOUETTE_TYPOLOGIES: Readonly<Record<string, SilhouetteFactory>> = {\n two_storey: (r, random) => createTwoStoreyHouse({ x: r.x, z: r.z, width: r.width ?? DEFAULT_WIDTH, depth: r.depth ?? DEFAULT_DEPTH, color: r.color ?? DEFAULT_COLOR, roofColor: r.roofColor, ry: r.ry, random }),\n detached: (r, random) => createDetachedHouse({ x: r.x, z: r.z, width: r.width ?? DEFAULT_WIDTH, depth: r.depth ?? DEFAULT_DEPTH, color: r.color ?? DEFAULT_COLOR, roofColor: r.roofColor, ry: r.ry, isBoarded: r.isBoarded, random }),\n slab: (r, random) => createSlabHouse({ x: r.x, z: r.z, width: r.width ?? 7, depth: r.depth ?? 8, floors: r.floors ?? 1, color: r.color ?? 0xa8a49c, random }),\n colonial: (r, random) => turned(createColonialHouse({ x: r.x, z: r.z, width: r.width ?? 7, color: r.color ?? 0xd0c4a8, hasDoor: r.hasDoor ?? false, random }), r.ry),\n chalet: (r, random) => createChalet({ x: r.x, z: r.z, color: r.color, ry: r.ry, random }),\n company_house: (r, random) => turned(createCompanyHouse({ x: r.x, z: r.z, color: r.color, random }), r.ry),\n stilt: (r, random) => createStiltHouse({ x: r.x, z: r.z, color: r.color, random }),\n farmhouse: (r, random) => createFarmhouse({ x: r.x, z: r.z, random }),\n}\n\n/** The default provider: the silhouette of game-floorplan for the typology, added to the builder with its shared random. */\nexport function createSilhouetteHouses(typologies: Readonly<Record<string, SilhouetteFactory>> = SILHOUETTE_TYPOLOGIES): HouseProvider {\n return (typology, request: HouseRequest, b) => {\n const factory = typologies[typology]\n if (!factory) throw new Error(`The house provider has no typology \"${typology}\"`)\n b.add(factory(request, b.random))\n }\n}\n","import type { UrbanBuilder } from '../scene'\nimport { createSilhouetteHouses } from './houses'\nimport type { ComposeContext, ComposeOptions, Composer, Locale, NeighbourhoodPattern, Providers, UrbanKitCore, UrbanPlan } from './types'\n\nconst LABEL_OFFSET_Z = 28\nconst DEFAULT_LOCALE: Locale = 'pt-BR'\nconst SAMPLE_GROUND = { color: 0x1e2124, size: 500 }\n\nexport type Origin = { x: number; z: number }\n\n/** Draws one pattern at `origin`: its composer, then the board with the title and the caption. */\nexport function composePattern(kit: UrbanKitCore, pattern: NeighbourhoodPattern<any>, composer: Composer, b: UrbanBuilder, origin: Origin, options: ComposeOptions = {}): UrbanPlan {\n const locale = options.locale ?? DEFAULT_LOCALE\n const providers: Providers = options.providers ?? {}\n const house = providers.house ?? createSilhouetteHouses()\n const plan: UrbanPlan = { id: pattern.id, origin: { ...origin }, houses: [], buildings: [], poles: [], vehicles: [], plants: [] }\n const context: ComposeContext = {\n kit,\n b,\n pattern,\n params: pattern.params,\n x0: origin.x,\n z0: origin.z,\n plan,\n isLit: (share) => share >= 1 || b.random() < share,\n pole: ({ id, ...rest }) => {\n kit.poles.get(id ?? pattern.pole).build(b, rest)\n plan.poles.push({ pole: id ?? pattern.pole, x: rest.x, z: rest.z, on: rest.on ?? true })\n },\n house: (typology, request) => {\n house(typology, request, b)\n plan.houses.push({ typology, x: request.x, z: request.z, ry: request.ry ?? 0 })\n },\n vehicle: (request) => {\n providers.vehicle?.(request, b)\n plan.vehicles.push(request)\n },\n plant: (request) => {\n if (providers.plant) providers.plant(request, b)\n else if (request.kind === 'pine') kit.props.pine(b, request.x, request.z, request.scale)\n else kit.props.tree(b, request.x, request.z, request.scale)\n plan.plants.push(request)\n },\n building: (x, z, width, depth, height, color, o) => {\n plan.buildings.push(kit.block.building(b, x, z, width, depth, height, color, o))\n },\n }\n composer(context)\n const text = pattern.text[locale] ?? pattern.text[DEFAULT_LOCALE]\n kit.props.label(b, origin.x, origin.z + LABEL_OFFSET_Z, text.title, text.caption)\n return plan\n}\n\n/** The marker (map pin) of a pattern at an origin: where it stands, how high, and what it says. */\nexport function patternMarker(pattern: NeighbourhoodPattern<any>, origin: Origin, locale: Locale = DEFAULT_LOCALE): { x: number; y: number; z: number; label: string; detail: string } {\n const text = pattern.text[locale] ?? pattern.text[DEFAULT_LOCALE]\n return { x: origin.x, y: pattern.marker.height, z: origin.z + (pattern.marker.dz ?? 0), label: text.label, detail: text.detail }\n}\n\nexport type SampleSheetOptions = ComposeOptions & {\n /** Ids to draw, in this order. Default all of the kit's patterns in the page's order. */\n ids?: readonly string[]\n /** Where each pattern stands. Default the Galeria's grid. */\n cells?: Readonly<Record<string, Origin>>\n /** Colour and size of the ground under the sheet; false for none. */\n ground?: { color: number; size: number } | false\n}\n\nexport { SAMPLE_GROUND }\n","import type { Composer } from './types'\n\n/** Every composer reads its numbers from `pattern.params`; the defaults are in `patterns.ts`. */\n\nexport type DowntownParams = {\n roadLength: number\n roadColor: number\n median: { width: number; height: number; color: number }\n poles: { from: number; to: number }\n buildings: { perRow: number; first: number; pitch: number; rowOffset: number; size: number; north: { minHeight: number; range: number; lit: number }; south: { minHeight: number; range: number; lit: number } }\n walks: { offset: number; length: number }\n car: { dx: number; dz: number; ry: number; color: number }\n}\n\n/** Avenue: LED poles down the median, two rows of tall buildings, a walk each side and a parked car. */\nexport const composeDowntown: Composer<DowntownParams> = ({ b, kit, pattern, params, x0, z0, pole, building, vehicle }) => {\n b.plane(x0, 0.02, z0, params.roadLength, pattern.streetWidth, params.roadColor)\n b.box(x0, 0, z0, params.roadLength, params.median.height, params.median.width, params.median.color)\n for (let u = params.poles.from; u <= params.poles.to; u += pattern.spacing) pole({ x: x0 + u, z: z0, on: true })\n const { buildings } = params\n for (let i = 0; i < buildings.perRow; i++) {\n const x = x0 + buildings.first + i * buildings.pitch\n const northHeight = buildings.north.minHeight + b.random() * buildings.north.range\n building(x, z0 - buildings.rowOffset, buildings.size, buildings.size, northHeight, b.pick(kit.block.facades), { lit: buildings.north.lit })\n building(x, z0 + buildings.rowOffset, buildings.size, buildings.size, buildings.south.minHeight + b.random() * buildings.south.range, b.pick(kit.block.facades), { lit: buildings.south.lit })\n }\n kit.streets.walk(b, x0, z0 - params.walks.offset, params.walks.length, pattern.walkWidth)\n kit.streets.walk(b, x0, z0 + params.walks.offset, params.walks.length, pattern.walkWidth)\n vehicle({ x: x0 + params.car.dx, z: z0 + params.car.dz, ry: params.car.ry, color: params.car.color })\n}\n\nexport type SuburbParams = {\n roadLength: number\n walkOffset: number\n houses: { count: number; first: number; pitch: number; north: { z: number; typologies: readonly [string, string]; colors: readonly number[] }; south: { z: number; colors: readonly number[] }; roofColor: number; width: number; depth: number }\n walls: { color: number; height: number; thickness: number; offset: number; gateColor: number; gateWidth: number; gateHeight: number; gateOffset: number; gateInset: number; length: number }\n poles: { at: readonly number[]; z: number; transformerFrom: number }\n wires: { half: number; height: number }\n}\n\n/** Houses and two-storey houses behind low walls, concrete poles on the north side with the wires between them. */\nexport const composeSuburb: Composer<SuburbParams> = ({ b, kit, pattern, params, x0, z0, pole, house, isLit }) => {\n kit.streets.road(b, x0, z0, pattern.streetWidth, params.roadLength, 'x')\n kit.streets.walk(b, x0, z0 - params.walkOffset, params.roadLength, pattern.walkWidth)\n kit.streets.walk(b, x0, z0 + params.walkOffset, params.roadLength, pattern.walkWidth)\n const { houses, walls } = params\n for (let i = 0; i < houses.count; i++) {\n const x = x0 + houses.first + i * houses.pitch\n house(houses.north.typologies[i % 2 ? 0 : 1], { x, z: z0 + houses.north.z, width: houses.width, depth: houses.depth, color: b.pick(houses.north.colors), roofColor: houses.roofColor, ry: 0 })\n b.box(x, 0, z0 - walls.offset, walls.length, walls.height, walls.thickness, walls.color)\n b.box(x + walls.gateOffset, 0, z0 - walls.gateInset, walls.gateWidth, walls.gateHeight, 0.06, walls.gateColor)\n b.box(x, 0, z0 + walls.offset, walls.length, walls.height, walls.thickness, walls.color)\n b.box(x - walls.gateOffset, 0, z0 + walls.gateInset, walls.gateWidth, walls.gateHeight, 0.06, walls.gateColor)\n }\n for (const u of params.poles.at) pole({ x: x0 + u, z: z0 + params.poles.z, dir: 1, on: isLit(pattern.lit), transformer: u > params.poles.transformerFrom })\n kit.props.wires(b, [[x0 - params.wires.half, z0 + params.poles.z], [x0 + params.wires.half, z0 + params.poles.z]], params.wires.height)\n for (let i = 0; i < houses.count; i++) {\n house('detached', { x: x0 + houses.first + i * houses.pitch, z: z0 + houses.south.z, width: houses.width, depth: houses.depth, color: b.pick(houses.south.colors), roofColor: houses.roofColor, ry: Math.PI })\n }\n}\n\nexport type WorkingClassParams = {\n houses: { count: number; first: number; pitch: number; width: number; depth: number; north: { z: number; colors: readonly number[] }; south: { z: number; colors: readonly number[] }; maxFloors: number }\n poles: { from: number; to: number; z: number; jitter: number }\n wires: { count: number; from: number; to: number; z: number; step: number; height: number; heightStep: number; sag: number; color: number }\n}\n\n/** Slab houses of one to three floors in two rows, concrete poles half burnt out and a tangle of wires. */\nexport const composeWorkingClass: Composer<WorkingClassParams> = ({ b, kit, pattern, params, x0, z0, pole, house, isLit }) => {\n kit.streets.road(b, x0, z0, pattern.streetWidth, 60, 'x')\n const { houses } = params\n for (let i = 0; i < houses.count; i++) {\n const x = x0 + houses.first + i * houses.pitch\n house('slab', { x, z: z0 + houses.north.z, width: houses.width, depth: houses.depth, floors: 1 + Math.floor(b.random() * houses.maxFloors), color: b.pick(houses.north.colors) })\n house('slab', { x, z: z0 + houses.south.z, width: houses.width, depth: houses.depth, floors: 1 + Math.floor(b.random() * houses.maxFloors), color: b.pick(houses.south.colors) })\n }\n for (let u = params.poles.from; u <= params.poles.to; u += pattern.spacing + b.random() * params.poles.jitter) pole({ x: x0 + u, z: z0 + params.poles.z, dir: 1, on: isLit(pattern.lit), transformer: true })\n const { wires } = params\n for (let k = 0; k < wires.count; k++) {\n kit.props.wires(b, [[x0 + wires.from, z0 + wires.z + k * wires.step], [x0 + wires.to, z0 + wires.z + (b.random() - 0.5) * wires.sag]], wires.height + k * wires.heightStep, wires.color)\n }\n}\n\nexport type HistoricParams = {\n cobbles: { y: number; length: number; color: number; from: number; to: number; step: number; spread: number; sizes: readonly [number, number, number]; colors: readonly number[] }\n rows: { from: number; to: number; minWidth: number; widthSteps: number; north: { z: number; colors: readonly number[] }; south: { z: number; colors: readonly number[] } }\n poles: { from: number; to: number; step: number; z: number; sideOffset: number }\n}\n\n/** A cobbled street between rows of colonial houses wall to wall, with cast-iron lanterns. */\nexport const composeHistoricStreet: Composer<HistoricParams> = ({ b, pattern, params, x0, z0, pole, house, isLit }) => {\n const { cobbles, rows } = params\n b.plane(x0, cobbles.y, z0, cobbles.length, pattern.streetWidth, cobbles.color)\n for (let u = cobbles.from; u < cobbles.to; u += cobbles.step) b.item(x0 + u, cobbles.y, z0 + (b.random() - 0.5) * cobbles.spread, cobbles.sizes[0], cobbles.sizes[1], cobbles.sizes[2], b.pick(cobbles.colors))\n for (const side of [rows.north, rows.south] as const) {\n let x = x0 + rows.from\n while (x < x0 + rows.to) {\n const width = rows.minWidth + Math.floor(b.random() * rows.widthSteps)\n house('colonial', { x: x + width / 2, z: z0 + side.z, width, color: b.pick(side.colors), hasDoor: true, ry: side === rows.south ? Math.PI : undefined })\n x += width\n }\n }\n for (let u = params.poles.from; u <= params.poles.to; u += params.poles.step) {\n for (const s of [-1, 1]) pole({ x: x0 + u + (s > 0 ? params.poles.sideOffset : 0), z: z0 + s * params.poles.z, on: isLit(pattern.lit) })\n }\n}\n\nexport type IndustrialParams = {\n yard: { length: number; color: number }\n hangar: { x: number; z: number; width: number; height: number; depth: number; color: number; roofColor: number; roofRadius: number; roofY: number; doorColor: number; doorWidth: number; doorHeight: number; stripeColor: number }\n towers: readonly { dx: number; dz: number; on: boolean }[]\n container: { dx: number; dz: number; ry: number; color: number }\n}\n\n/** A paved yard with two hangars under barrel roofs, floodlight towers and a container. */\nexport const composeIndustrial: Composer<IndustrialParams> = ({ b, kit, pattern, params, x0, z0, pole }) => {\n b.plane(x0, 0.02, z0, params.yard.length, pattern.streetWidth, params.yard.color)\n const { hangar } = params\n for (const s of [-1, 1]) {\n const g = b.group(x0 + s * hangar.x, 0, z0 + hangar.z)\n b.box(0, 0, 0, hangar.width, hangar.height, hangar.depth, hangar.color, { parent: g })\n b.vault({ x: 0, y: hangar.roofY, z: 0, radius: hangar.roofRadius, length: hangar.depth, arc: Math.PI, segments: 16, color: hangar.roofColor, rotation: { x: Math.PI / 2, y: 0, z: Math.PI / 2 }, scale: { x: 1, y: 1, z: 0.25 }, parent: g })\n b.box(0, 0, hangar.depth / 2 + 0.05, hangar.doorWidth, hangar.doorHeight, 0.1, hangar.doorColor, { parent: g })\n b.box(0, 6, hangar.depth / 2 + 0.06, 10, 1.2, 0.05, hangar.stripeColor, { parent: g })\n }\n for (const tower of params.towers) pole({ x: x0 + tower.dx, z: z0 + tower.dz, on: tower.on })\n kit.props.container(b, x0 + params.container.dx, 0, z0 + params.container.dz, params.container.ry, params.container.color)\n}\n\nexport type RailwayParams = {\n houses: { count: number; first: number; pitch: number; north: { z: number; colors: readonly number[] }; south: { z: number; color: number } }\n poles: { at: readonly number[]; z: number; transformerFrom: number }\n wires: { half: number; height: number }\n}\n\n/** Company houses in a row, all alike, with residential poles and a single wire. */\nexport const composeRailwayVillage: Composer<RailwayParams> = ({ b, kit, pattern, params, x0, z0, pole, house, isLit }) => {\n kit.streets.road(b, x0, z0, pattern.streetWidth, 60, 'x')\n const { houses } = params\n for (let i = 0; i < houses.count; i++) {\n const x = x0 + houses.first + i * houses.pitch\n house('company_house', { x, z: z0 + houses.north.z, color: b.pick(houses.north.colors) })\n house('company_house', { x, z: z0 + houses.south.z, color: houses.south.color, ry: Math.PI })\n }\n for (const u of params.poles.at) pole({ x: x0 + u, z: z0 + params.poles.z, dir: 1, on: isLit(pattern.lit), transformer: u > params.poles.transformerFrom })\n kit.props.wires(b, [[x0 - params.wires.half, z0 + params.poles.z], [x0 + params.wires.half, z0 + params.poles.z]], params.wires.height)\n}\n\nexport type MountainParams = {\n road: { y: number; length: number; color: number }\n chalets: { count: number; first: number; pitch: number; northZ: number; southZ: number; southShift: number; northColors: readonly number[]; southColors: readonly number[] }\n poles: { from: number; to: number; step: number; z: number; sideOffset: number }\n pines: { count: number; first: number; span: number; rowZ: number; minScale: number; scaleRange: number }\n}\n\n/** A mountain-resort street: wooden chalets, cast-iron lanterns and pines at both edges. */\nexport const composeMountainResort: Composer<MountainParams> = ({ b, pattern, params, x0, z0, pole, house, plant, isLit }) => {\n b.plane(x0, params.road.y, z0, params.road.length, pattern.streetWidth, params.road.color)\n const { chalets } = params\n for (let i = 0; i < chalets.count; i++) {\n house('chalet', { x: x0 + chalets.first + i * chalets.pitch, z: z0 + chalets.northZ, color: b.pick(chalets.northColors) })\n house('chalet', { x: x0 + chalets.first + i * chalets.pitch + chalets.southShift, z: z0 + chalets.southZ, color: b.pick(chalets.southColors), ry: Math.PI })\n }\n for (let u = params.poles.from; u <= params.poles.to; u += params.poles.step) {\n for (const s of [-1, 1]) pole({ x: x0 + u + (s > 0 ? params.poles.sideOffset : 0), z: z0 + s * params.poles.z, on: isLit(pattern.lit) })\n }\n const { pines } = params\n for (let i = 0; i < pines.count; i++) plant({ kind: 'pine', x: x0 + pines.first + b.random() * pines.span, z: z0 + (b.random() < 0.5 ? -pines.rowZ : pines.rowZ), scale: pines.minScale + b.random() * pines.scaleRange })\n}\n\nexport type StiltParams = {\n water: { y: number; z: number; length: number; depth: number; color: number; roughness: number; metalness: number }\n bank: { z: number; length: number; depth: number; color: number }\n boardwalk: { y: number; length: number; width: number; color: number; pilesFrom: number; pilesTo: number; pilesStep: number }\n houses: { count: number; first: number; pitch: number; z: number; colors: readonly number[]; lantern: { dx: number; y: number; dz: number; lit: number; unlit: number } }\n lamp: { dx: number; y: number; dz: number; color: number; intensity: number; distance: number }\n boat: { dx: number; dz: number; color: number }\n}\n\n/** Stilt houses over water along a boardwalk, with no public lighting: a lantern on each odd house and a lamp light. */\nexport const composeStiltVillage: Composer<StiltParams> = ({ b, params, x0, z0, house }) => {\n const { water, bank, boardwalk, houses } = params\n b.plane(x0, water.y, z0 + water.z, water.length, water.depth, water.color, { roughness: water.roughness, metalness: water.metalness })\n b.box(x0, 0, z0 + bank.z, bank.length, 0.2, bank.depth, bank.color)\n b.box(x0, boardwalk.y, z0, boardwalk.length, 0.2, boardwalk.width, boardwalk.color)\n for (let u = boardwalk.pilesFrom; u <= boardwalk.pilesTo; u += boardwalk.pilesStep) b.cylinder(x0 + u, -1.5, z0 + 0.9, 0.1, 0.1, 2.9, 0x3a2a1c, -1, 5)\n for (let i = 0; i < houses.count; i++) {\n const x = x0 + houses.first + i * houses.pitch\n house('stilt', { x, z: z0 + houses.z, color: b.pick(houses.colors) })\n const lit = i % 2 === 1\n b.box(x + houses.lantern.dx, houses.lantern.y, z0 + houses.lantern.dz, 0.2, 0.28, 0.2, lit ? houses.lantern.lit : houses.lantern.unlit, { emissive: lit })\n }\n b.light({ x: x0 + params.lamp.dx, y: params.lamp.y, z: z0 + params.lamp.dz, color: params.lamp.color, intensity: params.lamp.intensity, distance: params.lamp.distance })\n b.box(x0 + params.boat.dx, -0.2, z0 + params.boat.dz, 1.6, 0.5, 4.6, params.boat.color)\n}\n\nexport type MilitaryParams = {\n yard: { length: number; color: number }\n fence: { from: number; to: number; step: number; z: number; height: number; color: number; wireColor: number }\n towers: { dx: readonly number[]; dz: number }\n alarm: { dz: number; color: number; intensity: number; distance: number; y: number; lampDz: number; lampY: number }\n sandbags: { dz: number; length: number; rows: number }\n tents: { count: number; first: number; pitch: number; dz: number; width: number; depth: number }\n}\n\n/** A military perimeter: a mesh fence, watch towers with searchlights, a red emergency lamp, sandbags and tents. */\nexport const composeMilitary: Composer<MilitaryParams> = ({ b, kit, pattern, params, x0, z0 }) => {\n b.plane(x0, 0.02, z0, params.yard.length, pattern.streetWidth, params.yard.color)\n const { fence } = params\n for (let u = fence.from; u <= fence.to; u += fence.step) b.cylinder(x0 + u, 0, z0 + fence.z, 0.06, 0.06, 3, fence.color, -1, 4)\n b.line([[x0 + fence.from, 2.9, z0 + fence.z], [x0 + fence.to, 2.9, z0 + fence.z]], fence.wireColor)\n for (const u of params.towers.dx) kit.props.watchtower(b, x0 + u, z0 + params.towers.dz, true)\n const { alarm } = params\n b.light({ x: x0, y: alarm.y, z: z0 + alarm.dz, color: alarm.color, intensity: alarm.intensity, distance: alarm.distance })\n b.box(x0, alarm.lampY, z0 + alarm.lampDz, 0.3, 0.3, 0.3, alarm.color, { emissive: true })\n kit.props.sandbags(b, x0, z0 + params.sandbags.dz, params.sandbags.length, 'x', params.sandbags.rows)\n for (let i = 0; i < params.tents.count; i++) kit.props.tent(b, x0 + params.tents.first + i * params.tents.pitch, z0 + params.tents.dz, 0, params.tents.width, params.tents.depth)\n}\n\nexport type RuralParams = {\n road: { length: number; color: number }\n field: { y: number; dz: number; length: number; depth: number; color: number }\n farmhouse: { dx: number; dz: number }\n pole: { dx: number; dz: number }\n fence: { dz: number; half: number; height: number; color: number }\n trees: { count: number; first: number; span: number; dz: number; spread: number; minScale: number; scaleRange: number }\n crops: { rows: number; perRow: number; first: number; pitch: number; dz: number; rowPitch: number; width: number; minHeight: number; heightRange: number; color: number }\n}\n\n/** A farm: dirt road, farmhouse with a veranda, one wooden pole at the junction, a fence, trees and rows of crops. */\nexport const composeRural: Composer<RuralParams> = ({ b, pattern, params, x0, z0, pole, house, plant }) => {\n b.plane(x0, 0.02, z0, params.road.length, pattern.streetWidth, params.road.color)\n b.plane(x0, params.field.y, z0 + params.field.dz, params.field.length, params.field.depth, params.field.color)\n house('farmhouse', { x: x0 + params.farmhouse.dx, z: z0 + params.farmhouse.dz })\n pole({ x: x0 + params.pole.dx, z: z0 + params.pole.dz, on: true })\n b.fence(x0 - params.fence.half, z0 + params.fence.dz, x0 + params.fence.half, z0 + params.fence.dz, params.fence.height, params.fence.color)\n const { trees, crops } = params\n for (let i = 0; i < trees.count; i++) plant({ kind: 'tree', x: x0 + trees.first + b.random() * trees.span, z: z0 + trees.dz + b.random() * trees.spread, scale: trees.minScale + b.random() * trees.scaleRange })\n for (let r = 0; r < crops.rows; r++) {\n for (let i = 0; i < crops.perRow; i++) b.item(x0 + crops.first + i * crops.pitch, 0, z0 + crops.dz + r * crops.rowPitch, crops.width, crops.minHeight + b.random() * crops.heightRange, crops.width, crops.color)\n }\n}\n\n/** The composers the ten default patterns use; a game adds its own through `createUrban({ composers })`. */\nexport const COMPOSERS: Readonly<Record<string, Composer>> = {\n downtown: composeDowntown,\n suburb: composeSuburb,\n working_class: composeWorkingClass,\n historic_street: composeHistoricStreet,\n industrial_port: composeIndustrial,\n railway_village: composeRailwayVillage,\n mountain_resort: composeMountainResort,\n stilt_village: composeStiltVillage,\n military: composeMilitary,\n rural: composeRural,\n}\n","import { COMPOSERS } from './composers'\nimport type { DowntownParams, HistoricParams, IndustrialParams, MilitaryParams, MountainParams, RailwayParams, RuralParams, StiltParams, SuburbParams, WorkingClassParams } from './composers'\nimport type { NeighbourhoodPattern } from './types'\n\nconst suburb: NeighbourhoodPattern<SuburbParams> = {\n id: 'suburb',\n streetWidth: 7,\n walkWidth: 2,\n typologies: ['detached', 'two_storey'],\n pole: 'concrete_arm',\n lightColor: 0xff9a40,\n spacing: 35,\n lit: 0.75,\n compose: 'suburb',\n marker: { height: 10 },\n text: {\n 'pt-BR': { label: 'Subúrbio', title: 'SUBÚRBIO', caption: 'casa térrea e sobrado · muro 1,8 m · sódio a cada 35 m', detail: 'Casa térrea e sobrado, muro de 1,8 m. Poste de concreto com sódio laranja.' },\n en: { label: 'Suburb', title: 'SUBURB', caption: 'one-storey and two-storey houses · 1.8 m wall · sodium every 35 m', detail: 'One-storey and two-storey houses behind a 1.8 m wall. Concrete pole with an orange sodium lamp.' },\n },\n params: {\n roadLength: 60,\n walkOffset: 4.5,\n houses: { count: 5, first: -24, pitch: 12, north: { z: -15, typologies: ['two_storey', 'detached'], colors: [0xc8b89a, 0xa8b0a0, 0xd0c0a0, 0xb8a890] }, south: { z: 15, colors: [0xc8b89a, 0xa8b0a0, 0xd0c0a0] }, roofColor: 0x6a3a2a, width: 8, depth: 10 },\n walls: { color: 0xbab2a0, height: 1.8, thickness: 0.2, offset: 5.8, gateColor: 0x3a3a3a, gateWidth: 2.4, gateHeight: 1.6, gateOffset: 3.5, gateInset: 5.7, length: 10 },\n poles: { at: [-26, 9], z: -4.8, transformerFrom: 0 },\n wires: { half: 28, height: 6.9 },\n },\n}\n\nconst downtown: NeighbourhoodPattern<DowntownParams> = {\n id: 'downtown',\n streetWidth: 14,\n walkWidth: 3,\n typologies: ['city_building'],\n pole: 'led_double',\n lightColor: 0xdfe8ff,\n spacing: 25,\n lit: 1,\n compose: 'downtown',\n marker: { height: 14 },\n text: {\n 'pt-BR': { label: 'Centro', title: 'CENTRO', caption: 'avenida 2 × 7 m · LED branco a cada 25 m', detail: 'Prédio residencial e comercial de 4 a 12 andares. Poste metálico duplo, LED branco.' },\n en: { label: 'Downtown', title: 'DOWNTOWN', caption: 'avenue 2 × 7 m · white LED every 25 m', detail: 'Residential and commercial buildings of 4 to 12 floors. Double steel pole, white LED.' },\n },\n params: {\n roadLength: 60,\n roadColor: 0x222428,\n median: { width: 1.6, height: 0.18, color: 0x3a4a2c },\n poles: { from: -26, to: 26 },\n buildings: { perRow: 4, first: -21, pitch: 14, rowOffset: 18, size: 12, north: { minHeight: 12, range: 24, lit: 0.1 }, south: { minHeight: 12, range: 18, lit: 0.08 } },\n walks: { offset: 10, length: 60 },\n car: { dx: -8, dz: -3, ry: 1.57, color: 0x6b6450 },\n },\n}\n\nconst workingClass: NeighbourhoodPattern<WorkingClassParams> = {\n id: 'working_class',\n streetWidth: 6,\n walkWidth: 0,\n typologies: ['slab'],\n pole: 'concrete_arm',\n lightColor: 0xff9a40,\n spacing: 36,\n lit: 0.5,\n compose: 'working_class',\n marker: { height: 10 },\n text: {\n 'pt-BR': { label: 'Bairro popular', title: 'BAIRRO POPULAR', caption: \"lajes de 1 a 3 · caixa d'água azul · metade das luzes queimadas\", detail: 'Casas geminadas de laje, fios emaranhados, metade das luzes queimadas.' },\n en: { label: 'Working-class quarter', title: 'WORKING-CLASS QUARTER', caption: 'slab houses of 1 to 3 floors · blue water tank · half the lamps burnt out', detail: 'Row slab houses, tangled wires, half the lamps burnt out.' },\n },\n params: {\n houses: { count: 10, first: -27, pitch: 6, width: 5.6, depth: 10, north: { z: -9, colors: [0xa0624a, 0x9a6a54, 0x8a5a44] }, south: { z: 9, colors: [0xa0624a, 0x9a6a54, 0xc8c0b0] }, maxFloors: 3 },\n poles: { from: -24, to: 26, z: -3.5, jitter: 8 },\n wires: { count: 4, from: -26, to: 26, z: -3.5, step: 0.15, height: 6.3, heightStep: 0.25, sag: 2, color: 0x1a1a1a },\n },\n}\n\nconst historicStreet: NeighbourhoodPattern<HistoricParams> = {\n id: 'historic_street',\n streetWidth: 5,\n walkWidth: 0,\n typologies: ['colonial'],\n pole: 'cast_iron',\n lightColor: 0xffc880,\n spacing: 20,\n lit: 0.8,\n compose: 'historic_street',\n marker: { height: 8 },\n text: {\n 'pt-BR': { label: 'Rua histórica', title: 'RUA HISTÓRICA', caption: 'casas coloniais coladas · pedra 5 m · ferro fundido a cada 20 m', detail: 'Casas coloniais coladas, rua de pedra, luminária de ferro fundido.' },\n en: { label: 'Historic street', title: 'HISTORIC STREET', caption: 'colonial houses wall to wall · 5 m cobbles · cast iron every 20 m', detail: 'Colonial houses wall to wall, cobbled street, cast-iron lanterns.' },\n },\n params: {\n cobbles: { y: 0.03, length: 60, color: 0x4a4642, from: -28, to: 28, step: 0.9, spread: 4, sizes: [0.8, 0.04, 0.6], colors: [0x5a5650, 0x4e4a46, 0x625e58] },\n rows: { from: -28, to: 26, minWidth: 5, widthSteps: 3, north: { z: -8, colors: [0xd8c8a0, 0xa8c0c0, 0xe0b890, 0xc0a8b8, 0xd0d0c0] }, south: { z: 8, colors: [0xd8c8a0, 0xa8c0c0, 0xe0b890, 0xc0a8b8] } },\n poles: { from: -25, to: 25, step: 20, z: 2.9, sideOffset: 10 },\n },\n}\n\nconst industrialPort: NeighbourhoodPattern<IndustrialParams> = {\n id: 'industrial_port',\n streetWidth: 40,\n walkWidth: 0,\n typologies: ['hangar'],\n pole: 'flood_tower',\n lightColor: 0xfff0d0,\n spacing: 60,\n lit: 1,\n compose: 'industrial_port',\n marker: { height: 16 },\n text: {\n 'pt-BR': { label: 'Industrial e porto', title: 'INDUSTRIAL E PORTO', caption: 'galpão (amostra encurtada) · torre de refletor a cada 60 m', detail: 'Galpões e torres de refletor de 12 m.' },\n en: { label: 'Industrial and port', title: 'INDUSTRIAL AND PORT', caption: 'warehouse (shortened sample) · floodlight tower every 60 m', detail: 'Warehouses and 12 m floodlight towers.' },\n },\n params: {\n yard: { length: 60, color: 0x2a2b2c },\n hangar: { x: 15, z: -6, width: 26, height: 10, depth: 30, color: 0x6a6c68, roofColor: 0x5a5c58, roofRadius: 13, roofY: 10, doorColor: 0x3a3a3a, doorWidth: 6, doorHeight: 5, stripeColor: 0xd8b02a },\n towers: [{ dx: -30, dz: 14, on: true }, { dx: 30, dz: 14, on: false }],\n container: { dx: 20, dz: 14, ry: 0.2, color: 0x8a3a2a },\n },\n}\n\nconst railwayVillage: NeighbourhoodPattern<RailwayParams> = {\n id: 'railway_village',\n streetWidth: 6,\n walkWidth: 0,\n typologies: ['company_house'],\n pole: 'concrete_arm',\n lightColor: 0xff9a40,\n spacing: 35,\n lit: 0.7,\n compose: 'railway_village',\n marker: { height: 8 },\n text: {\n 'pt-BR': { label: 'Vila ferroviária', title: 'VILA FERROVIÁRIA', caption: 'casas da companhia, todas iguais · poste residencial a cada 35 m', detail: 'Casas da companhia em fila, todas iguais.' },\n en: { label: 'Railway village', title: 'RAILWAY VILLAGE', caption: 'company houses, all alike · residential pole every 35 m', detail: 'Company houses in a row, all alike.' },\n },\n params: {\n houses: { count: 6, first: -25, pitch: 10, north: { z: -12, colors: [0xd8d0c0, 0xd0c8b4] }, south: { z: 12, color: 0xd8d0c0 } },\n poles: { at: [-26, 9], z: -4, transformerFrom: 0 },\n wires: { half: 26, height: 6.9 },\n },\n}\n\nconst mountainResort: NeighbourhoodPattern<MountainParams> = {\n id: 'mountain_resort',\n streetWidth: 6,\n walkWidth: 0,\n typologies: ['chalet'],\n pole: 'cast_iron',\n lightColor: 0xffc880,\n spacing: 20,\n lit: 0.7,\n compose: 'mountain_resort',\n marker: { height: 10 },\n text: {\n 'pt-BR': { label: 'Serra', title: 'SERRA · RUA DAS POUSADAS', caption: 'chalé de madeira e pedra · telhado 45° · ferro fundido a cada 20 m', detail: 'Rua das Pousadas: chalés de madeira e pedra com telhado íngreme e luminária de ferro fundido. Na Encosta, sem iluminação.' },\n en: { label: 'Mountain', title: 'MOUNTAIN · INN STREET', caption: 'wood and stone chalets · 45° roof · cast iron every 20 m', detail: 'Inn Street: wood and stone chalets with a steep roof and cast-iron lanterns. Up the slope there is no lighting.' },\n },\n params: {\n road: { y: 0.02, length: 60, color: 0x2a2a28 },\n chalets: { count: 5, first: -24, pitch: 12, northZ: -12, southZ: 12, southShift: 6, northColors: [0x6b4a30, 0x5a3e28, 0x7a5a3a], southColors: [0x6b4a30, 0x5a3e28] },\n poles: { from: -25, to: 25, step: 20, z: 2.6, sideOffset: 10 },\n pines: { count: 10, first: -28, span: 56, rowZ: 22, minScale: 1.4, scaleRange: 1 },\n },\n}\n\nconst stiltVillage: NeighbourhoodPattern<StiltParams> = {\n id: 'stilt_village',\n streetWidth: 2,\n walkWidth: 0,\n typologies: ['stilt'],\n pole: '',\n lightColor: 0xffb060,\n spacing: 0,\n lit: 1,\n compose: 'stilt_village',\n marker: { height: 7 },\n text: {\n 'pt-BR': { label: 'Palafitas', title: 'PALAFITAS', caption: 'madeira sobre estacas · sem luz pública · lampião', detail: 'Vila dos Pescadores: sem iluminação pública, só lampião.' },\n en: { label: 'Stilt village', title: 'STILT VILLAGE', caption: 'timber on piles · no public lighting · lanterns', detail: 'Fishermen\\'s village: no public lighting, only lanterns.' },\n },\n params: {\n water: { y: 0.04, z: -2, length: 60, depth: 30, color: 0x22343e, roughness: 0.25, metalness: 0.3 },\n bank: { z: 14, length: 60, depth: 8, color: 0x4a4436 },\n boardwalk: { y: 1.3, length: 56, width: 2, color: 0x5a4630, pilesFrom: -26, pilesTo: 26, pilesStep: 4 },\n houses: { count: 5, first: -22, pitch: 11, z: -7, colors: [0x6a5a46, 0x5a6a6a, 0x7a5a46], lantern: { dx: 1.5, y: 3.2, dz: -3.4, lit: 0xffc070, unlit: 0x3a3a3a } },\n lamp: { dx: -11, y: 3, dz: -3, color: 0xffb060, intensity: 0.9, distance: 10 },\n boat: { dx: 14, dz: 6, color: 0x5a3a2a },\n },\n}\n\nconst military: NeighbourhoodPattern<MilitaryParams> = {\n id: 'military',\n streetWidth: 40,\n walkWidth: 0,\n typologies: ['tent'],\n pole: '',\n lightColor: 0xe6eeff,\n spacing: 40,\n lit: 1,\n compose: 'military',\n marker: { height: 12, dz: -14 },\n text: {\n 'pt-BR': { label: 'Militar', title: 'MILITAR', caption: 'torre de vigia e tripé · holofote branco · luz vermelha · a cada 40 m', detail: 'Base, bloqueio e penitenciária: torres com holofote branco e luz vermelha de emergência no perímetro.' },\n en: { label: 'Military', title: 'MILITARY', caption: 'watch tower and tripod · white searchlight · red lamp · every 40 m', detail: 'Base, roadblock and penitentiary: towers with a white searchlight and a red emergency lamp on the perimeter.' },\n },\n params: {\n yard: { length: 60, color: 0x3a3a30 },\n fence: { from: -28, to: 28, step: 4, z: -12, height: 3, color: 0x6a6c6e, wireColor: 0x9a9a9a },\n towers: { dx: [-20, 20], dz: -14 },\n alarm: { dz: -10, color: 0xff2a1a, intensity: 1.2, distance: 16, y: 3, lampDz: -11.7, lampY: 2.6 },\n sandbags: { dz: -6, length: 10, rows: 3 },\n tents: { count: 3, first: -14, pitch: 14, dz: 8, width: 6, depth: 8 },\n },\n}\n\nconst rural: NeighbourhoodPattern<RuralParams> = {\n id: 'rural',\n streetWidth: 6,\n walkWidth: 0,\n typologies: ['farmhouse'],\n pole: 'wood_crossarm',\n lightColor: 0xffd27a,\n spacing: 0,\n lit: 1,\n compose: 'rural',\n marker: { height: 7 },\n text: {\n 'pt-BR': { label: 'Rural', title: 'RURAL', caption: 'casa sede com varanda · poste de madeira só no cruzamento', detail: 'Casa sede com varanda. Luz só em cruzamentos e sedes.' },\n en: { label: 'Rural', title: 'RURAL', caption: 'farmhouse with a veranda · wooden pole only at the junction', detail: 'Farmhouse with a veranda. Light only at junctions and farmhouses.' },\n },\n params: {\n road: { length: 60, color: 0x4a3a2a },\n field: { y: 0.01, dz: 15, length: 60, depth: 22, color: 0x3a4a2a },\n farmhouse: { dx: -10, dz: -14 },\n pole: { dx: 6, dz: -4 },\n fence: { dz: -4, half: 28, height: 1.2, color: 0x5a4630 },\n trees: { count: 8, first: 8, span: 20, dz: -16, spread: 10, minScale: 1, scaleRange: 0.5 },\n crops: { rows: 6, perRow: 20, first: -26, pitch: 2.7, dz: 8, rowPitch: 2.2, width: 0.4, minHeight: 0.6, heightRange: 0.3, color: 0x4a5a2a },\n },\n}\n\n/** The ten patterns of the Galeria's sample sheet, in the order the page builds them. */\nexport const DEFAULT_PATTERNS: readonly NeighbourhoodPattern<any>[] = [downtown, suburb, workingClass, historicStreet, industrialPort, railwayVillage, mountainResort, stiltVillage, military, rural]\n\n/** Where the sample sheet puts each pattern: a 3 x 3 grid 80 by 56 m apart, and the military cell off to the east. */\nexport const SAMPLE_CELLS: Readonly<Record<string, { x: number; z: number }>> = {\n downtown: { x: -80, z: -56 },\n suburb: { x: 0, z: -56 },\n working_class: { x: 80, z: -56 },\n historic_street: { x: -80, z: 0 },\n industrial_port: { x: 0, z: 0 },\n railway_village: { x: 80, z: 0 },\n mountain_resort: { x: -80, z: 56 },\n stilt_village: { x: 0, z: 56 },\n rural: { x: 80, z: 56 },\n military: { x: 160, z: 0 },\n}\n\nexport { COMPOSERS }\n","import type { Point, Rect } from './types'\n\nexport const clamp = (v: number, a: number, b: number): number => (v < a ? a : v > b ? b : v)\nexport const lerp = (a: number, b: number, t: number): number => a + (b - a) * t\n/** Smoothstep between `a` and `b`; with `a > b` it falls instead of rising. */\nexport const smoothstep = (a: number, b: number, x: number): number => {\n const t = clamp((x - a) / (b - a), 0, 1)\n return t * t * (3 - 2 * t)\n}\n/** The team's cheap hash of two numbers into [0, 1). */\nexport const hash2 = (a: number, b: number): number => {\n const n = Math.sin(a * 127.1 + b * 311.7) * 43758.5453\n return n - Math.floor(n)\n}\n/** Distance from a point to the nearest segment of a polyline. */\nexport function distanceToPolyline(px: number, py: number, points: readonly Point[]): number {\n let best = 1e9\n for (let index = 0; index < points.length - 1; index++) {\n const [ax, ay] = points[index] as Point\n const [bx, by] = points[index + 1] as Point\n const dx = bx - ax\n const dy = by - ay\n const t = clamp(((px - ax) * dx + (py - ay) * dy) / (dx * dx + dy * dy), 0, 1)\n const d = Math.hypot(px - ax - t * dx, py - ay - t * dy)\n if (d < best) best = d\n }\n return best\n}\n/** Inside the rectangle grown by `margin` on every side. */\nexport const insideRect = (px: number, py: number, r: Rect, margin: number): boolean => px > r[0] - margin && px < r[2] + margin && py > r[1] - margin && py < r[3] + margin\n/** Inside an ellipse given by its centre and radii. */\nexport const insideEllipse = (px: number, py: number, center: Point, radius: Point): boolean => Math.hypot((px - center[0]) / radius[0], (py - center[1]) / radius[1]) < 1\n","import type { UrbanBuilder } from '../scene'\nimport { distanceToPolyline, hash2, insideEllipse, insideRect, lerp, smoothstep } from './math'\nimport type { ColorRule, Ramp, TerrainGrid, TerrainOptions, Wave } from './types'\n\nconst TRIG = { sin: Math.sin, cos: Math.cos }\n\nfunction wave(w: Wave, px: number, py: number): number {\n return w.kind === 'product' ? TRIG[w.x[0]](px * w.x[1]) * TRIG[w.y[0]](py * w.y[1]) * w.amplitude : Math.sin(px * w.kx + py * w.ky) * w.amplitude\n}\n\nfunction ramp(r: Ramp, px: number, py: number): number {\n const v = r.axis === 'x' ? px : py\n return r.fullUntil !== undefined && v < r.fullUntil ? 1 : smoothstep(r.from, r.to, v)\n}\n\nfunction mask(ramps: readonly Ramp[], px: number, py: number): number {\n let m = 1\n for (const r of ramps) m *= ramp(r, px, py)\n return m\n}\n\nconst sum = (start: number, waves: readonly Wave[], px: number, py: number): number => {\n let total = start\n for (const w of waves) total += wave(w, px, py)\n return total\n}\n\n/**\n * A ground made of layers, as the team's Vale: a rolling base, masked relief (mountains, hills), cities levelled flat, rivers and lakes carved in,\n * a forest density, and a colour for every point. It answers questions about a point of the map and hands a drawer the grid of a square mesh.\n */\nexport function createTerrain(options: TerrainOptions) {\n const { world } = options\n const toWorld = (px: number, py: number): [number, number] => [px * world.scale + world.origin, py * world.scale + world.origin]\n const fromWorld = (x: number, z: number): [number, number] => [(x - world.origin) / world.scale, (z - world.origin) / world.scale]\n\n function heightAt(px: number, py: number): number {\n let h = sum(options.base.level, options.base.waves, px, py)\n for (const layer of options.layers) h += mask(layer.mask, px, py) * sum(layer.level, layer.waves, px, py)\n for (const f of options.flatten) {\n if (!insideRect(px, py, f.rect, f.margin)) continue\n const inside = Math.min(smoothstep(f.edge[0], f.edge[1], Math.min(px - f.rect[0], f.rect[2] - px, py - f.rect[1], f.rect[3] - py)), 1)\n h = lerp(h, f.level, inside)\n }\n const land = h\n for (const river of options.rivers) {\n const bed = 'fixed' in river.bed ? river.bed.fixed : Math.max(river.bed.floor, land - river.bed.below)\n h = lerp(bed, h, smoothstep(river.width[0], river.width[1], distanceToPolyline(px, py, river.points)))\n }\n for (const lake of options.lakes) {\n const d = Math.hypot((px - lake.center[0]) / lake.radius[0], (py - lake.center[1]) / lake.radius[1])\n if (d < lake.reach) h = lerp(lake.level, h, smoothstep(lake.edge[0], lake.edge[1], d))\n }\n return options.custom ? options.custom(px, py, h) : h\n }\n\n function forestAt(px: number, py: number): number {\n let density = 0\n for (const zone of options.forest.zones) density = Math.max(density, mask(zone.mask, px, py))\n const patch = options.forest.patch\n if (patch) density = Math.max(density, smoothstep(patch.edge[0], patch.edge[1], sum(0, patch.waves, px, py) * 0.5 + 0.5) * patch.weight)\n return density\n }\n\n const nearRiver = (px: number, py: number, margin: number): boolean => options.rivers.some((river) => distanceToPolyline(px, py, river.points) < margin)\n\n function matches(rule: ColorRule, px: number, py: number, h: number, forest: number): boolean {\n switch (rule.kind) {\n case 'below':\n return h < rule.height\n case 'above':\n return h > rule.height\n case 'ellipse':\n return insideEllipse(px, py, rule.center, rule.radius)\n case 'rects':\n return rule.rects.some((r) => insideRect(px, py, r, rule.margin))\n case 'forest':\n return forest > rule.above\n }\n }\n\n /** Colour of a point as 0xRRGGBB; `h` is the height there, which the grid already has. */\n function colorAt(px: number, py: number, h: number = heightAt(px, py)): number {\n const forest = forestAt(px, py)\n for (const rule of options.colors) if (matches(rule, px, py, h, forest)) return rule.color\n const { colors, cell } = options.fields\n return colors[Math.floor(hash2(Math.floor(px / cell[0]), Math.floor(py / cell[1])) * colors.length)] as number\n }\n\n /**\n * The vertices of the square mesh, the way a plane of `size` metres with `segments` cells a side lays them out (rows along z, the\n * coordinates rounded to 32 bits) with the height and the colour of each.\n */\n function grid(segments: number = world.segments): TerrainGrid {\n const count = (segments + 1) * (segments + 1)\n const x = new Float32Array(count)\n const z = new Float32Array(count)\n const heights = new Float32Array(count)\n const colors = new Uint32Array(count)\n const half = world.size / 2\n const step = world.size / segments\n for (let iy = 0; iy <= segments; iy++) {\n for (let ix = 0; ix <= segments; ix++) {\n const i = iy * (segments + 1) + ix\n x[i] = ix * step - half\n z[i] = iy * step - half\n const [px, py] = fromWorld(x[i] as number, z[i] as number)\n const h = heightAt(px, py)\n heights[i] = h\n colors[i] = colorAt(px, py, h)\n }\n }\n return { segments, size: world.size, x, z, heights, colors }\n }\n\n return { options, toWorld, fromWorld, heightAt, forestAt, nearRiver, colorAt, grid }\n}\n\nexport type Terrain = ReturnType<typeof createTerrain>\n\n/** Puts the ground and its water under it into a builder: the terrain mesh first, then the water plane, as the page's `buildWorld`. */\nexport function drawTerrain(b: UrbanBuilder, terrain: Terrain, segments?: number): void {\n b.terrain(terrain.grid(segments))\n const { water, world } = terrain.options\n b.plane(0, water.level, 0, world.size, world.size, water.color, { roughness: water.roughness, metalness: water.metalness })\n}\n","import { cars, pickups, suvs, vans } from '@adatechnology/game-vehicles-fleet'\nimport { pickForContext, regions } from '@adatechnology/game-vegetation-species'\nimport type { Region } from '@adatechnology/game-vegetation-species'\n\nimport type { PlantProvider, PlantRequest, VehicleProvider, VehicleRequest } from './types'\n\n/** The vehicles of the fleet that park on a street: cars, SUVs, pickups and vans. */\nexport const PARKED_VEHICLE_IDS: readonly string[] = [...cars, ...suvs, ...pickups.filter((id) => id !== 'monster_truck'), ...vans]\n\nexport type VehicleProviderOptions = {\n /** Ids of the fleet to choose from. Default `PARKED_VEHICLE_IDS`. */\n ids?: readonly string[]\n /** Replaces the choice: the id for a request. The default picks by the spot, so the same pattern parks the same cars every time. */\n pick?: (request: VehicleRequest, ids: readonly string[]) => string\n /** Paint of the car. Default the colour the pattern asks for. */\n paint?: (request: VehicleRequest) => number | undefined\n}\n\nconst hashSpot = (x: number, z: number, ry: number): number => {\n let h = 2166136261\n for (const value of [Math.round(x * 100), Math.round(z * 100), Math.round(ry * 100)]) {\n h ^= value & 0xffff\n h = Math.imul(h, 16777619)\n h ^= (value >> 16) & 0xffff\n h = Math.imul(h, 16777619)\n }\n return h >>> 0\n}\n\n/**\n * A vehicle provider that asks the drawer for a vehicle of the fleet where the pattern parks one. It chooses by the spot and not\n * by the scene's random, so the scene's draw order (and the golden of the Galeria, which parks nothing) does not move.\n */\nexport function createVehicleProvider(options: VehicleProviderOptions = {}): VehicleProvider {\n const ids = options.ids ?? PARKED_VEHICLE_IDS\n if (ids.length === 0) throw new Error('The vehicle provider needs at least one vehicle id')\n return (request, b) => {\n const id = options.pick ? options.pick(request, ids) : (ids[hashSpot(request.x, request.z, request.ry) % ids.length] as string)\n const color = options.paint ? options.paint(request) : request.color\n b.place('vehicle', id, request.x, request.z, { ry: request.ry, ...(color === undefined ? {} : { color }), seed: `${id}:${request.x}:${request.z}` })\n }\n}\n\nexport type PlantProviderOptions = {\n /** Planting table of a region. Default Brazil's. */\n region?: Region\n /** Context of the table for each kind the patterns plant. */\n contexts?: Partial<Record<PlantRequest['kind'], string>>\n /** Seed of the choice; the spot is added so each place gets its own species. */\n seed?: number | string\n /** Replaces the choice: the species id for a request. */\n pick?: (request: PlantRequest, context: string, seed: string) => string\n}\n\nexport const DEFAULT_PLANT_CONTEXTS: Readonly<Record<PlantRequest['kind'], string>> = { tree: 'sidewalk_tree', pine: 'square' }\n\n/** A plant provider that asks the drawer for a species of the pack, drawn from the region's table for the kind (a tree on the sidewalk, a pine in the square). */\nexport function createPlantProvider(options: PlantProviderOptions = {}): PlantProvider {\n const region = options.region ?? regions.br\n const contexts = { ...DEFAULT_PLANT_CONTEXTS, ...options.contexts }\n const seed = options.seed ?? 1\n return (request, b) => {\n const context = contexts[request.kind]\n const key = `${seed}:${request.kind}:${request.x}:${request.z}`\n const id = options.pick ? options.pick(request, context, key) : pickForContext(region, context, key)\n b.place('plant', id, request.x, request.z, { scale: request.scale, seed: key })\n }\n}\n"],"mappings":";AAGO,SAAS,kBAAkB,OAA4B;AAC5D,QAAM,SAAsB;AAAA,IAC1B,MAAM;AAAA,IACN,OAAO;AACL,aAAO,OAAO,SAAS;AAAA,IACzB;AAAA,EACF;AACA,SAAO;AACT;;;ACXA,SAAS,iBAAiB;AAM1B,IAAM,OAAO;AACb,IAAM,4BAA4B;AAClC,IAAM,wBAAwB;AAC9B,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAcpB,SAAS,mBAAmB,QAAsB,UAA+B,CAAC,GAAG;AAC1F,QAAM,QAAqB,CAAC;AAC5B,QAAM,QAAmB,CAAC;AAC1B,QAAM,UAAiC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,EAAE;AAC3D,QAAM,SAAS,QAAQ,UAAU,kBAAkB,OAAO,iBAAiB;AAC3E,QAAM,OAAO,CAAS,SAAoC,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK,MAAM,CAAC;AAEjG,QAAM,QAAQ,CAAC,GAAW,GAAW,GAAW,KAAK,GAAG,SAAS,SAAiB,MAAM,KAAK,EAAE,OAAO,SAAS,QAAQ,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI;AACxI,QAAM,MAAM,CAAC,GAAW,GAAW,GAAW,OAAe,QAAgB,OAAe,OAAe,IAAgB,CAAC,MAAY;AACtI,UAAM,OAAkB,EAAE,OAAO,OAAO,QAAQ,EAAE,UAAU,MAAM,GAAG,GAAG,IAAI,SAAS,GAAG,GAAG,OAAO,QAAQ,OAAO,OAAO,UAAU,EAAE,YAAY,OAAO,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,QAAQ,UAAU,OAAO,QAAQ,KAAK,EAAE;AAC7N,QAAI,EAAE,MAAO,MAAK,QAAQ,EAAE;AAC5B,UAAM,KAAK,IAAI;AAAA,EACjB;AACA,QAAM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
2
|
"name": "@adatechnology/game-urban",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "The urban pattern as data, with no three.js: the five street poles with a light budget, roads, sidewalks and street grids, filled blocks of city buildings and the props of a street (fences, tents, trees, containers, watch towers, sandbags, labels, wires), as parts on the silhouette vocabulary of game-floorplan. Every catalogue is a registry and every number an option.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"game",
|
|
8
|
+
"urban",
|
|
9
|
+
"city",
|
|
10
|
+
"streets",
|
|
11
|
+
"street-lights",
|
|
12
|
+
"procedural",
|
|
13
|
+
"seeded"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Andersonfrfilho/adatechnology-game-kit.git",
|
|
18
|
+
"directory": "packages/game-urban"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"module": "dist/index.js",
|
|
26
|
+
"types": "dist/index.d.ts",
|
|
27
|
+
"unpkg": "dist/index.global.js",
|
|
28
|
+
"jsdelivr": "dist/index.global.js",
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./global": "./dist/index.global.js"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@adatechnology/game-contracts": "0.13.0",
|
|
42
|
+
"@adatechnology/game-floorplan": "0.2.1",
|
|
43
|
+
"@adatechnology/game-vegetation-species": "0.2.0",
|
|
44
|
+
"@adatechnology/game-vehicles-fleet": "2.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^22.10.7",
|
|
48
|
+
"tsup": "^8.5.1",
|
|
49
|
+
"typescript": "^5.7.3",
|
|
50
|
+
"vitest": "^3.2.4",
|
|
51
|
+
"@adatechnology/golden-tool": "0.0.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsup",
|
|
55
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
56
|
+
"test": "vitest run"
|
|
57
|
+
}
|
|
6
58
|
}
|