Apply the scene environment, works!
new THREE.RGBELoader().load(_G.SCENES[_G.SID].hdr, ( texture )=>{
texture.mapping = THREE.EquirectangularReflectionMapping; //THREE.CubeReflectionMapping; //THREE.EquirectangularReflectionMapping;
this.hdr_map = texture;
this.scene.environment = this.hdr_map;
texture.dispose();
});
And trying to rotate it with dat gui has no effect:
this.gui_hdr_texture_rotation = f.add(this.settings, 'hdr_texture_rotation', 0, Math.PI*2, 0.001).name("hdr texture rotation").onChange((val)=>{
if('hdr' in _G.SCENES[_G.SID]){
_G.MYTHREE.scene.environment.rotation = val;
_G.MYTHREE.scene.environment.needsUpdate = true;
}
});
this.gui_hdr_texture_offset = f.add(this.settings, 'hdr_texture_offset', 0,1, 0.001).name("hdr texture offset").onChange((val)=>{
if('hdr' in _G.SCENES[_G.SID]){
_G.MYTHREE.scene.environment.offset.set(val,0)
_G.MYTHREE.scene.environment.needsUpdate = true;
}
});
Any idea why both rotation/offset has NO EFFECT?
Additionally, what is the relationship between RGBELoader and PMREMGenerator. Sometimes they are used together and other times not.