HowTo Sync 2 Panoramas with GyroControl

Q&A about the latest versions
Post Reply
SebastianS
Posts: 68
Joined: Fri Jan 06, 2012 10:31 am
Location: Munich/Bavaria
Contact:

HowTo Sync 2 Panoramas with GyroControl

Post by SebastianS » Tue Jan 31, 2017 9:07 am

Servus,
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>
So please can anybody help me out getting this working?
The Example URL is: https://www.schmuttermaier.com/panoramen/test/2.html

Thanks in advantage!
Sebastian

SebastianS
Posts: 68
Joined: Fri Jan 06, 2012 10:31 am
Location: Munich/Bavaria
Contact:

Re: HowTo Sync 2 Panoramas with GyroControl

Post by SebastianS » Tue Jan 31, 2017 9:21 am

I found ist, was only an typo... grrr
Thread can be closed. Thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 16 guests