import { type Nullable } from "@babylonjs/core/types.js"; import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial.js"; import { type Scene } from "@babylonjs/core/scene.js"; import { type AssetContainer } from "@babylonjs/core/assetContainer.js"; /** * Class reading and parsing the MTL file bundled with the obj file. */ export declare class MTLFileLoader { /** * Invert Y-Axis of referenced textures on load */ static INVERT_TEXTURE_Y: boolean; /** * All material loaded from the mtl will be set here */ materials: StandardMaterial[]; /** * This function will read the mtl file and create each material described inside * This function could be improve by adding : * -some component missing (Ni, Tf...) * -including the specific options available * * @param scene defines the scene the material will be created in * @param data defines the mtl data to parse * @param rootUrl defines the rooturl to use in order to load relative dependencies * @param assetContainer defines the asset container to store the material in (can be null) * @param invertTextureY defines whether referenced textures are inverted on the Y axis * @param materialNames defines which materials to load, or all materials if omitted * @param trackTextureLoading collects texture loading promises and starts delayed textures when true; defaults to false * @returns the texture loading promises, or an empty array when trackTextureLoading is false */ parseMTL(scene: Scene, data: string | ArrayBuffer, rootUrl: string, assetContainer: Nullable, invertTextureY?: boolean, materialNames?: ReadonlySet, trackTextureLoading?: boolean): Promise[]; /** * Gets the texture for the material. * * If the material is imported from input file, * We sanitize the url to ensure it takes the texture from aside the material. * * @param rootUrl The root url to load from * @param value The value stored in the mtl * @param scene * @param assetContainer The asset container to store the texture in * @param invertTextureY Whether to invert the texture on the Y axis * @param textureLoadPromises The promises to wait for when loading asynchronously * @returns The Texture */ private static _GetTexture; }