i want set scene enviroment use hdr file but hdr file load only RGBELoader
if i use RGBELoader data type is Uint16Array but i want change data type is img cause i want use url data
so i try hdr file load use TextureLoader but it not work
how can i change data type is img or use TextureLoader when i load hdr file
const loader = new RGBELoader();
loader.setDataType(THREE.HalfFloatType);
const textureLoader = new THREE.TextureLoader();
loader.load(
"https://locall.hdr",
(hdrTexture) => {
console.log(hdrTexture);
textureLoader.load(hdrTexture.source.data, (texture) => {
copyScene.environment = texture;
console.log(texture);
});
},
(xhr) => {
console.log((xhr.loaded / xhr.total) * 100 + "% loaded");
},
(error) => {
console.error("Error loading HDR texture", error);
}
);
thank you and have a nice day