import { type DistrictPlan } from "./district.ts"; import { OUTSIDE_LEVELS, outsideCount, type OutsideCrowd, type OutsideLevel } from "./outside.paint.ts"; import type { Pt } from "./crowd.ts"; export { OUTSIDE_LEVELS, outsideCount }; export type { OutsideCrowd, OutsideLevel }; /** What can be asked of the crowd outside a district (`DistrictOptions.outside`). Off by default. */ export interface OutsideOptions { /** The share of the venues' seats standing outside, in percent: 0 (the default, nobody), 25, 50, 75 or 100. */ level?: OutsideLevel; } /** The most people to a square metre of walkable ground in the list at 100 percent: a crowd standing close, short of a crush. */ export declare const OUTSIDE_DENSITY = 3; /** The distance from a venue's building at which the crowd has thinned to half what it is at the wall, in metres. */ export declare const OUTSIDE_REACH = 60; /** Whether a number is one of the levels. */ export declare const isOutsideLevel: (level: unknown) => level is OutsideLevel; /** The level an options object asks for: 0 when it asks for none. Throws for a level that is not one of `OUTSIDE_LEVELS`. */ export declare function outsideLevelOf(options: { outside?: OutsideOptions; } | undefined): OutsideLevel; /** A small, fast generator of numbers in [0, 1) from a whole seed (mulberry32): only integer arithmetic, so it gives the same numbers in every engine. */ export declare function seeded(seed: number): () => number; /** The mask a plan's venues stand on, if there is one: the first mask that names one of its venues. */ export declare const maskIdOf: (plan: Pick) => string | undefined; /** Whether a plan has a crowd to show: some venue of it stands on a mask. */ export declare const hasOutside: (plan: Pick) => boolean; /** The ids of the venues there is a walkable mask round. */ export declare const OUTSIDE_VENUES: readonly string[]; /** * The crowd outside a plan's venues, in the plan's frame: the people of every venue of the plan that stands on a mask (each with its seats as the plan has them), worked out once and kept. `undefined` where no venue of the plan * has a mask. The crowd is the same list whatever level is shown: `outsideCount` says how many of its first people stand at a level. The district entry holds the data of every mask; the lean district holds a mask's data only after * `loadOutside(venues)` has read it, and throws, saying so, where it is asked for a crowd before. * @example * ```ts * import { planDistrict } from "@johnmorrisdotca/kyogijo-stadiums/district"; * import { outsideCount, outsideCrowd } from "@johnmorrisdotca/kyogijo-stadiums/district"; * const crowd = outsideCrowd(planDistrict({ venues: ["bc-place", "rogers-arena"] }))!; * console.log(crowd.venues.map((v) => `${v.key} ${v.placed}`).join(", "), outsideCount(crowd, 50)); * // bc-place:cfl 54500, rogers-arena 18871 36686 * ``` */ export declare function outsideCrowd(plan: DistrictPlan): OutsideCrowd | undefined; /** Whether a point of the plan's frame (feet) is on the mask's walkable ground: the inverse of what `outsideCrowd` does to a person, for a test to hold the crowd to the mask. */ export declare function standsOnWalkable(plan: DistrictPlan, maskId: string, [fx, fy]: Pt): boolean;