Skip to content

iliazeus/zmbx2gltf

Repository files navigation

zmbx2gltf

a tool and a library to convert MecaBricks .zmbx files to GlTF

Node.js usage

import { convertZmbxToGltf } from "zmbx2gltf";
import { readFile, writeFile } from "fs/promises";

async function main() {
  const inputFile = await readFile("input.zmbx");
  const gltf = await convertZmbxToGltf(inputFile);
  await writeFile("output.gltf", JSON.stringify(gltf));
}

CLI usage

zmbx2gltf <input.zmbx> <output.gltf>

Browser usage

Global Zmbx2Gltf.convertZmbxToGltf and Zmbx2Gltf.convertMbxToGltf functions.