This is a THREEjs Virtual Tours Engine that uses scene.background to switch equirectangular image by fading out the THREEjs render canvas to white so that loading of the next image is not seen, when the texture loader THREE.TextureLoader() completes the THREEjs render canvas is then fade in to show the scene rendering.
You need to make the transition seamless and instant to have appeal. Those white whole-screen-flashes and lags are annoying.
In the first case (real life env) pre-loading a bunch of nearby hotspots at lower-res to make the transition instant, and load the high-res version after the user has clicked to one spot would be a better user-experience.
In the second case (virtual env), you don’t need 360 textures, you can run it in 3D if you optimize enough the code eg using instances, etc.