oopanda-three-obj-mtl-loader
v1.0.1
Published
Threejs newest obj&mtl loader with npm dev
Downloads
6
Maintainers
Readme
obj-mtl-loader-three
THREE.OBJLoader repackaged as a node module Threejs newest obj&mtl loader with npm dev
install
npm i --save oopanda-three-obj-mtl-loader
usage
import * as THREE from 'three'
import {MTLLoader, OBJLoader} from 'oopanda-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)
})
})