Sie sind nicht angemeldet.

1

Donnerstag, 21. Mai 2015, 10:47

Problem with determining the click location in object pano

Hello,
We are using object movie in our pano , similar to this example: http://krpano.com/objects/oldslr/
We need to determine when a user clicks the pano the actual pixel location of the click in the original image pixel coordinates.
We have tried several options but to no avail... using screentolayer with image.layer , or the view.fov to calculate the current scale of the image layer did not work for us.

Is there a way of finding out the user click location on the image in multiframe pano?
Any help will be appreciated.

2

Dienstag, 26. Mai 2015, 21:43

Hi,

e.g.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<events onclick="test();" />

<action name="test">
  screentosphere(mouse.x, mouse.y, h, v);
  mul(hhfov, image.hfov, 0.5);
  mul(hvfov, image.vfov, 0.5);
  add(h, hhfov);
  add(v, hvfov);
  div(h, image.hfov);
  div(v, image.vfov);
  sub(lastlevel, image.level.count, 1);
  mul(h, image.level[get(lastlevel)].tiledimagewidth);
  mul(v, image.level[get(lastlevel)].tiledimageheight);
  roundval(h);
  roundval(v);
  showlog();
  trace('pix=',h,'/',v);
</action>


Best regards,
Klaus

Ähnliche Themen