adiciona modelo real

This commit is contained in:
Rodrigo Bertoldo de Sousa Martins committed 2026-09-07 21:30:18 -03:00
1 parent 71d13753c9
commit 3a659a52c7
18 files changed
+612 -176

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { execFileSync } from "node:child_process";
import { existsSync, mkdirSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { SOURCES } from "./sources.mjs";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const RAW_DIR = path.resolve(__dirname, "../raw");
const CONVERTED_DIR = path.resolve(__dirname, "../converted");
mkdirSync(CONVERTED_DIR, { recursive: true });
for (const { fbx, key } of SOURCES) {
const inPath = path.join(RAW_DIR, fbx);
const outPath = path.join(CONVERTED_DIR, `${key}.glb`);
if (existsSync(outPath)) {
console.log(`✓ já convertido: ${fbx}`);
continue;
}
console.log(`⚙ convertendo ${fbx} → ${key}.glb ...`);
execFileSync("assimp", ["export", inPath, outPath, "-f", "glb2"], { stdio: "inherit" });
console.log(`✓ ${key}.glb gerado`);
}
console.log("Conversão FBX → glTF concluída.");