app端cubeTextureLoader加载本地图片失败,h5正常
报错详情:
loader onError:, /static/test_r.jpg at utils/index.js:27 at app-view.js:586
export function cubeTextureLoader(path, array) {
return new Promise((resolve, reject) => {
let loader = new THREE.CubeTextureLoader();
loader.setPath(path);
loader.load(array, res => {
console.log("loader.load",res)
resolve(res);
});
// 这里报错!!!!!!!!!!!!!!!!!,但是H5是正常的
loader.manager.onError = function(res) {
console.error('loader onError:', res)
reject(res);
}
})
}
0 个回复