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

Monday, February 23rd 2015, 11:30am

How to stop rotation after a while?

Hi

I want to give a visitor a hint of panorama but in a way that doesn't drain CPU.



So I would like to stop autorotation in a couple of seconds after it has started. Is there a way to do so from javascript or via xml config?

Maybe there is a way to set up some initial momentum so the panorama is rotating for a few seconds in the beginning?

Thanks!

2

Monday, February 23rd 2015, 11:46am

Hi,

yes, e.g.

Source code

1
delayedcall(5.0, set(autorotate.enabled,false));


Best regards,
Klaus

3

Wednesday, February 25th 2015, 6:10am

Hi Klaus,

Thanks for your suggestion, however when I add it to my startup definition the panorama is not rotating at all:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<krpano version="1.18" title="Virtual Tour" onstart="startup();">

	<action name="startup">
if(startscene === null, copy(startscene,scene[0].name));


loadscene(get(startscene), null, MERGE);	


 delayedcall(5, set(autorotate.enabled,false));
</action>


</krpano>



Please advise. Thank you.

This post has been edited 1 times, last edit by "pain666" (Feb 25th 2015, 8:04am)