You are not logged in.

1

Thursday, September 1st 2016, 1:30am

How to enable trace() and other INFO display

I am very much a newbie to krpano and have spent half a day searching the forum and cannot figure out how to use the trace() to display INFO about krpano variables in real time. I see the trace() everywhere but when i add it to an xml it doesn't show up. For example I added the follow snippet from one of the threads about action variables. I was thinking this would show the output in a window somewhere. Does nothing when added to XML .
I'm trying to learn by watching what is going on but the examples I have found so far are not above me.
I could use some help *confused*

<action name="hello">
trace("hello ",%1);
</action>

<action name="main">
hello(world);
hello(kitty);
hello(Klaus);
hello();
</action>

2

Thursday, September 1st 2016, 2:05am

showlog(); or press o key

3

Thursday, September 1st 2016, 2:44am

Ok, that is something I didn't find either. Where is that? (press o for console)


So apparently the actions are not being triggered because if I link to an events code like

Source code

1
<events onkeydown="showlog(); trace('keycode=',keycode); trace('fovmin=',view.fovmin); trace('fovmax=',view.fovmax); trace('fov=',view.fov); main();" />

the actions are triggered and main calls hello. What are the ways to call an action?


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<action name="hello">
    showlog();
    trace('view.maxpixelzoom=', view.maxpixelzoom);
    trace("hello ",%1);
</action>

<action name="main">
   
	hello(world);
	hello(kitty);
	hello(Klaus);
	hello();
</action>

This post has been edited 1 times, last edit by "lschaudies" (Sep 1st 2016, 1:31pm)


4

Thursday, September 1st 2016, 4:34am

in the code anywhere to call main()

Source code

1
2
3
4
5
6
7
<krpano onstart="main()"> 


other code


</krpano>