Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Freitag, 23. Dezember 2011, 08:31

How to keep plugins,hotspots clickable while running "moveto" action?

Hello,

I am not sure if this is discussed before.. Is there a way to keep plugins,
hotspots clickable while running "moveto" action? (or other similar actions?)

I have made an autotour function which keeps on moving from one panorama
to another and I wish to provide "stop autotour" button, which is clickable,
so the user can click this button during autotour.
At the moment I am using "oninterrupt" function so no problem stopping
autotour -> the user just click anywhere on the panorama and the autotour
stops. But I wish to provide "stop autotour" button which is clickable and
actually works when the user clicks on this button.

Pelase refer to this "autoDrive" button.
http://www.everyscape.com/eats/1729/chee…on-boston-02108

-> this button (and also other buttons) is clickable during autoDrive.

Any idea how to accomplish this with krpano api?

thank you in advance for your reply!

hyung

2

Freitag, 23. Dezember 2011, 09:00

Hi,

you can use the lookto() action instead, this action has an 'nonblocking' setting,

see:
http://krpano.com/docu/actions/#moveto

e.g.

Quellcode

1
lookto(..., ..., get(view.fov), smooth(), true, true);


best regards,
Klaus

3

Montag, 26. Dezember 2011, 03:33

Hi Klaus,

thanx for your answer. Didn't know that lookto() had this setting.
I will try it out right away!

Happy new year! *smile*

hyung

4

Montag, 26. Dezember 2011, 06:49

Hi Klaus,

I have testing the "lookto" action but I am having a problem. Please refer
to my following action:


Quellcode

1
			lookto( 0, 0, get(view.fov),smooth(320,-320,70),true,true,customAction() );	



while running "lookto" action, I wish to allow users to break the lookto action when clicking
anywhere on the panorama. (same as oninterrupt(break) action)

But this doesn't work as I have expected. When I run this code, the plugins/hotspots buttons
are clickable but I can't stop the lookto action. I have tried to put the oninterrupt action before
the lookto action but still the same. The oninterrupt action doesn't work at all in this case.

Quellcode

1
2
oninterrupt( customBreak() );
		lookto( 0, 0, get(view.fov),smooth(320,-320,70),true,true,customAction() );	



Can you help me with this Klaus? What I want to do is while running "lookto" action is
- keep the plugin/hotspot buttons clickable
- break the "lookto" action when the user clicks anywhere on the panorama
(same as "oninterrupt(break)" )

How do I accomplish this?

Best Regards,
hyung

5

Montag, 26. Dezember 2011, 20:19

Maybe the missing ; in your action?

oninterrupt(custombreak(); );

6

Dienstag, 27. Dezember 2011, 04:26

Hi Jarredja,

Both with ; and without ; do not work. Even the default break action doesn't
work with this code.

Quellcode

1
oninterrupt( break );lookto( 0, 0, get(view.fov),smooth(320,-320,70),true,true,customAction() );




still no idea why *confused*

hyung

7

Dienstag, 27. Dezember 2011, 04:40

Do you have an example?

8

Dienstag, 27. Dezember 2011, 07:02

yes I have an example.


