import { Document } from '@gltf-transform/core'; export interface WeldedSimplifyResult { before: number; after: number; /** Fraction of output triangles whose three corners agreed on one source UV chart (1 = zero smear). */ uvCoherence: number; } export interface SeamAnalysis { verts: number; positions: number; charts: number; tris: number; /** True when the atlas is shredded into micro-charts (>= 1 chart per 50 tris). Attribute-preserving * simplify on such a mesh is both floored AND lumpy (only chart interiors may collapse) — route it * through weldedSimplify + unwrap + bake instead. */ microChartAtlas: boolean; } /** Measures how seam-shredded a mesh is: index-connectivity islands ARE the atlas charts. */ export declare function analyzeSeams(document: Document): SeamAnalysis; /** * Seam-breaking simplification for baked-atlas IMPORTS (Meshy-class meshes). Their auto-unwrap shreds * the atlas into micro-charts (~7 tris each on the reference warrior), splitting every border vertex; * meshopt preserves attribute seams, so attribute-aware simplify floors at the chart-border ring * (~34% of source) regardless of error budget. This stage welds vertices by exact position (the * position-level surface is a clean manifold that simplifies to any target), then repairs attributes: * each output corner is re-pointed at a REAL original vertex — per triangle, the UV chart shared by * the most corners wins, so triangles that survived inside one chart keep pristine UVs and only * chart-spanning triangles smear. Normals are recomputed smooth (source normals are per-copy shreds); * every other attribute (JOINTS/WEIGHTS/...) rides along with the chosen copy, so skinning survives. * NEVER use on first-party identity-texture bodies — this trades UV fidelity for triangle count. */ export declare function weldedSimplify(document: Document, targetTris: number, errorCap?: number): Promise;