@hbis/three-obj-mtl-loader
v1.1.0
Published
Threejs newest obj&mtl loader with npm dev
Downloads
5
Maintainers
Readme
three-obj-mtl-loader
THREE.OBJLoader repackaged as a node module
install
npm i --save @hbis/three-obj-mtl-loader
usage
import * as THREE from 'three'
import {MTLLoader, OBJLoader} from '@hbis/three-obj-mtl-loader'
let scene = new THREE.Scene()
let mtlLoader = new MTLLoader();
let objLoader = new OBJLoader();
mtlLoader.load('./test.mtl', (materials) => {
materials.preload()
objLoader.setMaterials(materials)
objLoader.load('./test.obj', (object) => {
scene.add(object)
})
})