valaxy-addon-live2d
Version:
<a href="https://www.npmjs.com/package/valaxy-addon-live2d" rel="nofollow"><img src="https://img.shields.io/npm/v/valaxy-addon-live2d?color=0078E7" alt="NPM version"></a>
21 lines (20 loc) • 760 B
TypeScript
import type { ModelSettings } from 'pixi-live2d-display';
import { EventEmitter } from '@pixi/utils';
import { Live2DModel } from './Live2DModel';
import { ModelLoadingState } from './ModelLoadingState';
export declare class ModelEntity extends EventEmitter {
live2dModel?: Live2DModel;
source: string | object | undefined;
loadingState: ModelLoadingState;
name: string;
aspectRatio: number;
loadPromise: Promise<void>;
constructor(source: string | ModelSettings);
loadModel(source: string | ModelSettings): Promise<void>;
/**
* 当Live2D模型加载完成时调用的方法
* @param {Live2DModel} live2dModel - 加载的Live2D模型
*/
modelLoaded(live2dModel: Live2DModel): void;
destroy(): void;
}