import type { ISceneLoaderProgressEvent } from "@babylonjs/core/Loading/sceneLoader"; import type { IFileRequest } from "@babylonjs/core/Misc/fileRequest"; import type { WebRequest } from "@babylonjs/core/Misc/webRequest"; import type { Scene } from "@babylonjs/core/scene"; import { MmdAnimation } from "./Animation/mmdAnimation"; import type { VpdObject } from "./Parser/vpdObject"; /** * VpdLoader is a loader that loads MMD pose data in VPD format * * VPD format is a binary format for MMD animation data */ export declare class VpdLoader { private readonly _scene; private readonly _textDecoder; private _loggingEnabled; /** @internal */ log: (message: string) => void; /** @internal */ warn: (message: string) => void; /** @internal */ error: (message: string) => void; /** * Create a new VpdLoader * @param scene Scene for loading file */ constructor(scene: Scene); /** * Load MMD animation data from VPD object * @param name Animation name * @param vpdObject VPD object * @returns MMD animation data */ loadFromVpdObject(name: string, vpdObject: VpdObject): MmdAnimation; /** * Load MMD animation data from VPD array buffer * @param name Animation name * @param buffer VPD array buffer * @returns Animation data * @throws {LoadFileError} when validation fails */ loadFromBuffer(name: string, buffer: ArrayBuffer): MmdAnimation; /** * Load MMD animation data from VPD file or URL * @param name Animation name * @param fileOrUrl VPD file or URL * @param onLoad Callback function that is called when load is complete * @param onProgress Callback function that is called while loading * @param onError Callback function that is called when loading is failed * @returns File request */ load(name: string, fileOrUrl: File | string, onLoad: (animation: MmdAnimation) => void, onProgress?: (event: ISceneLoaderProgressEvent) => void, onError?: ((request?: WebRequest | undefined, exception?: Error | undefined) => void) | undefined): IFileRequest; /** * Load MMD animation data from VPD file or URL asynchronously * @param name Animation name * @param fileOrUrl VPD file or URL * @param onProgress Callback function that is called while loading */ loadAsync(name: string, fileOrUrl: File | string, onProgress?: (event: ISceneLoaderProgressEvent) => void): Promise; /** * Enable or disable debug logging (default: false) */ get loggingEnabled(): boolean; set loggingEnabled(value: boolean); private _logEnabled; private _logDisabled; private _warnEnabled; private _warnDisabled; private _errorEnabled; private _errorDisabled; }