import type { CitySource } from '../source'; import { type MarginMesh } from './margin'; /** How far the surround reaches past each side: CS2's world map is 57,344 m square around the 14,336 m playable map. */ export declare const OUTER_LAND_M = 21504; /** How far inside the border the profile is read (metres): past CS2's edge rim, still the ground the border belongs to. */ export declare const OUTER_PROFILE_INSET_M: readonly [64, 96, 128, 160]; /** Beyond this distance from the border nothing lies within this many metres of the sea surface (it z-fought with the ocean from afar). */ export declare const OUTER_SEA_CLEARANCE_M = 1.5; export interface OuterLandOptions { /** Scene Y on the city's own ground at a plan point (clamped inside the bounds by the caller's sampler). */ coreHeightAt: (x: number, z: number) => number; /** Sea level in scene Y. */ seaLevelY: number; /** How far past each side (default `OUTER_LAND_M`). */ extentM?: number; /** * The scene's terrain material layer drawn for each of `OUTER_LAND_SPLAT_ROLES` (indices into the document's material layers). When * given, the mesh carries `_HELIX_SPLAT` weights for them and names them in its material's extras, and the engine (scene 0.3.76+) * draws the surround with the terrain material itself; COLOR_0 stays as the colour older engines draw. */ splatLayers?: readonly [number, number, number, number]; } /** The ground classes the surround is painted with, one per `_HELIX_SPLAT` channel: the city's natural grass, shore sand, rock, pavement (unused). */ export declare const OUTER_LAND_SPLAT_ROLES: readonly ["accent", "low", "slope", "base"]; /** * The surround's ground class weights at a point, the way the city's natural ground is painted (`paintNaturalGround` + the slope rule): * grass on land, rock by slope, sand on a coast's first metres and on the sea floor. Sums to 1. `coast` = a neighbour lies under the sea. */ export declare function outerLandSplat(above: number, slope: number, coast: boolean): [number, number, number, number]; export interface OuterLandField { extentM: number; /** Scene Y of the surround at a plan point outside the bounds (inside, the border's height at the nearest border point). */ heightAt(x: number, z: number): number; /** Set when `heightAt` is already the surface as drawn (the backdrop's triangles): the trees stand on it directly. */ drawn?: (x: number, z: number) => number; /** Set when impostor trees stand only this far past the border, thinning over the outer half (the backdrop; default `OUTER_TREE_REACH_M`). */ treeReachM?: number; } /** * The surround's height field. The border is read as one closed profile (every 32 m around the square, the highest ground within 8 m * of each post). A point past the border takes the profile around its nearest border point, averaged over a window that widens with * the distance (64 m at the border, 0.8 of the distance beyond, at most 6 km), so the border's shapes carry on and blur out as they * would on a real world map; land then gains relief (four octaves, 2.4 km to 300 m, growing over the first 1.2 km and with the * land's height), sea deepens, and past `CLEARANCE_FULL_M` no ground lies within `OUTER_SEA_CLEARANCE_M` of the sea surface. */ export declare function outerLandField(source: CitySource, options: OuterLandOptions): OuterLandField; /** Lattice coordinates along one axis: 64 m across the bounds, then cells growing outwards on both sides to `extentM`. */ export declare function outerLandAxis(b0: number, b1: number, extentM: number): number[]; /** * The surround as one mesh (see the file comment). Colours are the `natural` ground of the city's own splat: grass, darker grass in * broad patches (the terrain material's macro variation reads as those from the air), rock on slopes, shore sand only in the first * metres above the sea, and the sea floor below it. */ export declare function buildOuterLandMesh(source: CitySource, options: OuterLandOptions): Promise;