import {
GLTFLoader
} from "three/examples/jsm/loaders/GLTFLoader.js"; // gltf加载器
initModel() {
let self = this;
var loader = new GLTFLoader();
loader.load("/static/obj/2.gltf", function(gltf) {
//创建纹理
self.scene.add(gltf.scene);
console.log(gltf)
}, function(xhr) {
let num = Math.floor(xhr.loaded / xhr.total * 100) / 100;
// NProgress.set(num)
console.log('加载完成的百分比'+(xhr.loaded/xhr.total*100)+'%');
});
},