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.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<plugin name="360spiner_data" currentpano="0" spin_turn_on="1" keep="true" > </plugin> <action name="loadpanos"> set(spiner,0); trace(spiner); oninterrupt(break); if(plugin[360spiner_data].currentpano == 1, check_view();tween();); if(plugin[360spiner_data].currentpano == 2,load(2.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween(); if(plugin[360spiner_data].currentpano == 3,load(3.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween(;); if(plugin[360spiner_data].currentpano == 4,load(4.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween(;); if(plugin[360spiner_data].currentpano == 5,load(5.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween();); if(plugin[360spiner_data].currentpano == 6,load(6.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween();); if(plugin[360spiner_data].currentpano == 7,load(7.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween();); if(plugin[360spiner_data].currentpano == 8,load(8.xml, null, MERGE, ZOOMBLEND(1.5,10));check_view();tween(;); </action> <action name="check_view"> this action creates 360 spin </action> |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<krpano version="1.0.8" onstart="onstarttur()"> <view hlookat="0" vlookat="0" /> <image type="CUBE" multires="true" tilesize="955"> <level tiledimagewidth="1910" tiledimageheight="1910"> <left url="pano/afara/1/l_%0v_%0h.jpg" /> <front url="pano/afara/1/f_%0v_%0h.jpg" /> <right url="pano/afara/1/r_%0v_%0h.jpg" /> <back url="pano/afara/1/b_%0v_%0h.jpg" /> <up url="pano/afara/1/u_%0v_%0h.jpg" /> <down url="pano/afara/1/d_%0v_%0h.jpg" /> </level> </image> <action name="onstarttur"> oninterrupt(break);tween(view.hlookat,360, 15.0, easeInOutSine); oninterrupt(break); </action> </krpano> |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<krpano version="1.0.8" onstart="delayedcall(4,onstarttur())"> <view hlookat="0" vlookat="0" /> <image type="CUBE" multires="true" tilesize="955"> <level tiledimagewidth="1910" tiledimageheight="1910"> <left url="pano/afara/1/l_%0v_%0h.jpg" /> <front url="pano/afara/1/f_%0v_%0h.jpg" /> <right url="pano/afara/1/r_%0v_%0h.jpg" /> <back url="pano/afara/1/b_%0v_%0h.jpg" /> <upurl="pano/afara/1/u_%0v_%0h.jpg" /> <down url="pano/afara/1/d_%0v_%0h.jpg" /> </level> </image> <action name="onstarttur"> oninterrupt(stopall()); tween(view.hlookat,360, 15.0, easeInOutSine); </action> </krpano> |
This post has been edited 1 times, last edit by "michel" (Sep 25th 2010, 7:09pm)
On your example,the last action is the tween itself... So, the oninterrupt() action becomes disabled ....oninterrupt(newaction)
- this function can be set before starting a lot of action calls
- it was called when a mouse click interrupts one of following actions
- after interrupting or processing all actions, this function will be disabled until next call
....
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<krpano version="1.0.8" onstart="onstarttur()"> <view hlookat="0" vlookat="0" /> <image type="CUBE" multires="true" tilesize="955"> <level tiledimagewidth="1910" tiledimageheight="1910"> <left url="pano/afara/1/l_%0v_%0h.jpg" /> <front url="pano/afara/1/f_%0v_%0h.jpg" /> <right url="pano/afara/1/r_%0v_%0h.jpg" /> <back url="pano/afara/1/b_%0v_%0h.jpg" /> <up url="pano/afara/1/u_%0v_%0h.jpg" /> <down url="pano/afara/1/d_%0v_%0h.jpg" /> </level> </image> <action name="onstarttur"> oninterrupt(stopall()); <!-- OR: -- oninterrupt(stoptween(view.hlookat)); --> tween(view.hlookat,360, 15.0, easeInOutSine,WAIT); </action> </krpano> |
![]() |
Source code |
1 2 3 4 |
<action name="onstarttur"> oninterrupt(break); lookto(360,get(view.vlookat),get(view.fov), smooth(2,2,24), false); </action> |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
<events onmousedown="mouse_down()" onmouseup="mouse_up()" /> <action name="mouse_down"> copy(mx, mouse.x); copy(my, mouse.y); </action> <action name="mouse_up"> sub(v, mouse.x, mx); if (v LT 0, mul(v, -1)); if (v GT 20, set(mouse_moved, true); , sub(v, mouse.y, my); if (v LT 0, mul(v, -1)); if (v GT 20, set(mouse_moved, true); , set(mouse_moved, false); ); ); if (mouse_moved, delayedcall(2,if(delayedcallkilled == true,loadpanos(noload))); stopall(); ); </action> <action name="loadpanos"> set(spiner,0); trace(get(var_current_pano)); if(var_current_pano == 1, if(%1 == noload,check_view(right);tween(view.hlookat,get(spiner), 5.0, easeInOutSine,set(var_current_pano,2);loadpanos(););, load(1.xml, null, MERGE, ZOOMBLEND(1.5,10));wait(blend);set(init_view,get(view.hlookat));check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,2);loadpanos(););)); if(var_current_pano == 2, if(%1 == noload,check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,3);loadpanos(););, load(2.xml, null, MERGE, ZOOMBLEND(1.5,10));wait(blend);set(init_view,get(view.hlookat));check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,3);loadpanos(););)); if(var_current_pano == 3, if(%1 == noload,check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,4);loadpanos(););, load(3.xml, null, MERGE, ZOOMBLEND(1.5,10));wait(blend);set(init_view,get(view.hlookat));check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,4);loadpanos(););)); if(var_current_pano == 4, if(%1 == noload,check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,5);loadpanos(););, load(4.xml, null, MERGE, ZOOMBLEND(1.5,10));wait(blend);set(init_view,get(view.hlookat));check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,5);loadpanos(););)); if(var_current_pano == 5, if(%1 == noload,check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,1);loadpanos(););, load(5.xml, null, MERGE, ZOOMBLEND(1.5,10));set(init_view,get(view.hlookat));wait(blend);check_view(right);tween(view.hlookat,get(spiner), 1.0, easeInOutSine,set(var_current_pano,1);loadpanos(););)); </action> <action name="check_view"> if(%1==left, if(init_view GT -1,add(spiner,-360,init_view)); if(init_view LT 0,add(spiner,-360,init_view)) ); if(%1==right, if(init_view GT -1,add(spiner,360,init_view)) ; if(init_view LT 0,add(spiner,360,init_view)) ); </action> |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 |
<action name="autotourintro"> oninterrupt(breakall()); if(stepintro == 3, tween(view.hlookat,180,20,easeInOutCubic);tween(view.Vlookat,0,20,easeInOutCubic);tween(view.fov,80,20,easeInOutCubic,WAIT);inc(stepintro); ); if(stepintro == 4, action(hotspotvideovisibletrue0);inc(stepintro); ); if(stepintro == 5, loadpano(Jardindumuseeduquaibranly12.xml,NULL,NULL,BLEND(5));lookat(-110,-30,60);set(stepintro,6); ); if(stepintro == 14, tween(view.hlookat,295,35,easeInOutCubic);tween(view.Vlookat,0,35,easeInOutCubic);tween(view.fov,50,35,easeInOutCubic,WAIT);inc(stepintro); ); if(stepintro == 15, loadpano(Jardindumuseeduquaibranly3.xml,NULL,NULL,BLEND(5));lookat(250,55,30); set(stepintro,16); ); </action> |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
<action name="autotourintro"> oninterrupt(breakall()); i f(stepintro == 3, oninterrupt(set(stepintro,3));tween(view.hlookat,180,20,easeInOutCubic);tween(view.Vlookat,0,20,easeInOutCubic);tween(view.fov,80,20,easeInOutCubic,WAIT);inc(stepintro); ); if(stepintro == 4, action(hotspotvideovisibletrue0);inc(stepintro); ); if(stepintro == 5, loadpano(Jardindumuseeduquaibranly12.xml,NULL,NULL,BLEND(5));lookat(-110,-30,60);set(stepintro,6); ); if(stepintro == 14, tween(view.hlookat,295,35,easeInOutCubic);tween(view.Vlookat,0,35,easeInOutCubic);tween(view.fov,50,35,easeInOutCubic,WAIT);inc(stepintro); ); if(stepintro == 15, loadpano(Jardindumuseeduquaibranly3.xml,NULL,NULL,BLEND(5));lookat(250,55,30); set(stepintro,16); ); </action> |