import type { Vec3 } from './vehicleMath'; export declare const AVATAR_QA_THRESHOLDS: { /** Idle: lowest drawn vertex vs the character's ground plane (m). Soles of a planted avatar measure -0.02..+0.08. */ idleSoleMin: number; idleSoleMax: number; /** Walking: a stride lifts a foot, so the ceiling is looser; sinking is still sinking. */ walkSoleMin: number; walkSoleMax: number; /** The avatar must travel at least this far (m) under a held W for the locomotion check to be meaningful. */ walkTravelMin: number; /** Legs must swing at least this far apart front-to-back (m) at some sample while walking. */ strideMin: number; /** Drawn height vs the engine's declared body height. */ heightRatio: [number, number]; /** Toes must point within this angle of the engine's forward. */ facingMaxDeg: number; }; export interface Extent { min: Vec3; max: Vec3; size: Vec3; } /** Body-frame bounds of a flat [x,y,z,…] point list. */ export declare function extentOf(points: number[]): Extent | null; export declare function judgeGrounded(idleSole: number | null, walkSoles: number[]): { pass: boolean; detail: string; measured: Record; }; export interface WalkSample { pos: Vec3; footL: Vec3 | null; footR: Vec3 | null; handL: Vec3 | null; handR: Vec3 | null; } /** Did the avatar travel under held input and swing its legs in the body frame while it did? */ export declare function judgeLocomotion(start: Vec3, samples: WalkSample[]): { pass: boolean; measured: boolean; detail: string; data: Record; }; /** Toes (ball − foot, flattened) against the engine's forward (+Z in the body frame). */ export declare function judgeFacing(footL: Vec3 | null, ballL: Vec3 | null, footR: Vec3 | null, ballR: Vec3 | null): { pass: boolean; measured: boolean; detail: string; data: Record; }; export declare function judgeHeight(drawnHeight: number | null, declared: number | null): { pass: boolean; measured: boolean; detail: string; data: Record; }; /** One drawn primitive's material, as `__vqaAv.materials()` reports it. */ export interface MaterialRow { mesh: string; material: string | null; type?: string; tris: number; missing?: boolean; /** Map slot -> decoded (true) or bound but never decoded (false). Only slots the material samples are present. */ maps?: Record; /** max(emissive rgb) x emissiveIntensity. */ emissive?: number; color?: string | null; metalness?: number | null; unlit?: boolean; } export interface MaterialAudit { tris: number; rows: MaterialRow[]; } /** What the model file itself declares (read from the GLB the page fetched). */ export interface DeclaredMaterials { materials: number; baseColorTextured: number; emissiveTextured: number; } export declare const AVATAR_LOOK_THRESHOLDS: { /** A material emitting at least this much (0..1, x intensity) with no emissive map paints itself one flat colour. */ emissiveFlat: number; /** ... and covering more than this share of the drawn triangles washes the avatar out (Cream Hoodie Girl: 1.00). */ emissiveWashoutShare: number; /** Lit vs unlit-albedo pass of the same front view, over the avatar's own pixels (luma 0..255): * lit brighter than its albedo by more than this, while losing chroma or contrast, is a wash-out. Good avatars measure * -68..+20 (metal is darker lit than its albedo); Cream Hoodie Girl +54, the emissive fixture +99. */ washoutGainMin: number; chromaRetentionMin: number; contrastRetentionMin: number; /** An albedo with less chroma than this is grey by design: judge contrast only. */ albedoChromaMin: number; /** Lit near-black while the albedo is not (good minimum: Iron Man 18). */ blackoutLitMax: number; blackoutAlbedoMin: number; /** Lit flat (no shading or texture variation at all) while the albedo has detail. */ flatLitSdMax: number; flatAlbedoSdMin: number; /** Fewer avatar pixels than this in the front view = the mask pass failed; the colour check is not measured. */ maskMinPx: number; }; export declare function judgeMaterials(audit: MaterialAudit | null, declared: DeclaredMaterials | null, textureFailures: string[]): { pass: boolean; detail: string; measured: Record; }; export declare function judgeEmissive(audit: MaterialAudit | null): { pass: boolean; detail: string; measured: Record; }; /** Settle times (ms) of the successive mask captures: the re-shaded materials compile asynchronously, so a frame taken too early shows none of them. */ export declare const MASK_SETTLE_MS: number[]; /** Avatar pixels in a packed-RGB mask frame: the flat magenta the mask pass draws the avatar in. */ export declare function maskPixels(mask: Uint8Array): number; export interface ColourPassStats { px: number; mean: number; sd: number; chroma: number; } export interface ColourStats { maskPx: number; lit: ColourPassStats; albedo: ColourPassStats; corr: number | null; } /** Luma/chroma statistics of the lit and unlit-albedo renders over the pixels the magenta mask pass marks as avatar. * All three are packed RGB (3 bytes per pixel) of the same view and size. */ export declare function colourStats(lit: Uint8Array, albedo: Uint8Array, mask: Uint8Array): ColourStats; export declare function judgeColour(s: ColourStats | null): { pass: boolean; measured: boolean; detail: string; data: Record; }; /** Rig, judged on the held-W walk against Base Male / Base Female on the same locomotion clip. */ export declare const AVATAR_RIG_THRESHOLDS: { /** Max twist of a limb bone about its own axis away from its bind pose, deg, over the walk. Controls (Base Male / * Base Female): thigh 26, calf 13, foot 15, upper arm 28, forearm 8; worst good avatar: thigh 32, calf 21, foot 18, * upper arm 33, forearm 22. A bone whose rest roll disagrees with the clip measures 107..132 (fixtures). */ twistMaxDeg: Record; /** A knee (bent > 6 cm off the hip-ankle line) must not bend backwards: within this angle of the body's forward. * Humanoids measure <= 37; Unitree G1's offset robot knee reaches 62. A nearly straight leg (< 6 cm of bend) has no * meaningful direction (G1 read 96 deg at 3.8 cm), so it is not judged. */ kneeMaxDeg: number; kneeBendMinCm: number; /** Area share of skinned triangles collapsed (< 15 % of rest) or stretched (> 4x) at any walk sample. Good avatars * <= 0.0061, Cream Hoodie Girl's loose single-mesh clothing 0.010. */ skinCollapsedStretchedMax: number; /** Area share of triangles with an edge stretched > 3x its rest length (torn / candy-wrapper joints). Base Male * 0.0006, worst good avatar 0.0021, Cream Hoodie Girl 0.0080, bad-weights fixture 0.034. */ skinEdgeStretchedMax: number; }; export interface RigSample { twist: Record; knee: Record; } export interface SkinSample { median: number; collapsed: number; stretched: number; edgeStretched: number; } export declare function judgeRig(init: { limbs: number; names: string[]; } | null, samples: RigSample[]): { pass: boolean; detail: string; measured: Record; }; export declare function judgeSkin(samples: Array): { pass: boolean; detail: string; measured: Record; }; /** What a GLB declares about its materials, from its JSON chunk (no texture decoding). Null when it is not a GLB. */ export declare function declaredMaterials(glb: Uint8Array): DeclaredMaterials | null;