Hi all!,
I’ll do my best to explain what my issue is here.
I am loading a 360 degree tour (Pano2VR) into a rectangle element’s innerHTML. This is working great! The only issue is when I leave the scene by clicking a button and going to the next scene, then return to the scene with the rectangle element my panorama tour appears black. The following code is run onSceneLoad .(the rectangle id is container) :
pano = new pano2vrPlayer("container");
window.addEventListener("load", function() {
pano.readConfigUrlAsync("pano.xml", function() {
gyro = new pano2vrGyro(pano, "container");
gyro.disable();
});
});
I think perhaps it is trying to load a second panorama container or something?
Also guestimating, as you’re already running this code in an “event” listener (On Scene Load) why not just get rid of the window.onload listener and run it like
pano = new pano2vrPlayer("container");
pano.readConfigUrlAsync("pano.xml", function() {
gyro = new pano2vrGyro(pano, "container");
gyro.disable();
});