Hi guys!
I've just put up a hidden test page containing my first attempt at an online pano:
http://www.frozentime.co.uk/omk/
This is what I'd like to achieve:
The black horizonatal <div> in which the pano is opened if 500px tall, but obviously when opened the panorama is defaulting to showing full width. Really I'd like it to open zoomed to fit that height.
Secondly when opened I'd like it to be panning slowly on its own.
Is this achievable please?
Thanks in advance,
Chris.
First try and first problems!
-
-
That's controlled by FOV.
Since this is only a partial, I'd use lookto so you can set the speed, and once its done you can go back the other way.
-
Ok thanks :) That has allowed me to get the height to the image I wanted:
http://www.frozentime.co.uk/omk
But I have no real idea how to implement the other thing you suggest!!!
Thanks for taking the time to reply so far!!! -
Yes for the other, you'll need to learn how to program krpano.
Learn how to make an actions.
Learn where to call an action etc.
See the examples folder, the documentation I pointed you to, and do a forum search here for auto tour. -
Thanks. I have a bit of an understanding of the xml and the code.
Presumably it needs to be added to index.xml? -
scene onstart is where I'd put your action in your main xml
-
Ok this is what I've tried:
Code
Display More<krpano version="1.0.8" ispartialpano="true" onstart="setup panning();"> <include url="skin/defaultskin.xml" /> <view hlookat="0" vlookat="0" maxpixelzoom="1.0" /> <display details="22" /> <preview url="index.tiles/preview.jpg" /> <image type="CYLINDER" hfov="1.00" multires="true" tilesize="616" progressive="true"> <level tiledimagewidth="4927" tiledimageheight="500"> <cylinder url="index.tiles/l1_%0v_%0h.jpg" /> </level> </image> <action name="setup panning"> set(step,1); set(idletime,4); set(events.onidle, auto pan(); </action> <action name="auto pan"> oninterrupt(break); if(step==1, lookto(-180,0,,smooth); inc(step); ); if(step==2, wait(5); inc(step); ); if(step==3, lookto(+180,0,,smooth); inc(step); ); if(step==4, wait(5); set(step,1); ); </action></krpano>
But it doesnt seem to work. can someone tell me why please?
Thanks again! -
-
Thanks for that. Added the bracket.
Double checked for other typos and can't see any.
Sadly it still doesnt work -
Thanks for that. Added the bracket.
Double checked for other typos and can't see any.
Sadly it still doesnt workStart thinking like a developer,
try one command in a simple action and use trace afterwards to see if your action worked at all..
Trace at the start of the action
trace('1');
trace after your command went off etc...
See if your actions works,, set up plugins to call them.. use the error console.
Then once you get a handle on troubleshooting a whole new world opens up. -
Well my latest itteration of code is:
Code
Display More<krpano version="1.0.8" logkey="true" showerrors="true" ispartialpano="true" onstart="test();"> <include url="skin/defaultskin.xml" /> <view hlookat="0" vlookat="0" maxpixelzoom="1.0" /> <display details="22" /> <preview url="index.tiles/preview.jpg" /> <image type="CYLINDER" hfov="1.00" multires="true" tilesize="616" progressive="true"> <level tiledimagewidth="4927" tiledimageheight="500"> <cylinder url="index.tiles/l1_%0v_%0h.jpg" /> </level> </image> <action name="test"> set(step,1); set(events.idletime,4); set(events.onidle,test2() ); </action> <action name="test2"> trace('1'); oninterrupt(break); if(step==1, lookto(-180,0,,smooth); inc(step); ); if(step==2, wait(5); inc(step); ); if(step==3, lookto(+180,0,,smooth); inc(step); ); if(step==4, wait(5); set(step,1); ); </action></krpano>
The onstart is operating as I had a trace in there. It appears the onidle command isn't working because now I moved the trace it never happens.
Still cannot see why at the moment though :( -
I've now spent another half day tinkering with this to no effect.
I thought perhaps because some events are defined in the "skin" xml file that maybe they needed to be in the same place but that didnt work.
I even tried:Code<action name="test";> trace('0'); set(events.onidle=("test2";);</action><action name="test";> trace('1');</action>
But whilst the 0 appears in the window, the 1 never happens. -
UH what?
;)
No
it would be like<krpano version="1.0.8" onstart="test();" idletime="5"
<action name="test">
trace('0');
set(events.idletime,4);
set(events.onidle,'test2();');
</action><action name="test2">
trace('1');
</action>This worked fine... note that it's ONIDLE, which means you can touch anything for "4" seconds to fire this.
-
That is very similar to:
Code
Display More<krpano version="1.0.8" logkey="true" showerrors="true" ispartialpano="true" onstart="test();" idletime="5"> <include url="skin/defaultskin.xml" /> <view hlookat="0" vlookat="0" maxpixelzoom="1.0" /> <display details="22" /> <preview url="index.tiles/preview.jpg" /> <image type="CYLINDER" hfov="1.00" multires="true" tilesize="616" progressive="true"> <level tiledimagewidth="4927" tiledimageheight="500"> <cylinder url="index.tiles/l1_%0v_%0h.jpg" /> </level> </image> <action name="test"> trace('0'); set(step,1); set(events.idletime,4); set(events.onidle,'test2();'); </action> <action name="test2"> trace('1'); oninterrupt(break); if(step==1, lookto(-180,0,,smooth); inc(step); ); if(step==2, wait(5); inc(step); ); if(step==3, lookto(+180,0,,smooth); inc(step); ); if(step==4, wait(5); set(step,1); ); </action> </krpano>
But when run the window displays 0 but the 1 never happens i.e. it appears the onidle event never triggers.
Thank you again for your time though. -
put
set(step,1);
in your first action.
Worked on mine.<action name="test">
set(step,1);
trace('0');
set(events.idletime,4);
set(events.onidle,'test2();');
</action><action name="test2">
trace('step ',get(step));
if(step==1,
lookto(-180,0,,smooth);
inc(step);
);
oninterrupt(break);
trace('step ',get(step));
</action> -
And if that bird don't sing, look for some other place fiddling with your onidle event.
Make a simple tour to verify my code works.. and ensure you are running the latest beta code.
-
This code only results in "Info: 0" in the window.
I've tried it in IE9 and in Firefox 4, so it seems unlikely to be a browser setting that isn't working.
Is there a server side setting that might be stopping this working? -
Here is a test sample that seems to work like I believe you are wanting. View the trace log on it.
-
This code only results in "Info: 0" in the window.
I've tried it in IE9 and in Firefox 4, so it seems unlikely to be a browser setting that isn't working.
Is there a server side setting that might be stopping this working?You must have other include code interfering or some style perhaps.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!