import { Document } from '@gltf-transform/core'; export interface BoneMap { name: string; version: string; comment?: string; /** source bone name -> helix-humanoid@1 bone name */ map: Record; /** source bones with no helix target, removed if they are childless leaves */ drop?: string[]; } export interface RetargetResult { /** source name -> helix name, for every joint actually renamed */ renamed: Record; /** source bones present in the rig but absent from the map (left untouched) */ unmapped: string[]; /** dropped leaf helper bones */ dropped: string[]; } export interface MapCoverage { /** number of skin joints found on the source rig (0 = not a skinned character at all) */ sourceJoints: number; /** map keys present on the source rig */ matched: string[]; /** canonical (helix) bone names the matched sources cover */ coveredTargets: Set; /** source joints in neither map nor drop (kept as-is by retargetSkeleton; deformation unverified) */ extra: string[]; /** true when the rig uses raw Mixamo download naming ('mixamorig:' prefixes) — the bundled map expects bare names */ mixamoPrefixed: boolean; } /** * Preflight for retarget/conform: how much of the source rig does a bone map actually cover? * Coverage is judged in CANONICAL terms (which helix bones receive a source match), so callers can * enforce the same requirements against any custom map, not just the bundled Meshy one. */ export declare function checkMapCoverage(document: Document, boneMap: BoneMap): MapCoverage; /** * Renames a source biped rig's joints to `helix-humanoid@1` bone names by an explicit map. * * This is the NAME half of the retarget (architecture §6.2): glTF animation channels target nodes * by INDEX, so a joint rename automatically re-homes every clip track and the skin's joint list — * the mesh's inverse bind matrices are untouched, so the body renders identically, now driven by * helix bone names. The REST-POSE correction half (aligning the source rest orientation to the * MetaHuman rest so the platform's own clips look right) is a separate stage; this alone is enough * to drive the rig with clips authored IN ITS OWN rest frame (its bundled walk). * * Drop-list leaves (Meshy's head_end/headfront helpers) are removed from the graph + skin + IBMs. */ export declare function retargetSkeleton(document: Document, boneMap: BoneMap): RetargetResult;