UNPKG

809 BTypeScriptView Raw
1import { BlockModel, Resource } from "@xmcl/resourcepack";
2import { ResourceManager } from "./index";
3/**
4 * The model loader load the resource
5 */
6export declare class ModelLoader {
7 readonly manager: ResourceManager;
8 static findRealTexturePath(model: BlockModel.Resolved, variantKey: string): string | undefined;
9 /**
10 * All required texture raw resources
11 */
12 readonly textures: Record<string, Resource>;
13 /**
14 * All the resolved model
15 */
16 readonly models: Record<string, BlockModel.Resolved>;
17 /**
18 * @param manager The resource manager
19 */
20 constructor(manager: ResourceManager);
21 /**
22 * Load a model by search its parent. It will throw an error if the model is not found.
23 */
24 loadModel(modelPath: string): Promise<BlockModel.Resolved>;
25}