import type { Cs2ImpostorManifest, Cs2ImpostorSpecies } from './types'; export interface Cs2ImpostorAtlas { manifest: Cs2ImpostorManifest; dir: string; atlasFile: string; width: number; height: number; azimuths: number; gutterPx: number; /** 19 species are baked and Granit uses 15: join by NAME, never by index. */ speciesByName: Map; } export interface Cs2ImpostorRect { /** Atlas pixels from the TOP-left; `flipY` must be false at the runtime. */ x: number; y: number; width: number; height: number; } /** Reads `impostors/tree-impostors.json`. The atlas PNG itself is left on disk. */ export declare function readCs2Impostors(root: string): Promise; /** Azimuths run horizontally from `origin`: `px = origin + (index * cell, 0)`, `cell = tile + 2 * gutter`. */ export declare function tileRectPx(species: Cs2ImpostorSpecies, azimuth: number): Cs2ImpostorRect; /** * Tile `a` shows the tree from world direction (sin 2*pi*a/N, 0, cos 2*pi*a/N) in its OWN frame, so the instance's yaw * comes out of the view azimuth before quantising. */ export declare function azimuthIndex(toCam: { x: number; z: number; }, yaw: number, azimuths: number): number;