Sie sind nicht angemeldet.

21

Mittwoch, 25. Mai 2011, 16:00

Try this in the non limited view scenes.

<events onloadcomplete="set(events.onviewchange,null);" />

22

Mittwoch, 25. Mai 2011, 17:20

Hi,

the 1.0.8.14 supports 'named' event tags,
see here:
http://krpano.com/download/beta/#2011-04-04

this allows to create several event tags,
and without keep="true" that event will be automatically removed when loading the next pano,

e.g. with the latest 1.0.8.14 you could do that inside a <scene> or pano to limit the view the simple way between 0 and 90:

Quellcode

1
<events name="hlookatlimits" onviewchange="math.max(view.hlookat,view.hlookat,0); math.min(view.hlookat,view.hlookat,90);" />


best regards,
Klaus

23

Mittwoch, 25. Mai 2011, 21:02

Can you give a snippet of code that shows multiple event tags as well as including an event that we are already accustomed to?

Thanks,

Jarred

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

24

Mittwoch, 25. Mai 2011, 21:53

Should this snippet have worked as is placed into a scene?
It did not work for me. Verified using the latest swf.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

25

Mittwoch, 25. Mai 2011, 21:56

It didn't work for me either. I figured I had done something wrong but I know I am using the latest swf and js from 5-20-11. I was hoping an example would set me straight.

26

Mittwoch, 25. Mai 2011, 22:05

Hi,
Should this snippet have worked as is placed into a scene?
It did not work for me. Verified using the latest swf.
e.g.

Quellcode

1
2
3
<events onxmlcomplete="trace(global onxmlcomplete event);" />
<events name="test1" onxmlcomplete="trace(test1 onxmlcomplete event);" />
<events name="test2" onxmlcomplete="trace(test2 onxmlcomplete event);" />

and note - the 'named' events - that means <event> tags with a name, have also a "keep" flag,
and they will be removed when loading the next pano when keep was not set to true,

It didn't work for me either. I figured I had done something wrong but I know I am using the latest swf and js from 5-20-11. I was hoping an example would set me straight.
I have checked my code again and found a small bug in the Flash version regarding the "onviewchange" event,
I'm still checking if the global "event.onviewchange" was set before dispatching the "onviewchange" event to all other events tags...
this bug will be fixed in the next release,

in meantime it would be nesecery to write the code like this (just set the global onviewchange to anything, e.g. a empty string) to get the onviewchange event working also the 'named' event tags:

Quellcode

1
2
<events onviewchange="" />
<events name="hlookatlimits" onviewchange="math.max(view.hlookat,view.hlookat,0); math.min(view.hlookat,view.hlookat,90);" />


best regards,
Klaus

27

Donnerstag, 26. Mai 2011, 10:14

Thanks for the reply, Klaus!
And sorry if this is a dumb question, because I´m still at the beginning of programming, but how differs your code from
<events onviewchange="set(view.hlookat,0)"/> ?
I mean, your code works just as fine, but sadly it´s just as slow on iDevices as the one-liner *sad* And the view is´nt really locked to 0, because it´s still possible to move beyond +-0, it just flips back to 0 if the mouse button (or finger) is released.

I tried to lock instead the mouse.x-value this way:
<action name="ml">
set(mpos,mouse.x);
sub(movex,mpos,mpos);
set(mouse.x,get(movex));
</action>

But that´s not working either.

And may I repeat my question from the other thread and ask if we can expect the hlookatmin/max-tags for idevices somewhere in the near future - maybe with the public release of 1.0.8.14?

Best regards,
Nupsi

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

28

Donnerstag, 26. Mai 2011, 11:33

How come you talk about flip back to 0.
What device are you using?

The first code suggested by VN2011 works fine on my iPad.
It does not flip back to zero.
http://www.panoramas.dk/2010/queen-margrethe-birthday.html

The limits for the flash are +95 -95

To get the same with the action I used this. As you can see I used the devices setting to restrict it for only HTML5 as the standard limits work fine for flash.

<events onviewchange="stop();"/>

<action devices="html5" name="stop">
IF(view.hlookat LT -40, set(view.hlookat, -40));
IF(view.hlookat GT 40, set(view.hlookat, 40));
</action>

Hans

29

Donnerstag, 26. Mai 2011, 12:31

Hey Hans,

I´m trying to lock the hlookat completly at 0° on iDevices, instead of limit the range from -x to +x. And when I use the "onviewchange"-method, the view is´nt really hardlocked to 0, like it would be using the hlookatmin/max-tags. And when you look up and down this way, the view kind of whobbles on the x-axis and can even be dragged far beyond 0 and jumps then back to 0 if you release mouse button/finger.

Oh...and I´m using the iPhone/iPad-Simulator from Klaus and the iPad1 and iPod touch (first gen.) for testing.

I hope you get what I mean, because my english is´nt the best, as you may noticed already ;-)

Best regards,
Nupsi

30

Donnerstag, 29. September 2011, 20:39

Hello everyone,

I'm trying to achieve a horizontal limit in my pano for iPad, and I tried your solution but somehow it makes little "jumps" because its checking every movement, is there a way to avoid those "jumps"? The client really doesn't like them and he can't make a 360 panorama and the deadline is very near.

this is what I'm doing:

Quellcode

1
2
3
4
5
6
    <events onviewchange="stop();"/>
    
    <action devices="html5" name="stop">
        IF(view.hlookat &gt; -40, set(view.hlookat, -40));
        IF(view.hlookat &lt; 40, set(view.hlookat, 40));
    </action>

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

31

Donnerstag, 29. September 2011, 23:08

Is it different from hanss version? I dont see any little jumps on his.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

32

Freitag, 30. September 2011, 19:04

no, its the same. Actually Hans pano also makes this little jumps when you try to keep rotating beyond the limit.

33

Dienstag, 31. Januar 2012, 18:17

As far as I can see this is still not as good as the Flash solution, since it pins the centre of the screen at the specified position. Depending of the zoom value the edge of the screen will either not reach the edge of the pano, or go beyond it. Using Flash and limitview="offrange" and hlookatmax="nnn" the edge of the screen is pinned at the edge of the pano.
Is there a better workaround, or can the Flash functionality be provided?
With thanks,
Tony.

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

34

Dienstag, 31. Januar 2012, 20:57

Well, you just half to calculate the range yourself.
Get the fov, divide by two and do your check to see if you're in or out of your viewing range and set your view accordingly.
Limits are going to be automatically supported in the next major krpano release however.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

35

Freitag, 3. Februar 2012, 18:45

Hello,
Yes, I worked that out and did it (for the horizontal axis), but:
1. It doesn't work for vertical fov, because there is no variable telling me that (or at least I cant find it), and
2. It doesn't give accurate results for both portrait and landscape views. One can tune to one or the other, but not both.
I am glad to hear that limits are coming - any idea of a date for that??
With thanks, Tony

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

36

Sonntag, 5. Februar 2012, 02:34

Just click the advanced for the documentation.
http://krpano.com/docu/xml/#view.vfov
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

37

Dienstag, 7. Februar 2012, 17:19

Ah! thanks.
I had not properly sorted out the distinction between the Read-Only attributes and the Read-Write one.
Regards, Tony