import type { RoadClass, RoadSurface } from '../source'; /** Bumps whenever the bytes of a cell can change for the same source. It is part of every chunk's identity. */ export declare const ROAD_GENERATOR_VERSION = "helix.city-roads/1.2.0"; export declare const ROAD_MANIFEST_SCHEMA = "helix.city-roads/1"; /** Road cells are 1,024 m, globally aligned at multiples of 1,024 m from the scene origin (design §3.2). */ export declare const ROAD_CELL_M = 1024; /** Cell GLB positions are uint16 on a global lattice of 1/60 m (1.67 cm), so a 1 km cell fits and neighbours snap identically. */ export declare const LATTICE_PER_M = 60; export declare const LATTICE_STEP_M: number; /** Lattice steps across one cell: positions in a cell are < this and so fit a uint16. */ export declare const LATTICE_PER_CELL: number; /** Collider rule, as in CS2 (`C:src/cs2/roads.ts:48-49`). */ export declare const COLLIDER_MAX_TRIANGLES = 60000; export declare const COLLIDER_ERROR_M = 0.05; export declare const ROAD_SURFACE: { readonly ASPHALT: 0; readonly CONCRETE: 1; readonly SETT: 2; readonly GRAVEL: 3; readonly KERB: 4; readonly SIDEWALK: 5; readonly MEDIAN: 6; }; export type RoadSurfaceKind = (typeof ROAD_SURFACE)[keyof typeof ROAD_SURFACE]; /** City-source surface to `_ROAD.x`. `dirt` has no kind of its own and reads as gravel. */ export declare const SURFACE_KIND: Record; export declare const MARKING_ATLAS: { readonly zebra0: readonly [0, 0.5, 0.125, 0.5]; readonly zebra1: readonly [0.125, 0.5, 0.125, 0.5]; readonly zebra2: readonly [0.25, 0.5, 0.125, 0.5]; readonly zebra3: readonly [0.375, 0.5, 0.125, 0.5]; readonly line: readonly [0.5, 0.5, 0.0625, 0.5]; readonly arrow: readonly [0.5625, 0.5, 0.1875, 0.5]; readonly arrowL: readonly [0.75, 0.5, 0.25, 0.5]; readonly bus: readonly [0, 0.3359375, 0.5, 0.15625]; readonly stop: readonly [0, 0.1748046875, 0.5, 0.15625]; readonly only: readonly [0, 0.013671875, 0.5, 0.15625]; }; export type MarkingName = keyof typeof MARKING_ATLAS; export declare const MARKING_PAINT: { readonly white: readonly [0.92, 0.92, 0.9]; readonly yellow: readonly [0.85, 0.62, 0.12]; }; export type PaintName = keyof typeof MARKING_PAINT; /** glTF extension and attribute names (params.ts). */ export declare const CITY_MATERIALS_GLTF_EXTENSION = "HELIX_materials_city"; export declare const ROAD_ATTRIBUTE = "_ROAD"; export declare const KERB_HEIGHT_M = 0.15; /** * Markings sit this far above the surface. The lattice is 1.67 cm and the surface and the paint snap to it separately, so a * lift under 3 lattice steps (5 cm) can land on the surface itself and z-fight at grazing angles; 6 cm never does. */ export declare const MARKING_LIFT_M = 0.06; /** * Painted line widths, the same real-world widths the Granit restyle paints (`MARKING_WIDTH_M` in `src/cs2/restyle/ribbons.ts`): lane and * centre lines 0.15 m, edge lines 0.20 m, stop lines 0.40 m. A line quad is mapped onto the solid core of the atlas `line` tile * (`MARKING_LINE_CORE`), so the painted width is the quad's width: the tile has a transparent margin and an edge-to-edge mapping paints * only 69 % of it (the 0.16 m lines used to read 0.11 m). */ export declare const LINE_WIDTH_M = 0.15; export declare const CENTRE_LINE_WIDTH_M = 0.15; export declare const EDGE_LINE_WIDTH_M = 0.2; export declare const STOP_LINE_WIDTH_M = 0.4; /** * The solid part of the `line` tile across its width, as a fraction (texels 12 to 55 of 64, about 80 % alpha), a texel and a half inside it. * Pinned against the restyle's own constant by `markingWidths.spec.ts`. */ export declare const MARKING_LINE_CORE: readonly [number, number]; /** `_ROAD.w` of paint: how worn it reads. Fresh paint, because worn lines vanish at 60 m (the restyle's `MARKING_AGE`). */ export declare const MARKING_AGE = 0.04; /** A two-way local street at least this wide gets a centre line (yellow solid in `us`, white dashed elsewhere). */ export declare const LOCAL_CENTRE_MIN_WIDTH_M = 5.9; /** Sidewalk outer edge drops this far so a gap between the ribbon and the terrain never shows daylight. */ export declare const SKIRT_DROP_M = 0.35; export declare const BRIDGE_PIER_SPACING_M = 30; export declare const BRIDGE_PIER_SIZE_M = 1.6; export declare const BRIDGE_MIN_CLEARANCE_M = 5.5; export declare const BRIDGE_CLEARANCE_PER_LAYER_M = 6; /** A pier shorter than this is not drawn. */ export declare const BRIDGE_PIER_MIN_HEIGHT_M = 1.5; /** Station spacing along a ribbon: tight on curves, loose on straights. */ export declare const STATION_STRAIGHT_M = 20; export declare const STATION_CURVE_M = 3; /** Decks carry heavy cross-sections (barriers, fascia, underside), so their curves are cut a little looser. */ export declare const STATION_DECK_CURVE_M = 6; /** Turns under this many degrees at a polyline vertex count as straight. */ export declare const STATION_STRAIGHT_TURN_DEG = 2.5; /** Elevation profile sample spacing. */ export declare const PROFILE_STEP_M = 4; /** The longitudinal smoothing window (metres) over which ground noise is averaged out, and the end taper. */ export declare const PROFILE_SMOOTH_M = 36; export declare const PROFILE_TAPER_M = 18; export type RoadFamily = 'highway' | 'arterial' | 'local' | 'path' | 'skip'; /** * Cross-section data lifted from the CS2 road cuts of Ruben's Granit bake (`road-canon/kit/kit.json`, measured by lane * road-canon): a city lane is 3 m and a highway lane 4 m; a road is a Small (16 m), Medium (24 m) or Large (32 m) reserve * from property line to property line; an elevated highway deck is a 0.6 m slab on girders 1.25 m deep with a barrier of * about 1.07 m on each edge. */ export declare const CITY_LANE_M = 3; export declare const HIGHWAY_LANE_M = 4; export declare const RESERVE_SMALL_M = 16; export declare const RESERVE_MEDIUM_M = 24; export declare const RESERVE_LARGE_M = 32; export interface DeckSpec { /** Top of the deck to the underside of its girders. */ thicknessM: number; /** Barrier along the deck edge: `jersey` (highway concrete) or `parapet` (a plain concrete rail). */ barrier: 'jersey' | 'parapet'; } export declare const DECK: Record; /** * New Jersey barrier: profile points (lateral offset outward from the deck edge, height above the deck), inner face first, * then the flat top, then the outer face down to the deck again. 1.07 m high, 0.54 m at the foot (CS2 kit: foot 0.5 m, top 1.08 m). */ export declare const JERSEY_PROFILE: ReadonlyArray; /** A plain parapet: 0.25 m wide, 0.9 m high. */ export declare const PARAPET_PROFILE: ReadonlyArray; export declare const BARRIER_WIDTH_M = 0.54; export declare const PARAPET_WIDTH_M = 0.25; /** An edge is drawn as a deck (thickness, barriers, piers) where its road rises this far above the ground, bridge tag or not. */ export declare const DECK_ABOVE_GROUND_M = 2.5; export interface ClassSpec { family: RoadFamily; /** Carriageway width kerb to kerb when the source has none. */ widthM: number; /** Maximum grade, rise over run. */ gradeCap: number; /** Junction kerb fillet radius. */ filletM: number; lanes: number; /** Lane width: 3 m on city streets, 4 m on highways (CS2 cuts). */ laneM: number; /** Full corridor width, kerb to kerb with sidewalks and verges: CS2 Small 16 / Medium 24 / Large 32 m. */ reserveM: number; } export declare const CLASS_SPEC: Record; /** * A freeway ramp. The city source has no `_link` class (the importers fold `motorway_link` into `motorway`), so a ramp is * recognised by what it is: a one-way, single-lane highway-class edge no wider than 7.5 m. Ramps climb faster than freeways. */ export declare const RAMP_SPEC: ClassSpec; export declare const RAMP_MAX_WIDTH_M = 7.5; /** Auxiliary (lane-drop) lane beside a freeway where a ramp diverges or merges. */ export declare const AUX_LANE_M = 3.6; export declare const AUX_LANE_LENGTH_M = 200; /** The width of the painted gore wedge at its nose, and the longest and shortest the wedge may run. */ export declare const GORE_NOSE_M = 3.6; export declare const GORE_MAX_LENGTH_M = 60; /** Locale table for markings (design §3.4.5: `driveSide`, colour). */ export interface MarkingLocale { /** Colour of the line that separates opposing traffic. */ centre: PaintName; /** Two-way arterials get a double solid centre line, otherwise a single one. */ doubleCentreOnArterials: boolean; dashM: number; gapM: number; } export declare const MARKING_LOCALES: Record; export declare const DEFAULT_MARKING_LOCALE = "eu"; export interface RoadGeneratorOptions { /** Corner fillet scale (1 = the class table). */ filletScale?: number; /** Skip lane markings (debug). */ noMarkings?: boolean; /** Collider triangle cap per cell. */ colliderMaxTriangles?: number; }