import type { KyogijoRace, RaceViewSettings } from "./circuits.race.dom.ts"; import type { CircuitRace, RaceOptions } from "./circuits.race.ts"; import { type DistrictOptions } from "./district.ts"; import { type DistrictTurnSettings } from "./district.turn.ts"; /** What a race on a district's ground is drawn from: the district's options, its `circuit` named, and the race's (`seed`, `laps`, `cars`). */ export type DistrictRaceOptions = DistrictOptions & { circuit: string; } & Omit; /** A race on a district's ground at a moment: the district's and the race's options, and the seconds from the start (0, the grid, by default). */ export type DistrictRaceDrawOptions = DistrictRaceOptions & { t?: number; }; /** How a race on a district's ground is shown and played: as a circuit's race, with the district's 3D view's settings (its viewpoint, the walls and roofs of its venues, its quality). */ export type DistrictRaceSettings = RaceViewSettings & { turn?: DistrictTurnSettings; }; /** * A race on a district's ground at a moment, as one SVG string: the district's plan with a dot for each car where the race has it then, on the circuit where the district lays it, in its team's colour with the position it holds * written on it. The race is the simulation the options make (made-up cars, from a seed), or the one given (from a feed, `raceFromFeed`). * @example * ```ts * import { drawDistrictRace } from "@johnmorrisdotca/kyogijo-stadiums/district"; * const svg = drawDistrictRace({ venues: ["t-mobile-arena"], circuit: "las-vegas", laps: 3, cars: 6, t: 120 }); * console.log(svg.match(/class="ky-ci-car"/g)!.length, svg.includes('data-circuit="las-vegas"')); * // 6 true * ``` */ export declare function drawDistrictRace(options: DistrictRaceDrawOptions, given?: CircuitRace): string; /** * Mount a race on a district's ground in a page: the district flat (or in 3D, with its venues, its landmarks and the circuit's pit building standing) with a dot for each car on the circuit, and the race's clock, controls and * timing board, as `mountCircuitRace` has them. It does nothing until it is played, and nothing while it is paused, hidden or out of sight; in 3D the view's turn and the race share one frame. The lean district reads the * circuits first (`await loadCircuits()`), with the venues' records and the area round them as for any district. * @example * ```ts no-run * import { mountDistrictRace } from "@johnmorrisdotca/kyogijo-stadiums/district"; * const race = mountDistrictRace(document.querySelector("#strip")!, { venues: ["t-mobile-arena"], circuit: "las-vegas", labels: true }, { view: "3d", speed: 10 }); * race.play(); * ``` */ export declare function mountDistrictRace(host: HTMLElement, options: DistrictRaceOptions, settings?: DistrictRaceSettings): KyogijoRace;