/** * SkeletonStandardRegistry.ts * * Explicit profile registry for all humanoid skeleton standards supported * by HoloScript. Each profile formalises the implicit bone-name map that * previously lived scattered across HumanoidSkeleton.ts, HumanoidLoader.ts, * and MixamoRetargeter.ts into a single, queryable, versioned record. * * Gap addressed: G1 from research/2026-04-28_holo-skeleton-gap.md * * Design: * - CANONICAL = HoloScript's own 65-bone HumanoidBoneName set * - Each profile maps CANONICAL names → platform-specific names (partial) * - mappingConfidence reflects how complete / battle-tested the mapping is * - Profiles are immutable objects; the registry is a plain Record * * Usage: * import { SKELETON_PROFILES, resolveProfileBone, matchSkeletonStandard } * from '@holoscript/engine/character/SkeletonStandardRegistry'; * * @module character * @see HumanoidSkeleton.ts for bone name definitions */ import type { HumanoidBoneName } from './HumanoidSkeleton'; export type SkeletonStandardId = 'vrm1' | 'vrm0' | 'rpm' | 'mixamo' | 'ue_mannequin' | 'metahuman' | 'daz_genesis8' | 'daz_genesis9' | 'autorig_pro' | 'cc3' | 'holoscript_65'; export interface SkeletonBoneEntry { /** Platform-specific bone name for this canonical bone. */ platformName: string; /** * Optional human-readable note (e.g. version difference, known quirk). */ note?: string; } export interface SkeletonStandardProfile { /** Stable identifier used in AssetMetadata.skeletonStandard. */ id: SkeletonStandardId; /** Human-readable display name. */ displayName: string; /** * Semantic version of this profile definition. Increment minor on mapping * additions, major on breaking renames. */ version: string; /** * Mapping confidence: 0.0–1.0. * 1.0 = spec-derived, fully round-tripped with real assets * 0.8 = community-confirmed, mostly complete * 0.6 = partially mapped or reverse-engineered */ mappingConfidence: number; /** * Subset of HumanoidBoneNames mapped to this standard's platform names. * Partial — not every canonical bone needs a counterpart. */ boneMap: Partial>; /** * Bones that exist in this standard but have no canonical equivalent. * Informational only; retargeting skips them. */ unmappedPlatformBones?: string[]; /** URL to the authoritative specification, if public. */ specUrl?: string; } export declare const SKELETON_PROFILES: Record; /** * Resolve the platform-specific bone name for a canonical bone in a given * skeleton standard. Returns `undefined` if the bone is unmapped. */ export declare function resolveProfileBone(standard: SkeletonStandardId, canonicalBone: HumanoidBoneName): string | undefined; /** * Build the reverse map: platform-specific name → canonical HumanoidBoneName. * Useful when ingesting an unknown rig and trying to identify its standard. */ export declare function buildReverseMap(standard: SkeletonStandardId): Map; /** * Candidate match result returned by `matchSkeletonStandard`. */ export interface SkeletonMatchCandidate { /** Profile that was tested. */ standard: SkeletonStandardId; /** 0.0–1.0: fraction of input bones that matched this profile's platform names. */ overlapScore: number; /** * Weighted score = overlapScore * mappingConfidence. * Use this for ranking; profiles with higher spec confidence rank above * equally-matching but under-documented ones. */ weightedScore: number; /** Bones in the input that matched this profile. */ matchedBones: string[]; /** Bones in the input that did NOT match. */ unmatchedBones: string[]; } /** * Given a list of bone names from an unknown rig, rank all registered * skeleton standards by how well they match. * * @param inputBones - Raw bone names from the rig (case-sensitive). * @param topN - Maximum number of candidates to return (default 5). */ export declare function matchSkeletonStandard(inputBones: string[], topN?: number): SkeletonMatchCandidate[]; /** * Validate that all required canonical bones are covered by a profile. * Returns a list of missing canonical bones (empty = fully covered). */ export declare function validateProfileCoverage(standard: SkeletonStandardId, requiredCanonicalBones: HumanoidBoneName[]): HumanoidBoneName[]; //# sourceMappingURL=SkeletonStandardRegistry.d.ts.map