import type { Scene } from "@babylonjs/core/scene"; import type { ILogger } from "../Parser/ILogger"; import type { IPmxReaderConstructor } from "../Parser/IPmxReaderConstructor"; /** * BPMX converter */ export declare class BpmxConverter implements ILogger { /** * The threshold of material alpha to use transparency mode. (default: 195) * * lower value is more likely to use transparency mode. (0 - 255) */ alphaThreshold: number; /** * The threshold of transparency mode to use alpha blend. (default: 100) * * lower value is more likely to use alpha test mode. otherwise use alpha blemd mode */ alphaBlendThreshold: number; /** * Whether to use alpha evaluation (default: true) * * If true, evaluate the alpha of the texture to automatically determine the blending method of the material * * This automatic blend mode decision is not perfect and is quite costly * * For load time optimization, it is recommended to turn off this feature and set the blending mode for the material manually */ useAlphaEvaluation: boolean; /** * The canvas resolution to evaluate alpha (default: 512) * * Resolution of the render canvas used to evaluate alpha internally * * The higher the resolution, the higher the accuracy and the longer the load time */ alphaEvaluationResolution: number; private _loggingEnabled; /** @internal */ log: (message: string) => void; /** @internal */ warn: (message: string) => void; /** @internal */ error: (message: string) => void; /** * Create a BPMX converter */ constructor(); /** * Convert PMX to BPMX * @param scene Scene * @param reader PMX reader static class (PmxReader or PmdReader) * @param urlOrFileName if files is undefined, urlOrFileName is url of PMX file. if files is defined, urlOrFileName is file name of PMX file. * @param files Dependency files of PMX file (textures, sphere textures, toon textures) * @param overrideMaterialTransparency Override alpha evaluation result function * @returns BPMX data as ArrayBuffer * @throws {Error} if PMX file not found */ convert(scene: Scene, reader: IPmxReaderConstructor, urlOrFileName: string, files?: File[], overrideMaterialTransparency?: (materialsName: readonly string[], textureAlphaEvaluateResults: number[]) => 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; }