import type { HelixSceneV2 } from '@hypersoniclabs/helix-manifest'; export interface TerrainNormalCutReport { uri: string; levels: number; from: [number, number]; to: [number, number]; before: number; after: number; } export interface TerrainNormalCutPlan { /** Files to write into the cloned root, keyed by their uri inside it. Empty when nothing was cut. */ files: Map; report: TerrainNormalCutReport | null; } /** The smallest edge a cut may leave, px (the 529-sample coarse height grid is the floor this map should not drop under by much). */ export declare const TERRAIN_NORMAL_MIN_EDGE = 512; /** Decodes an 8-bit RGB, non-interlaced PNG (any row filter): what the normal-map baker writes. */ export declare function decodeRgb8Png(png: Uint8Array): { width: number; height: number; rgb: Uint8Array; }; /** Decodes an 8-bit RGB or RGBA, non-interlaced PNG (any row filter). */ export declare function decodePng8(png: Uint8Array): { width: number; height: number; channels: 3 | 4; pixels: Uint8Array; }; /** * One halving of a world-space normal map: each output pixel is the mean of the 2 x 2 block's decoded unit vectors, re-normalised, re-encoded * (`round((n * 0.5 + 0.5) * 255)`). A block that cancels out (a zero mean) falls back to straight up. */ export declare function halveNormalPixels(rgb: Uint8Array, width: number, height: number): { width: number; height: number; rgb: Uint8Array; }; /** * Halves the coarse normal map the document `base` declares (`terrain.coarse.normals`), reading the landscape package at `landDir`. Mutates the * resource (new bytes, new sha256, the `terrain:` asset id that carries it); the caller seals the document and writes `files` into the cloned * root. A map that is not what the document says, not an RGB8 PNG, or would drop under {@link TERRAIN_NORMAL_MIN_EDGE} px is left as it is. */ export declare function planTerrainNormalCut(base: HelixSceneV2, landDir: string, levels: number): TerrainNormalCutPlan;