import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { createThreeCompatFileLoaderDiagnostic } from "./LoaderDiagnostics.js";
export class MTLLoaderThreeCompat {
    load(uri) {
        const text = readFileSync(resolve(uri), "utf8");
        return {
            uri,
            materials: text.split("\n").filter((line) => line.startsWith("newmtl ")).map((line) => line.slice("newmtl ".length).trim()),
            diagnostic: createThreeCompatFileLoaderDiagnostic("MTLLoaderThreeCompat", uri)
        };
    }
}
//# sourceMappingURL=MTLLoader.js.map