You are not logged in.

1

Monday, June 27th 2016, 9:52pm

Autotour to multiple hotspots via javascript

Hello krpano enthusiasts.

I'm asking a question that is already asked and apparently solved but it doesn't seem to work for me. I want to create an autotour via javascript, which visits two hotspots.

So, I have created an action as follows


Source code

1
2
<action name="autotour">	 looktohotspot(Hotspot1,,smooth(20,20,20));tween(hotspot[Hotspot1].alpha,'1.0', 3)
		looktohotspot(Hotspot2,,smooth(20,20,20));tween(hotspot[Hotspot2].alpha,'1.0', 3)</action>



and then, via javascript I call krpano.call( "autotour()" );


The effect that I obtain is that the view goes to Hotspot1 but then it stops, and thus it does not go forward to Hotspot2. And I'm stucked.

Any help appreciated!

Mudin

Beginner

Posts: 27

Location: South Korea

Occupation: VR Developer

  • Send private message

2

Monday, July 4th 2016, 6:26am

hello!

I used the same thing! But I also need better solution.

My solution is:

Quoted


lookto(get(hotspot[h54].ath),get(hotspot[h54].atv),,smooth(20,20,20),true,true,
tween(hotspot[h54].alpha,'1.0', 3); lookto(get(hotspot[h52].ath),get(hotspot[h52].atv),,smooth(20,20,20));tween(hotspot[h52].alpha,'1.0', 3));
lookto has donecall, but looktohotsot does not.

it is working for me.

Hope it helps!

3

Monday, July 4th 2016, 12:32pm

Thank you very much, it works!

I'd have expected that the tween(hotspot[h52].alpha,'1.0', 3) was put in a callback function of the second lookto(), but it works as you wrote.