import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { createThreeCompatFileLoaderDiagnostic } from "./LoaderDiagnostics.js";
export class OBJLoaderThreeCompat {
    load(uri) {
        const text = readFileSync(resolve(uri), "utf8");
        return {
            uri,
            vertices: text.split("\n").filter((line) => line.startsWith("v ")).length,
            faces: text.split("\n").filter((line) => line.startsWith("f ")).length,
            mtllibs: text.split("\n").filter((line) => line.startsWith("mtllib ")).map((line) => line.slice("mtllib ".length).trim()),
            diagnostic: createThreeCompatFileLoaderDiagnostic("OBJLoaderThreeCompat", uri)
        };
    }
}
//# sourceMappingURL=OBJLoader.js.map