Sie sind nicht angemeldet.

1

Donnerstag, 26. März 2020, 13:21

Sync (Comparison) Plugin - Different Headings?

Hi,

I am using the sync plugin https://krpano.com/releases/1.20.5/viewe…syncscreen.html with the only difference being that the plugin is enabled after a button click to sync both viewers, so that the images can be manually aligned before syncing movement.

The issue I have is that the images are not necessarily in the exact same location with the same heading.

The first change I made was to the sync.xml where I disabled the mirroring of the fov between viewers:


// don't sync fov (zoom) level
// view1.fov = view2.fov;

This works great, but now the next issue is that I am trying to solve is the mirroring of the hlookat for each viewer. I can't comment it out as then I get no horizontal movement on the other viewer, but I can't seem to work out how to keep a constant offset either.

For example, viewer1 is facing east and viewer2 is facing north, I'd like to be able to move around each with a constant horizontal difference of 90 degrees.

I've tried different things but haven't gotten anything to work yet:



// don't want to simply copy hlookat but keep a constant offset between view1 and view2
// view1.hlookat = view2.hlookat;

var hlookatDiff = view2.hlookat - view1.hlookat;
view1.hlookat = hlookatDiff;


but I'm really just guessing trying to find a solution that works.

Appreciate any suggestions.

Cheers,
Martin

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »martincarlin87« (26. März 2020, 13:32)


2

Donnerstag, 26. März 2020, 20:41

Hi,

you could use the image.prealign setting:
https://krpano.com/docu/xml/#image.prealign

E.g. to rotate the pano image 90 degree in horizontal direction:

Quellcode

1
2
3
<image ... prealign="0|90|0">
  ...
</image>


Best regards,
Klaus

3

Freitag, 27. März 2020, 13:26

Thanks for the reply Klaus - much appreciated.

I couldn't get it to work using the prealign but I managed to get it working by doing this in my function that starts the sync:



panoLeft.set("horizontalOffset", panoLeft.get('view.hlookat') - panoRight.get('view.hlookat'));
panoRight.set("horizontalOffset", panoLeft.get('view.hlookat') - panoRight.get('view.hlookat'));


then in sync.xml


view1.hlookat = view2.hlookat - krpano.get('horizontalOffset');