import type { Document } from '@gltf-transform/core'; export declare const FACE_CONTRACT: "helix/avatar-face@1"; export declare const FACE_SEMANTICS: readonly ["viseme.sil", "viseme.pp", "viseme.ff", "viseme.th", "viseme.dd", "viseme.kk", "viseme.ch", "viseme.ss", "viseme.nn", "viseme.rr", "viseme.aa", "viseme.e", "viseme.i", "viseme.o", "viseme.u", "vowel.aa", "vowel.ih", "vowel.ou", "vowel.ee", "vowel.oh", "jawOpen", "blink.left", "blink.right", "gaze.left", "gaze.right", "gaze.up", "gaze.down"]; export type FaceSemantic = typeof FACE_SEMANTICS[number]; export interface FaceMorphTarget { kind: 'morph'; name: string; mesh?: string; scale?: number; } export interface FaceBoneTarget { kind: 'bone'; name: string; axis: 'x' | 'y' | 'z'; maxDegrees: number; } export type FaceTarget = FaceMorphTarget | FaceBoneTarget; /** * EXPRESSIONS — the same mesh and the same morphs as `channels`, and a different driver. Mirrors the * runtime's `core/face/FaceContract.ts`; the long note on why they are a separate FIELD lives there. * * The id vocabulary is CLOSED and it is VRM 1.0's, which is VRM 0.x's under older names (joy/sorrow/fun * became happy/sad/relaxed). Closed means the UI owns the label, so no display string ever arrives from a * downloaded asset, and the count is bounded by construction. */ export declare const EXPRESSION_IDS: readonly ["happy", "angry", "sad", "relaxed", "surprised", "neutral"]; export type ExpressionId = typeof EXPRESSION_IDS[number]; export interface AvatarFaceManifestV1 { contract: typeof FACE_CONTRACT; channels: Partial>; /** Absent on an avatar that declares none, which is most of them. Never an empty object. */ expressions?: Partial>; lod: { fullMinPixels: number; jawMinPixels: number; }; } /** Strict, bounded parser for creator-supplied face maps. Unknown fields fail closed. */ export declare function parseFaceManifest(value: unknown): AvatarFaceManifestV1; export declare function readFaceManifest(path: string): AvatarFaceManifestV1; /** Conservative name detection. Ambiguous aliases are not guessed; creators can pass --face-map. */ export declare function detectFaceManifest(document: Document): AvatarFaceManifestV1; /** Prove every declared target exists, then embed the same immutable contract on every LOD scene. */ export declare function attachFaceManifest(document: Document, manifest: AvatarFaceManifestV1): void; /** * Embed the additive face block beside the manifest. Proves every bound morph exists and every eye bone is a * node first, for the same reason `attachFaceManifest` does: a face that silently does not move is the quiet * failure this pipeline keeps choosing to make loud. */ export declare function attachFaceExt(document: Document, ext: { expressions: Array<{ name: string; binds: Array<{ morph: string; }>; }>; lookAt?: { left?: string; right?: string; }; }): void; /** * Drop morph deltas the Face V1 manifest cannot drive. MetaHuman legacy heads can carry 800+ blend * shapes (~20 MB at source); the web runtime only needs the declared jaw/blink/viseme subset. */ export declare function pruneUnusedFaceMorphTargets(document: Document, manifest: AvatarFaceManifestV1, /** Morphs the additive `helixFaceExt` block binds; they are as load-bearing as the manifest's own. */ alsoKeep?: Iterable): { removed: number; kept: string[]; }; export declare function faceCapability(manifest: AvatarFaceManifestV1): 'viseme15' | 'vowel5' | 'jaw' | 'none';