/** * The Earth's tilt, degrees: the IAU's obliquity of the ecliptic at J2000. The tropics lie at this latitude, the polar circles at 90 degrees less it. * * @example * ```ts * import { EARTH_TILT } from "@johnmorrisdotca/chikyu-earth/realistic"; * * console.log(EARTH_TILT, 90 - EARTH_TILT); * ``` */ export declare const EARTH_TILT = 23.4393; /** * The Earth's radius on the screen, in CSS pixels, from which the grid has a line every 15 degrees; below it, every 30. * * @example * ```ts * import { GRID_FINE_RADIUS } from "@johnmorrisdotca/chikyu-earth/realistic"; * * console.log(GRID_FINE_RADIUS); * ``` */ export declare const GRID_FINE_RADIUS = 220; /** * The attributes the grid reads: `grid`. * * @example * ```ts * import { GRID_ATTRIBUTES } from "@johnmorrisdotca/chikyu-earth/realistic"; * * console.log(GRID_ATTRIBUTES.join(" ")); * ``` */ export declare const GRID_ATTRIBUTES: readonly ["grid"]; /** * A `grid` attribute: absent (or `off`) draws none, anything else draws it. * * @param value - The attribute's text, or `null` when it is not there. * @returns Whether the grid is drawn. * * @example * ```ts * import { readGrid } from "@johnmorrisdotca/chikyu-earth/realistic"; * * console.log(readGrid(null), readGrid(""), readGrid("off")); * ``` */ export declare function readGrid(value: string | null): boolean; /** * The grid's lines, ready for one batch of line segments: the special lines first, then the lines every 30 degrees, then the ones every 15 degrees in between, so that the first `coarse` points are * the grid of a small Earth and all `points` the grid of a large one. * * @example * ```ts * import { gridLines, type GridLines } from "@johnmorrisdotca/chikyu-earth/realistic"; * * const grid: GridLines = gridLines(); * console.log(grid.coarse < grid.points); * ``` */ export interface GridLines { /** x, y, z of each point, two points to a segment. */ positions: Float32Array; /** r, g, b of each point (0 to 255). */ colours: Uint8Array; /** How many points the special lines and the 30-degree lines take. */ coarse: number; /** How many points there are in all. */ points: number; } /** * Makes the grid: meridians and parallels every 15 degrees (the parallels from 75 south to 75 north, the meridians to the poles), the equator brightest, the tropics and polar circles bright, * the prime meridian in a warm colour. Each line is cut into pieces of at most `step` degrees so it keeps to the sphere. * * @param step - The longest piece, in degrees (3 when left out). * @returns The segments and their colours. * * @example * ```ts * import { gridLines } from "@johnmorrisdotca/chikyu-earth/realistic"; * * const grid = gridLines(); * console.log(grid.points / 2, grid.coarse / 2); * ``` */ export declare function gridLines(step?: number): GridLines;