import { readCs2MeshDirectory } from '../csm2'; import { type Cs2MaterialBundle } from '../materials'; import { PROP_KIT_ID, type PropRecipe } from '../props'; export declare const PROP_SCHEMA: "helix.street-prop/1"; /** The last LOD never exceeds this (the open-world perf rule P02/P08 ceiling for a distance level). */ export declare const PROP_LOD2_MAX_TRIANGLES = 300; /** No LOD exceeds this: the placements inventory refuses a prototype level over 50,000 triangles (a captured bridge pier is 106k). */ export declare const PROP_LOD_MAX_TRIANGLES = 50000; /** Longest texture edge per LOD. */ export declare const PROP_TEXTURE_EDGES: readonly [512, 256, 128]; /** The texture edge a recipe's level draws at: `PROP_TEXTURE_EDGES` stepped down by `textureStep`, the finest level raised by `lod0TextureEdge`. */ export declare function propTextureEdge(recipe: Pick, lod: number): number; export interface PropCollider { shape: 'box' | 'cylinder'; center: [number, number, number]; halfExtents?: [number, number, number]; radius?: number; height?: number; } export interface PropMeta { schema: typeof PROP_SCHEMA; kit: typeof PROP_KIT_ID; id: string; kind: string; title: string; tags: string[]; /** Metres, in the kit frame: x right, y up, front toward +Z, base at y 0. */ bounds: { min: [number, number, number]; max: [number, number, number]; }; heightM: number; collider: PropCollider | null; lods: Array<{ lod: number; triangles: number; primitives: number; bytes: number; sha256: string; textureEdge: number | null; }>; source: { game: 'Cities: Skylines II'; prefab: string; placements: number; bundle: string; }; /** Mesh point in the kit = rotate(yawDeg about +Y, original point) + pivotShift. */ transform: { yawDeg: number; pivotShift: [number, number, number]; }; materials: Array<{ id: string; colour: string; textured: boolean; }>; note?: string; } export interface PropBuildOptions { bundle: string; out: string; only?: string[]; placementCounts?: Map; log?: (line: string) => void; } export interface PropBuildResult { id: string; dir: string; meta: PropMeta; } /** * The game's paint maths on a captured colour map: encoded to sRGB, then `tintAlbedo` multiplies the control mask's red region by the * paint in linear light (green and blue regions keep their colour), so the body takes the paint and keeps its shading and panel lines * while glass, lamps, tyres and trim keep theirs. Both maps are read straight (a control mask's alpha is a payload) at the colour map's size. */ export declare function paintCaptured(linearRgba: Uint8Array, controlRgba: Uint8Array, paintHex: string): Uint8Array; /** Triangle targets of the three levels for a source mesh of `total` triangles: the source (capped), half of it, a distance shell. */ export declare function propLodTargets(total: number, lod0Share?: number): { lod0Target: number; lod1Target: number; lod2Target: number; }; export declare function buildProp(recipe: PropRecipe, options: PropBuildOptions, shared: { meshes: Awaited>; materials: Cs2MaterialBundle; materialsDir: string; }): Promise; export declare function buildPropKit(options: PropBuildOptions): Promise;