我有这样的代码
this.someTexture = new THREE.TextureLoader().load("somepath");
但我在每次渲染时都会遇到此错误:WebGL: INVALID_OPERATION: texImage3D: FLIP_Y or PREMULTIPLY_ALPHA is not allowed for uploading 3D textures
我尝试使用其他选项来加载图像,但这对我没有帮助。也许我做错了什么
constructor() {
this.redTexture = new THREE.TextureLoader().load("somepath");
}
init() {
this.scene.someMaterials.red = new THREE.MeshBasicMaterial({
map: this.redTexture,
transparent: true,
});
}