原因:加载进来的资源路径报错
加载进来的所有资源,最好放在/public/文件夹下,否则会报错
资源所在位置:
public/textures/hdr/skybox.hdr
// 加载hdr环境图
const rgbeLoader = new RGBELoader();
rgbeLoader.loadAsync("/textures/hdr/skybox.hdr").then((texture) => {
texture.mapping = THREE.EquirectangularReflectionMapping;
scene.background = texture;
scene.environment = texture;
});
最后
以上就是细心黑夜最近收集整理的关于Threejs报错:RGBELoader Bad File Format: bad initial token的全部内容,更多相关Threejs报错:RGBELoader内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复