mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-25 23:29:26 +00:00
add glbs
This commit is contained in:
parent
267db90813
commit
8509faf6bc
782 changed files with 165 additions and 21 deletions
17
scripts/convert.ts
Normal file
17
scripts/convert.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import fs from "node:fs/promises";
|
||||
import { execFileSync } from "node:child_process";
|
||||
|
||||
const blender = `/Applications/Blender.app/Contents/MacOS/Blender`;
|
||||
|
||||
async function run() {
|
||||
for await (const inFile of fs.glob("public/**/*.dif")) {
|
||||
const outFile = inFile.replace(/\.dif$/i, ".glb");
|
||||
execFileSync(
|
||||
blender,
|
||||
["-b", "-P", "scripts/dif2gltf.py", "--", inFile, outFile],
|
||||
{ stdio: "inherit" }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
Loading…
Add table
Add a link
Reference in a new issue