import type { Pt } from "./crowd.ts"; import { type Plane, type Upright } from "./turn.kit.ts"; import { type LonLat } from "./venues.geo.ts"; /** How a landmark is drawn. */ export type LandmarkShape = "dome" | "wheel" | "fountains" | "named"; export declare const LANDMARK_SHAPES: readonly LandmarkShape[]; /** * A landmark of an area, as its data holds it: * - `dome`: a sphere cut by the ground (the Sphere), `width` across at its widest and `height` tall; its outline is its footprint, and the building the area has there is the dome's own. * - `wheel`: a big wheel standing upright along the long way of its outline (OpenStreetMap maps the High Roller's footprint), `width` across, its top `height` over the ground. * - `fountains`: a row of jets along the long way of the water its outline is, reaching up to `height` (the most a published figure says they reach); the water is the area's land cover. * - `named`: a name over the buildings inside its outline (they are the area's own, standing at their own heights), at `height`, the top of the tallest. */ export interface ContextLandmark { key: string; /** The Wikidata item its names come from. */ wikidata: string; name: { en: string; ja: string; }; shape: LandmarkShape; /** The OpenStreetMap element its outline is, `way/`. */ source: string; /** Its outline, metres east and north of the area's origin. */ ring: readonly (readonly [number, number])[]; /** Its height over the ground, in metres. */ height: number; /** A dome's or a wheel's diameter, in metres. */ width?: number; /** A named landmark's tallest building, where its name stands: metres east and north of the area's origin. */ top?: readonly [number, number]; /** Where the figures were read, in our own words. */ read: string; } /** A landmark placed in a district's frame: its outline in feet (x to the right, y down the page), its middle, its height and width in feet, and for a wheel or fountains the unit direction its long way runs. */ export interface PlacedLandmark { key: string; name: { en: string; ja: string; }; shape: LandmarkShape; ring: Pt[]; at: Pt; /** Where its name stands: over its middle, or a named landmark's tallest building. */ label: Pt; height: number; width?: number; along: Pt; } /** The landmarks of some areas placed in a district: turned as the plan is and kept where they stand in the frame (`frame` is the plan's box in feet). */ export declare function placeLandmarks(areas: readonly { origin: readonly [number, number]; landmarks?: readonly ContextLandmark[]; }[], origin: LonLat, turn: number, frame: { x: number; y: number; w: number; h: number; }): PlacedLandmark[]; /** Whether a building's outline is a landmark's own (most of it inside a dome's footprint): the dome draws it, and the block is left out. */ export declare const ownedByLandmark: (landmarks: readonly PlacedLandmark[], ring: readonly Pt[]) => boolean; /** Whether a building stands under a named landmark (its middle inside the landmark's outline): it is raised in the 3D view whatever the count of blocks. */ export declare const underLandmark: (landmarks: readonly PlacedLandmark[], ring: readonly Pt[]) => boolean; /** The jets of fountains, in feet: where each stands along the long way of the water (from its middle) and how high it reaches, as a share of the most. Ours: the published figure is the most they reach, the row is a pattern. */ export declare const FOUNTAIN_JETS: readonly (readonly [number, number])[]; /** What the floor has of the landmarks: a dome's footprint and a wheel's line on the ground, in the tone of the tallest buildings, and the jets' feet as dots on the water. Empty for none. */ export declare function landmarksFloor(landmarks: readonly PlacedLandmark[]): string; /** How finely a dome is cut: sides round it and bands up it. Fewer in the lower tiers. */ export declare const DOME_CUT: Readonly<{ high: { sides: number; bands: number; }; simple: { sides: number; bands: number; }; }>; /** The planes of a dome: a sphere `width` across whose top is `height` over the ground, cut by the ground, as bands of flat facets, each lit by the way it faces. */ export declare function domePlanes(prefix: string, at: Pt, height: number, width: number, cut: { sides: number; bands: number; }): Plane[]; /** How a wheel is drawn: segments round its rim and spokes to its hub. */ export declare const WHEEL_CUT: Readonly<{ high: { rim: number; spokes: number; }; simple: { rim: number; spokes: number; }; }>; /** The planes of a big wheel standing upright along `along`: its rim, its spokes and the two legs from its hub to the ground, each a thin bar seen from every side. */ export declare function wheelPlanes(prefix: string, at: Pt, along: Pt, height: number, width: number, cut: { rim: number; spokes: number; }): Plane[]; /** The planes of fountains: a row of jets along the long way of the water, each a thin upright strip reaching to its share of `height`. */ export declare function fountainPlanes(prefix: string, l: Pick): Plane[]; /** The 3D view's landmarks: each one's shape standing where it is, cut more coarsely in a simple tier. A named landmark has no shape of its own: its buildings are the area's. */ export declare function landmarkUprights(landmarks: readonly PlacedLandmark[], simple: boolean): Upright[];