import type * as THREE from "three"; import type { ThreeParts } from "../realistic/textures.ts"; import { type BeamOptions } from "./geometry.ts"; /** * What the beam has done: whether it is drawn, the chosen satellite's height, the footprint's radius along the ground in kilometres and its angle at the Earth's centre, the elevation it was worked for, * the cells drawn and a cell's radius in kilometres, and how many times its geometry was made. * * @example * ```ts no-run * import type { BeamStats } from "@johnmorrisdotca/chikyu-earth/space"; * * const none: BeamStats = { shown: false, heightKm: 0, radiusKm: 0, angleDegrees: 0, elevation: 25, cells: 0, cellRadiusKm: 0, builds: 0, failed: false }; * console.log(none); * ``` */ export interface BeamStats { shown: boolean; heightKm: number; radiusKm: number; angleDegrees: number; elevation: number; cells: number; cellRadiusKm: number; builds: number; failed: boolean; } /** What the element and the scene share: the options the attributes give, and what the beam did. */ export interface BeamState extends BeamOptions { onError?: (error: unknown) => void; stats: BeamStats; } export declare const newBeamState: () => BeamState; export interface BeamLayer { /** Places the beam for this draw: the chosen satellite's place in Earth radii (the scene's axes), or `null` for none. */ sync(position: readonly [number, number, number] | null): void; dispose(): void; } /** * Makes the beam in `scene` (the world the satellites are in, not the Earth's turning group: the footprint is worked out for the satellite's place now). * * @param three - The page's three.js; it must have `AdditiveBlending`. * @param scene - The scene the satellites are in. * @param state - The model's beam. * @param order - The render order: after the satellites' dots. * @returns The layer. */ export declare function createBeamLayer(three: ThreeParts, scene: THREE.Object3D, state: BeamState, order: number): BeamLayer;