I wonder if there's a way to control main krpano viewer from krpano layer or how to one viewer can control another one?
I mean how to make sync example using 2 krpano layers and loading xml files to it?
I wonder if there's a way to control main krpano viewer from krpano layer or how to one viewer can control another one?
I mean how to make sync example using 2 krpano layers and loading xml files to it?
The example does exactly what you describe: see https://krpano.com/releases/1.20.…syncscreen.html
In the main html, just load 2 krpano xmls:
<div id="viewersDiv" style="position:absolute; left:0; top:0; width:100%; height:100%;">
<div id="krpanoLeftDiv" style="position:absolute; left:0%; top:0; width:50%; height:100%;"></div>
<div id="krpanoRightDiv" style="position:absolute; left:50%; top:0; width:50%; height:100%;"></div>
</div>
<script>
embedpano({html5:"only", basepath:"../../../", id:"krpanoLeftViewer", target:"krpanoLeftDiv", xml:"pano1.xml", vars:{syncside:"left",syncviewer:"krpanoRightViewer"}, passQueryParameters:true});
embedpano({html5:"only", basepath:"../../../", id:"krpanoRightViewer", target:"krpanoRightDiv", xml:"pano2.xml", vars:{syncside:"right",syncviewer:"krpanoLeftViewer"}, passQueryParameters:true});
</script>
replace pano1.xml and pano2.xml with your own files and you are good to go
If you want to study the examples more, you can view the sources on this page:
https://krpano.com/examples/?js
I know this example but it's quite old and not quite what I meant. But I more or less know how to do it.
I'm working on such an example, https://ai360.pl/projekty/sync4/ but I still need to refine it.
Thanks.
Hello!
This is a way that I use:
To comunicate from krpanoLayer to mainKrpano via javascript, what I do is:
in the main krpano, in a javascript function autorun="onstart":
and then in the krpano layer xml I can work with:
I'll try.
Thanks.
Don’t have an account yet? Register yourself now and be a part of our community!