import type { GeoPoint } from "../types.ts"; import type { PlaceSpriteData } from "./place-sprites.ts"; import { type Place, type PlaceLook, type PlaceView } from "./places.ts"; /** A `places-look` attribute: one of `PLACE_LOOKS`, else `beam`. */ export declare const readPlaceLook: (value: string | null) => PlaceLook; /** The places' look, for the element's own style sheet. Colours: `--chikyu-place-here` and `--chikyu-place-favourite` on the element or the page. */ export declare const PLACE_STYLE: string; /** A satellite ringed and named in the picture just drawn: its name, where it is and whether it can be seen (in the box and not behind the Earth). */ export interface SatelliteMark { id: string; label: string; x: number; y: number; visible: boolean; /** The Earth hides it. The name is dimmed and the ring is left off, unless dimming is off. */ occluded?: boolean; } /** * The most places in sight drawn as markers of their own (a beam, a pin or a ring standing out of the ground, and a name): `here` first, then the rest in the order given. Every other place is a ring on the ground, all of them one draw call. * * @example * ```ts * import { PLACE_MARKS } from "@johnmorrisdotca/chikyu-earth/markers"; * * console.log(PLACE_MARKS); // 32 * ``` */ export declare const PLACE_MARKS = 32; /** * The most rings the layer draws itself, as small circles in the page, when the picture cannot draw them (the three.js parts handed over lack `Points`). Places in sight beyond it are counted in `stats.omitted`, not dropped quietly. * * @example * ```ts * import { PLACE_DOTS } from "@johnmorrisdotca/chikyu-earth/markers"; * * console.log(PLACE_DOTS); // 600 * ``` */ export declare const PLACE_DOTS = 600; /** * The page is told once, and only when places in sight had no room in the fallback circles. Missing `Points` alone is not a loss: the circles still draw, up to {@link PLACE_DOTS}. Returns null when nothing new was lost; otherwise * the detail of `chikyu-places-unavailable`: `reason` says why and `omitted` how many places in sight had no room. */ export declare function placesLostNotice(state: { told: boolean; }, omitted: number): { reason: string; omitted: number; } | null; type Box = { left: number; top: number; width: number; height: number; }; /** * The places' markers in one element: hand it the places and the look, and a view at each draw. */ export interface PlaceLayer { set(places: readonly Place[]): void; look: PlaceLook; /** * Lay the places on the picture just drawn; `null` hides them (the Earth is not in the picture). `taken` is boxes other names use; `marks` are satellites to ring and name, after the places' names and * never over them; `sun` is where the Sun is overhead (null when the whole Earth is lit), for the night side's dimmer markers. */ frame(view: PlaceView | null, taken?: readonly Box[], marks?: readonly SatelliteMark[], sun?: GeoPoint | null): void; /** The rings the picture draws for the places that are not markers of their own, as of the last `frame`; null while there are none. */ readonly sprites: PlaceSpriteData | null; /** * Whether places that crowd are gathered into one ring with their count (the attribute `place-groups`; true by default). False leaves every place its own ring. */ grouping: boolean; /** * Whether the picture draws the rings that are not markers of their own (true by default). False when the three.js parts lack `Points`: the layer then draws those rings itself as small circles in the page, up to {@link PLACE_DOTS}, * fading at the Earth's edge and dimmer at night, and `stats.omitted` counts the places in sight it had no room for. `stats.sprites` counts only the rings the picture draws; `stats.dots` counts the circles. */ ringsInPicture: boolean; /** Dim a name the Earth hides, and leave its ring off. On by default. Off leaves that name out. */ dimOccluded: boolean; readonly stats: { places: number; shown: number; labels: number; renders: number; rings: number; satelliteNames: number; marks: number; groups: number; sprites: number; dots: number; omitted: number; }; /** The boxes the names and the markers' heads take in the picture just drawn, for other names to keep clear of. */ readonly boxes: readonly { left: number; top: number; width: number; height: number; }[]; dispose(): void; } /** * Make the places' layer in a box of an element's shadow root (the box is `#places`, styled by {@link PLACE_STYLE}). * * @param box - The element's `#places` box. * @returns The layer. */ export declare function createPlaceLayer(box: HTMLElement): PlaceLayer; export {};