http://115.68.23.139/biz/autoplay/
(You can download the source from here - http://115.68.23.139/biz/autoplay/autoplay.zip)

Please ignore the "autoplay" button (it's not working correctly at the moment)
If you unzip the zip file, go to xml -> web_thumb -> config.xml and refer to the

"loadTo" action.


Quellcode

1
			oninterrupt( js(alert('oninterrupt')) );		lookto(%2,%3,get(view.fov),smooth(320,-320,10),true,true,loadNewPano(%1,%4,%5));	



If you click the red arrow button, the panorama looks to ("lookto" action) the certain point.
And while moving to that point, the plugin/hotspot buttons are clickable but the oninterrupt
action is not called when I click on the panorama. (sometimes oninterrupt is called after
the new panorama is loaded)

The krpano version is the latest. (which I have downloaded two days ago)

Any idea?

hyung

panowerk

Anfänger

Beiträge: 12

Wohnort: Freiburg, Germany

Beruf: Designer, photographer

  • Nachricht senden

9

Freitag, 6. Juli 2012, 13:04

Making certain parts of a pano slightly "magnetic"

Hello,

Thanks in advance to anyone who responds.

What I'm looking to do is, when a user is panning and reaches a certain point (or more accurately is in a certain horizontal degree range) that the camera pans towards a point of interest.

The effect I'm looking for is that some spots are almost a little magnetic and are pulling the camera towards it when the user gets near it. I'd also like to have the user retain control during this process.

I think it can be done with an IF statement that calls a lookto with nonblocking set to true.

Like this:

Quellcode

1
2
3
4
<action name="magnet">
		  if(view.hlookat GT 35, if(view.hlookat LT 145, lookto(184,35,120,linear(20),true, true));
		  );
	</action>


Unfortunately, this doesn't seem to have any effect so I must be doing something wrong.

Any help with this would be greatly appreciated.

Thanks.

Roger

panowerk

Anfänger

Beiträge: 12

Wohnort: Freiburg, Germany

Beruf: Designer, photographer

  • Nachricht senden

10

Montag, 9. Juli 2012, 10:25

willing to pay for the solution: Making certain parts of a pano slightly "magnetic"

Hello all,

I'm assuming - and hoping - everyone was out enjoying the nice weather to much on the weekend to be doing any pano coding.

Unfortunately, I'm under a bit of a time constraint on figuring out this idea of slightly magnetic spots in a panorama. I'm not looking for someone to provide me a complete solution, just a bit of help down the right path.

Actually, I if someone does have a complete solution for me, I would be willing to pay a reasonable amount but I'm really looking to have this wrapped up in the next day or two.

I should also mention that I have mousefollow enabled but I'm not having success when I disable it either.

Thanks in advance to anyone who responds.

Roger

11

Montag, 9. Juli 2012, 11:36

Hi,

here a quick try:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<events onviewchange="magnetic(90, 0, 45, 0.025);" />

<action name="magnetic">
  sub(dh, view.hlookat, %1);
  sub(dv, view.vlookat, %2);
  Math.pow(dh, 2);
  Math.pow(dv, 2);
  add(dd, dh, dv);
  Math.pow(dd, 0.5);
  if(dd LT %3,
    add(factor, 1, %4);
    div(factor, 1, factor);
    sub(invfactor, 1, factor);
    mul(h1, view.hlookat, factor);
    mul(h2, %1, invfactor);
    mul(v1, view.vlookat, factor);
    mul(v2, %2, invfactor);
    add(view.hlookat, h1, h2);
    add(view.vlookat, v1, v2);
  );
</action>


Parameters of the magnetic actions - magnetic(90, 0, 45, 0.025):
1. Parameter - h position of the 'magnet'
2. Parameter - v position of the 'magnet'
3. Parameter - range of the magnet
4. Parameter - 'strongness' of the magnet

Best regards,
Klaus

panowerk

Anfänger

Beiträge: 12

Wohnort: Freiburg, Germany

Beruf: Designer, photographer

  • Nachricht senden

12

Montag, 9. Juli 2012, 19:51

Incredible. Thank you so much.

This is certainly not a solution that I would have been able to put together myself.

Thanks for your time and effort.

Roger

panowerk

Anfänger

Beiträge: 12

Wohnort: Freiburg, Germany

Beruf: Designer, photographer

  • Nachricht senden

13

Mittwoch, 11. Juli 2012, 13:56

Klaus' solution is really fantastic but I am still looking for some tweaks that I don't have the knowledge to do myself.

I am willing to pay a reasonable amount for the work. Time is a little bit limited so please let me know as soon as possible if someone is able to help me with this.

Thanks in advance for anyone's reply.

Roger