You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, December 23rd 2011, 8:31am

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

Friday, December 23rd 2011, 9:00am

Hi,

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

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

e.g.

Source code

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


best regards,
Klaus

3

Monday, December 26th 2011, 3:33am

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

Monday, December 26th 2011, 6:49am

Hi Klaus,

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


Source code

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.

Source code

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

Monday, December 26th 2011, 8:19pm

Maybe the missing ; in your action?

oninterrupt(custombreak(); );

6

Tuesday, December 27th 2011, 4:26am

Hi Jarredja,

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

Source code

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




still no idea why *confused*

hyung

7

Tuesday, December 27th 2011, 4:40am

Do you have an example?

8

Tuesday, December 27th 2011, 7:02am

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.


Source code

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

Beginner

Posts: 12

Location: Freiburg, Germany

Occupation: Designer, photographer

  • Send private message

9

Friday, July 6th 2012, 1:04pm

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:

Source code

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

Beginner

Posts: 12

Location: Freiburg, Germany

Occupation: Designer, photographer

  • Send private message

10

Monday, July 9th 2012, 10:25am

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

Monday, July 9th 2012, 11:36am

Hi,

here a quick try:

Source code

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

Beginner

Posts: 12

Location: Freiburg, Germany

Occupation: Designer, photographer

  • Send private message

12

Monday, July 9th 2012, 7:51pm

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

Beginner

Posts: 12

Location: Freiburg, Germany

Occupation: Designer, photographer

  • Send private message

13

Wednesday, July 11th 2012, 1:56pm

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