import type * as THREE from "three"; import type { ThreeParts } from "../realistic/textures.ts"; /** What the places' layer hands the picture at each draw (see `PlaceLayer.sprites`). */ export interface PlaceSpriteData { /** Changes when the groups change: their places and colours are read again. */ version: number; count: number; /** Each group's place on the Earth as a unit vector in the Earth's own axes (x, y, z). */ points: Float32Array; /** Each group's colour, as CSS has it. */ colors: readonly string[]; /** Changes when `shapes` changes. */ shapesVersion: number; /** For each group, its ring's radius in CSS pixels (0: not drawn here) and how much of the ring is filled (0 to 1, for a group of several places). */ shapes: Float32Array; } /** The rings in one picture: hand them the places' data at each draw. */ export interface PlaceSprites { /** Bring the buffers up to date. `ratio` is device pixels to a CSS pixel, `width` and `height` the picture's size in CSS pixels, and `lit` true when the whole Earth is lit (no night to dim). */ sync(data: PlaceSpriteData | null, ratio: number, width: number, height: number, lit: boolean): void; dispose(): void; } /** * Make the rings for one picture, as a child of the Earth (so they turn with it). Without three.js's `Points` (a subset of three.js that leaves it out) there are none: `null`. * * @param three - The page's three.js. * @param parent - The Earth, or the group that turns it (radius 1). * @param sun - The direction to the Sun in the scene's axes, the uniform the Earth's own surface uses. * @returns The rings, or null. */ /** Make the place rings the first time there is something to draw. One try: without `Points` the result stays null, and a later frame does not ask again. Null data does not count as the try. True when this call made the try. */ export declare function beginPlaceSprites(state: { sprites: PlaceSprites | null; tried: boolean; }, data: PlaceSpriteData | null, create: () => PlaceSprites | null): boolean; export declare function createPlaceSprites(three: ThreeParts, parent: THREE.Object3D, sun: { value: THREE.Vector3; }): PlaceSprites | null;