import { type RuleSign, type SignApproach, type SignJunction, type SignRoadGraphInput } from './roadSigns'; import type { SignFacePrototype } from './signFaces'; export declare const CS2_HIGHWAY_SIGNS_SCHEMA: "helix.cs2-highway-signs/1"; /** The rule's own model name (no CS2 prefab is placed: the gantry is drawn from the vendored pack). */ export declare const EXIT_GANTRY_PREFAB = "HELIX_ExitGantryMD"; /** How far before the diverge the gantry stands, metres along the road in (at most 80% of that road's length). */ export declare const GANTRY_BEFORE_DIVERGE_M = 30; /** The pole's gap past the outermost lane centre: the motorway sign gap measured on Pacifica's own signs. */ export declare const GANTRY_POLE_GAP_M: number; /** Two gantries closer than this keep the first: two exits in a row share one approach. */ export declare const GANTRY_MIN_SPACING_M = 60; /** The road in needs this many lanes for a diverge to be an exit. */ export declare const EXIT_MIN_LANES_IN = 2; /** The pack's folder: src/cs2 -> repo root, and the same depth from dist/cs2. */ export declare function defaultHighwaySignsPack(): string; export interface HighwaySignsPack { /** The atlas PNG every prototype's UVs sample. */ texture: string; textureSha256: string; exitGantry: SignFacePrototype; } /** Reads and checks the vendored pack (its atlas must match its recorded sha256). */ export declare function readHighwaySignsPack(dir?: string): HighwaySignsPack; export interface MotorwayDiverge { junction: SignJunction; /** The road driving in, its exit branch and the branch the motorway continues on. */ road: SignApproach; exit: SignApproach; through: SignApproach; } /** Pure: the exits of `junctions` (see the header), each with the road in, the exit and the through branch. */ export declare function motorwayDiverges(junctions: readonly SignJunction[], lanesOf: (edge: number) => number): MotorwayDiverge[]; /** * Pure: a point `alongM` back up a lane from its end at the junction (`fromEnd`: the lane's end 3 is the junction's, else its end 0), * walking the curve, with the unit horizontal direction away from the junction there. Stops at 80% of the lane. */ export declare function laneBack(curves: Float32Array, lane: number, fromEnd: boolean, alongM: number): { point: [number, number, number]; tangent: [number, number]; }; /** * Pure: the gantry of one exit, or null when the exit leaves on the far side from the driver or the road in has no lane to stand * by. The pole stands `GANTRY_POLE_GAP_M` past the road's outermost inbound lane on the driver's side, `GANTRY_BEFORE_DIVERGE_M` * back along that lane; the pack's arm runs along local +x, which `signFacing` turns to the approach's +lateral (away from the * driver's side), so the arm reaches over the road in right-hand traffic. */ export declare function exitGantryTransform(input: Pick, diverge: MotorwayDiverge, side: -1 | 1): { position: [number, number, number]; quaternion: [number, number, number, number]; } | null; /** A gantry's pole keeps this far (horizontally) from every car lane's centre line: a lane is 3.75 m wide, the pole 0.76 m. */ export declare const GANTRY_LANE_CLEARANCE_M = 2.5; /** * Pure: whether a point lies within `radius` of any car lane's centre line (every lane sampled about every metre), for the * gantry's pole: the shoulder of the road in can run beside the exit ramp or another road. */ export declare function carLaneGrid(curves: Float32Array, lanes: Uint32Array, radius?: number): (x: number, z: number) => boolean; /** * Pure: an exit gantry for every motorway exit of `junctions` (scene frame before the sea shift), skipping one whose pole would * stand within `occupied` (a pole of the game's own), within `GANTRY_LANE_CLEARANCE_M` of a car lane or within * `GANTRY_MIN_SPACING_M` of an earlier gantry. */ export declare function exitGantriesByRule(input: Pick, junctions: readonly SignJunction[], occupied?: (x: number, z: number) => boolean): RuleSign[];