import { type Csm2LodTarget } from '../../cs2/lods'; /** Bump when the catalog's bytes change for the same capture (the landscape stage keys on it). */ export declare const CS2_TREES_VERSION = 1; export declare const CS2_TREE_PROTOTYPE_PREFIX = "cs2-tree-"; /** * Summer leaf albedo per species, LINEAR RGB (the mean leaf texel of the tinted sheet). Calibrated against the CS2 reference shots of * Pacifica in default summer daylight: lit broadleaf crowns read about (71-88, 75-92, 31-33) on screen at pose 21, a darker and less * yellow green than the lawn's (54, 59, 20) brightened ~1.5x; the lawn's own calibration (`CS2_URBAN_TERRAIN_PRESET`, accent albedo * near linear (0.016, 0.029, 0.005)) maps that to roughly (0.04, 0.06, 0.015). Conifers sit darker and bluer, palms and birch lighter * and yellower, as the game draws them. */ export declare const CS2_TREE_LOOKS: Record; /** Default for a captured species the table does not name: the broadleaf mean. */ export declare const CS2_TREE_DEFAULT_LOOK: [number, number, number]; /** Species drawn with another species' prototype (rare in Pacifica and alike from the street): keeps the prototype count, and so the draws, down. */ export declare const CS2_TREE_SHARES: Record; /** Sidewalk trees the city plants (CS2 itself plants London planes and lindens along North American streets). */ export declare const CS2_STREET_SPECIES: readonly ["NA_LondonPlaneTree01", "EU_AlderTree01"]; export declare const CS2_TREE_LOD_TARGETS: readonly Csm2LodTarget[]; /** The placements contract (scene perf P08): a tree's last LOD has at most this many triangles. */ export declare const CS2_TREE_LAST_LOD_MAX_TRIANGLES = 300; /** LOD targets for one tree mesh: the shared chain, with the last level's ratio cut so it lands under the P08 cap (aiming at 90 % of it, error * limits loosened because the distant impostor pages take over from there). A 19k-triangle birch otherwise stopped at 651. */ export declare function cs2TreeLodTargets(triangles: number): Csm2LodTarget[]; /** Screen height (px) above which each LOD draws; the last is 0 (the distant impostor pages take over by distance). */ export declare const CS2_TREE_LOD_PIXELS: readonly [200, 80, 0]; export declare const CS2_TREE_TEXTURE_EDGE = 1024; export declare const isCs2Bush: (species: string) => boolean; /** The species whose prototype draws `species` (itself, or the one it shares). */ export declare function cs2TreeShare(species: string): string; export declare function cs2TreePrototypeId(species: string): string; /** The static collider of a tree: a cylinder up the lower half of the trunk (at most 6 m), standing where the trunk meets the ground * (palms lean, so not always the origin), always inside the mesh bounds including the eight-sided cylinder the engine builds from it. */ export declare function trunkCollider(positions: ArrayLike, bounds: { min: number[]; max: number[]; }): { shape: 'cylinder'; center: [number, number, number]; radius: number; height: number; }; /** Marks the texels a set of triangles covers in UV space (the leaf cards of a tree sheet). `v` runs down the image, as glTF's does. */ export declare function rasterUvMask(uvs: Float32Array, indices: ArrayLike, start: number, count: number, width: number, height: number): Uint8Array; /** * The tinted sheet: leaf texels (in `leaf`) scaled so their mean lands on `look` (linear), each card keeping its own light and dark; every * other texel (bark) is the captured colour encoded to sRGB. `captured` is the capture's LINEAR RGBA. Alpha is untouched. */ export declare function tintTreeSheet(captured: Uint8Array, leaf: Uint8Array, look: readonly [number, number, number]): Uint8Array; export interface Cs2TreeCatalog { /** `catalog.json` (helix.placements-assets/1) beside its `models/` and `textures/`. */ catalog: string; /** Prototype id per species drawn (shared species included). */ prototypeOf: Record; prototypes: Array<{ id: string; species: string; heightM: number; triangles: number[]; textureBytes: number; }>; } /** True when the bundle carries the captured tree meshes and materials this needs. */ export declare function hasCs2TreeCapture(bundle: string): boolean; /** Builds the catalog for `species` (non-bush tree species of the capture). Every input is the capture's own. */ export declare function buildCs2TreeCatalog(bundle: string, out: string, species: readonly string[], log?: (line: string) => void): Promise; /** * What `buildVegetation` needs to draw a CS2 source's trees as their species: the catalog, the prototype per species, the sidewalk trees * (`CS2_STREET_SPECIES` where the capture has them) and the park and forest fill (the source's three commonest non-palm species). */ export declare function cs2TreeSpecies(source: { pois?: Array<{ kind: string; tags?: Record; }>; }, bundle: string, out: string, log?: (line: string) => void): Promise<{ catalog: string; prototypeOf: Record; street: string[]; fill: string[]; }>;