npm.io
0.2.1 • Published 7 years ago

three-mcmodel

Licence
MIT
Version
0.2.1
Deps
1
Size
63 kB
Vulns
1
Weekly
0
Stars
22

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'

new MinecraftModelLoader().load('model.json', mesh => {
  const textureLoader = new MinecraftTextureLoader()
  mesh.resolveTextures(path => textureLoader.load(`${path}.png`))
  scene.add(mesh)
})