You are not logged in.

1

Tuesday, January 3rd 2012, 8:59pm

Synchronizing 2 mirror panoramas

I'm trying to do something close to the synchronization (http://krpano.com/examples/108b9/examples/javascript-interface/js-sync/syncscreen.html) but that both panoramas move as in a mirror.
The idea is that the source images would be mirror, and I want to move in an inverted way, as in a mirror, ie when the right one moves to the left, the left one moves to the right. Thus, in the contact zone of both scenarios would see the same thing.
I hope I have explained. Could anyone help me?

gkaefer

Trainee

Posts: 46

Location: Salzburg

  • Send private message

2

Wednesday, January 4th 2012, 4:22am

I did download the krpano package where the examples are included.
I took the splitscreen example

http://krpano.com/examples/108b9/example…plitscreen.html

and editing the splitscreen.html file on exact 2 line I could produce the effect you described:

Quoted

function sync_1to2()
{
var krpano1 = document.getElementById("krpanoSWFObject1");
var krpano2 = document.getElementById("krpanoSWFObject2");

krpano2.set("syncother", false);
krpano2.set("view.hlookat", 360 - krpano1.get("view.hlookat"));
krpano2.set("view.vlookat", krpano1.get("view.vlookat"));
krpano2.set("view.fov", krpano1.get("view.fov"));
}

function sync_2to1()
{
var krpano1 = document.getElementById("krpanoSWFObject1");
var krpano2 = document.getElementById("krpanoSWFObject2");

krpano1.set("syncother", false);
krpano1.set("view.hlookat", 360 - krpano2.get("view.hlookat"));
krpano1.set("view.vlookat", krpano2.get("view.vlookat"));
krpano1.set("view.fov", krpano2.get("view.fov"));
}



I just added the "360 -" on the view.hlookat lines...

its not perfect, but I think a first step in your direction....
Liebe Gruesse,
Georg

3

Wednesday, January 4th 2012, 2:30pm

Thanks!!

Georg, it works great and is really simple!

Thank you very much