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.

image360

Fortgeschrittener

  • »image360« ist der Autor dieses Themas

Beiträge: 204

Wohnort: Austin, TX and Chicago, IL

Beruf: Photographer

  • Nachricht senden

1

Sonntag, 4. Oktober 2009, 20:12

Auto Tour with user control and resume?

Has anyone figure out a good XML solution to have an auto tour - self running moveto, wait, moveto, wait, goto new pano, popup image or text, etc,, then moveto, wait, system that allows the user to sit back and watch, but interrupt the progression, look around and then restart from the interruption point?

I want to build a simple tour that auto runs but allows the user to control it when they want to, and then restart it from the point they took control of it.

Any ideas?

Regards,

Robert

2

Montag, 5. Oktober 2009, 22:57

Hi,

e.g. this would/could be a solution:
- use the "onidle" event or a button to start the auto tour
- use a custom variable ("step" in the example below) to count which step the tour has reached
- increase this variable (step) after each tour action
- use oninterrupt to break/stop the tour
- use if() to check at which current step the tour is and call a action for this step
- when this autotour action was interrupt and called later again, it will continue at the last step

here this as xml code: (for 1.0.8 beta or newer)

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<krpano onstart="setuptour();">

<action name="setuptour">
  set(step,1);
  set(idletime,4);
  set(events.onidle, autotour() );
</action>

<action name="autotour">
  oninterrupt(break);
  if(step == 1, lookto(...); inc(step); );
  if(step == 2, moveto(...); inc(step); );
  if(step == 3, lookto(...); inc(step); );
  if(step == 4, wait(2); inc(step); );
  if(step == 5, lookto(...); inc(step); );
  if(step == 6, tourdone(...); set(step,1); );
</action>

...

</krpano>


best regards,
Klaus

image360

Fortgeschrittener

  • »image360« ist der Autor dieses Themas

Beiträge: 204

Wohnort: Austin, TX and Chicago, IL

Beruf: Photographer

  • Nachricht senden

3

Montag, 5. Oktober 2009, 23:56

Thank you

Klaus,

Thank you for your help! I will try this, it looks like it meets my needs very well. Thank you again.

Best Regards,

Robert

image360

Fortgeschrittener

  • »image360« ist der Autor dieses Themas

Beiträge: 204

Wohnort: Austin, TX and Chicago, IL

Beruf: Photographer

  • Nachricht senden

4

Dienstag, 6. Oktober 2009, 17:34

Linear or Object based process?

I've been testing the code structure kindly provided by Klaus to setup an auto tour with user interruption and resume.

In the initial very basic work, I've found I have to use Tween so I can control the speed or timing of movement around the view.(OK, now see the moveto and others have speed control.) But I've also found that I have to use Wait before an step increment and set the timing or the next conditional is executed before the action of the first step is finished.

So I'm guessing that each action is fully loaded and acted upon in a object fashion as opposed to a linear process. Is this correct or what else am I missing as I continue to add complexity into the auto tour.

Here's a small sample of what I've done, without the wait at the end of the first set of tweens - before the step increment - the last tween set, after the wait(17), is executed in the second pano, not the first one as intended.

<action name="autotour">
oninterrupt(break);
if(step == 1, tween(view.fov,90,20,linear);tween(view.hlookat,370,20,linear);tween(view.vlookat,0,20,linear);wait(17); tween(view.fov,30,5,easeInOutSine); tween(view.hlookat,82,5,easeInOutSine); wait(8); inc(step); );
if(step == 2, loadpano(DiningRoom_MG_8170 Panorama.xml,null,KEEPBASE|NOPREVIEW,BLEND(2)); wait(2); inc(step); );
...

Just trying to understand this tool, one small tween at a time *smile*

Regards,

Robert

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »image360« (6. Oktober 2009, 19:23)


5

Mittwoch, 7. Oktober 2009, 15:00

Hi,

the tween() action starts only a 'process' to change a value during the time,
but after starting it, the next action will be processed,
this allows to tween() several values at once,

different to that the lookto/moveto/zoomto actions are 'blocking' actions,
they are changing the view, and while changing all other things are blocked (user input, actions execution),
so the next actions will be executed when they are done,

about the tween - to get notified when a tween has ended, there is the "donecall" parameter,
there actions can be placed that will be executed when the tween has reached the destination value,

note - in 1.0.8 beta - there is a new special value for the donecall parameter: WAIT,
with it the tween acts like the lookto/moveto/.. actions and waits until the tween has finished
before executing the next actions,

e.g.

Quellcode

1
tween(value, 100.0, 1.0, linear, WAIT);



best regards,
Klaus

6

Donnerstag, 19. März 2015, 17:50

Hi Klaus,
I am using your example and added a button to start the autotour.
But how can I switch the tour off??? It always starts again after the idle-time...
I would like to have a button with directly starting and stopping the autotour without starting again...

thanks

Felipeca

Anfänger

Beiträge: 32

Wohnort: México City

Beruf: Dsigner, 3dmodeler and photographer

  • Nachricht senden

7

Donnerstag, 19. März 2015, 23:24

How we do it

This is what we use:
<krpano version="1.18" title="CECC" onstart="startup();" idletime="75">

<events onidle="skin_nextscene_loop(+1);set(autorotate.enabled,true);" />


The "skin_nextscene_loop" is borroed directly from the default skin xml.