switching_model(category, path) {
const loader = new FBXLoader();
let that = this
loader.load(path, function(fbx) {
let newClothesModel = fbx.scene;
let newfbx = fbx.children.find(child => child.name === category)
newfbx.position.set(newfbx.position.x, newfbx.position.y, newfbx.position.z)
that.model.remove(that.model.children.find(child => child.name === category));
that.model.add(newfbx);
});
},
categoty参数是衣服的名字,比如上衣,裤子,path是衣服模型文件的地址