import { SLOT_BUDGETS_SOURCE, type CharacterAddOnBudget } from './slotBudgets.generated'; /** * SLOT-AWARE LOD BUDGETS for character add-ons. * * The server judges a new character add-on against a per-slot ceiling (`CHARACTER_ADD_ON_SLOT_TIERS`, * helix-backend-api) on triangles COMBINED across every LOD scene of the GLB, and on materials across the * document. Conform used to aim every add-on at one generic [10000, 5000, 1500] ladder (16,500 combined), * so a top (12,000), footwear (8,000), mask (6,000), neck (5,000) or socks (3,000) conformed cleanly and was * refused at publish ("Mesh has 16,498 triangles (limit 12,000)"). * * The numbers here are the SERVER's: `slotBudgets.generated.ts` is written by `scripts/sync-slot-budgets.mjs` * from the backend's own source, never copied by hand (`npm run check:slot-budgets` catches drift). */ export type { CharacterAddOnBudget } from './slotBudgets.generated'; export { SLOT_BUDGETS_SOURCE }; /** The generic ladder's shape: LOD1 is half of LOD0, LOD2 is 15% of it. Slot ladders keep this shape. */ export declare const DEFAULT_LOD_TRIS: readonly number[]; /** * Fraction of the slot's combined triangle ceiling the ladder aims at. Decimation lands near, not exactly * on, its target (meshopt stops when the next collapse would exceed the error budget), so aiming at the cap * itself would fail the gate by a handful of triangles; 5% headroom absorbs that. If a result still lands * over, `importCharacter` rescales the ladder and re-runs rather than shipping it. */ export declare const LOD_BUDGET_HEADROOM = 0.95; export interface ResolvedAddOnBudget extends CharacterAddOnBudget { slotType: string; /** True when the slot has its own tier; false when it falls back to the flat add-on ceiling. */ tiered: boolean; } /** The ceiling the server applies to a NEW character add-on in `slotType`. */ export declare function characterAddOnBudget(slotType: string): ResolvedAddOnBudget; /** * Per-LOD triangle targets for `slotType`: the generic ladder's shape, scaled so the levels together land * inside `LOD_BUDGET_HEADROOM` of the slot's combined ceiling — and never ABOVE the generic ladder, so an * untiered slot with a looser ceiling than the generic ladder (the flat 20,000) keeps today's targets. */ export declare function slotAwareLodTris(slotType: string, shape?: readonly number[]): number[];