/** * vue-vrm * * @description Vrm viewer component for Vue 3 / WebComponents. * @author Logue * @license MIT * @version 0.4.0 * @see {@link https://github.com/logue/vue-vrm} */ import { type VRMAnimation } from '@pixiv/three-vrm-animation'; import { AnimationMixer } from 'three'; import type { VRM } from '@pixiv/three-vrm'; /** Options for {@link createMixerWithClips}. */ export type MixerOptions = { /** Whether the clips should loop forever (default: `true`). */ loop?: boolean; }; /** * Load a single VRMA animation from an ArrayBuffer. * Validates the GLB binary first, then parses with three-vrm-animation. * * @param buffer The GLB file as an ArrayBuffer. * @returns The first VRMAnimation contained in the file. * @throws If the buffer is not a valid VRMA GLB or if parsing fails. */ export declare function loadVRMAnimation(buffer: ArrayBuffer): Promise; /** * Create an AnimationMixer for `vrm.scene`, register all clips with the given * weights and start playing them. * * @example * // Two animations, weighted 70% and 30%. * createMixerWithClips(vrm, [anim1, anim2], [0.7, 0.3]); * // Three animations with equal weights (1/3 each). * createMixerWithClips(vrm, [anim1, anim2, anim3]); * * @param vrm The VRM instance to animate. * @param animations The VRMAnimation instances to create clips from. * @param weights Optional weights for each animation; defaults to an equal split. * @param options Playback options. * @returns The new AnimationMixer instance. * @throws If the weights sum exceeds 1.0. */ export declare function createMixerWithClips(vrm: VRM, animations: VRMAnimation[], weights?: number[], options?: MixerOptions): AnimationMixer; /** * Stop all actions of the given mixer and release its cached resources. * * @param mixer The AnimationMixer instance to dispose. */ export declare function disposeMixer(mixer: AnimationMixer): void;