THREE.OBJLoader repackaged as a node module
npm i --save three-obj-mtl-loader
import * as THREE from 'three'
import {MTLLoader, OBJLoader} from '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)
})
})
Sorry guys! This repo will never be updated, please check the newest version of three.js