three-mcmodel
A library for working with Minecraft json models using three.js.
import { MinecraftModelLoader, MinecraftTextureLoader } from 'three-mcmodel'
const mesh = await new MinecraftModelLoader().loadAsync('/model.json');
const textureLoader = new MinecraftTextureLoader()
await mesh.resolveTextures(async function (path) {
return await textureLoader.loadAsync(`/${path}.png`);
})
scene.add(mesh)