i would like to display 2 Panos beside, both HTLM5. I found this:
https://ggnome.com/wiki/Synchronizing%20Panoramas
and so it was no Prob displaying two Panos beside and linking them. Now i would like to implement the Gyro Function, and i am getting lost.
The Code looks like this:
Code: Select all
<body>
<script type="text/javascript" src="pano2vr_player.js">
</script>
<script type="text/javascript" src="pano2vrgyro.js">
</script>
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:100%;">
<tr>
<td style="width:50%;height:100%;"><div id="container_left" style="width:100%;height:100%;"></div></td>
<td style="width:50%;height:100%;"><div id="container_right" style="width:100%;height:100%;"></div></td>
</tr>
</table>
<script type="text/javascript">
pano_left=new pano2vrPlayer("container_left");
[b] window.addEventListener("load", function() {
pano_left.readConfigUrlAsync("left.xml",function() { gyro=new pano2vrGyro(pano,"container_left");});[/b]
});
pano_right=new pano2vrPlayer("container_right");
pano_right.readConfigUrl("right.xml");
// syncronize both panoramas
function syncPanos() {
try {
pano_right.setPan(pano_left.getPan());
pano_right.setTilt(pano_left.getTilt());
pano_right.setFov(pano_left.getFov());
} catch(e) {}
}
setInterval ( "syncPanos()", 10 );
</script>
<noscript>
<p><b>Please enable Javascript!</b></p>
</noscript>
</body>
The Example URL is: https://www.schmuttermaier.com/panoramen/test/2.html
Thanks in advantage!
Sebastian