0.2.5 • Published 1 year ago

@fanthstudios/three-mcmodel v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

three-mcmodel

A library for working with Minecraft json models using three.js.

🚧 Work in progress, not stable yet 🚧

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)