如何在three.js中为加载的.obj显示或加载线框素材?
答案 0 :(得分:1)
// MTL SETUP
const mtlLoader = new MTLLoader(manager);
mtlLoader.setBaseUrl( '../../../../assets/3D_models/brain/' );
mtlLoader.setPath( '../../../../assets/3D_models/brain/' );
mtlLoader.load(this.brain_mtl_path, (materials) => {
console.log(materials);
// materials.preload();
// OBJ SETUP
const objLoader: any = new THREE.OBJLoader(manager);
objLoader.setMaterials( materials );
objLoader.load(this.brain_obj_path, (object) => {
console.log(object);
object.children[0].material.wireframe = true;