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.

21

Saturday, September 23rd 2017, 10:49am

2. - having the ability to decide whether you want a relative or absolute system of coordinate for the view, normally that would be used to make a 3d transition, so we need to easily know the direction of the axis we need to move.

Yes. It will be nice!

Sergey74

Trainee

Posts: 124

Location: Russia, Chelyabinsk

Occupation: professional noob

  • Send private message

22

Saturday, September 23rd 2017, 11:41am

Also made a small test for the new parameters. It remains only to understand how to make the transition))
http://panosphera.ru/gallery/transitions/2/
singleclick - shift to center view
doubleclick - shift to mouse
translation difficulties *huh*

23

Saturday, September 23rd 2017, 12:25pm

Сергей, отлично! ) Thanks for sharing

jpdeglet69

Intermediate

Posts: 192

Location: France

Occupation: VR Maker and Document Management Expert

  • Send private message

24

Sunday, September 24th 2017, 3:13pm

*thumbsup*
Best regards,
JPhD
VR-Guide®/Eleana CEO
https://vr-guide.online

Scott Witte

Intermediate

Posts: 248

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

25

Sunday, September 24th 2017, 10:24pm

Very nice update! The variable scope change is especially helpful. You are the best!

ramirox3

Intermediate

Posts: 197

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

26

Monday, September 25th 2017, 1:42am

Could someone please explain to us that we still do not understand. Why the variable scope is especially helpful? I have read trying to understand, but I still do not grasp the meaning and I would like to understand how to apply the concept
thanks in advance
Ramiro

27

Tuesday, September 26th 2017, 1:28am

Could someone please explain to us that we still do not understand. Why the variable scope is especially helpful? I have read trying to understand, but I still do not grasp the meaning and I would like to understand how to apply the concept
thanks in advance
Ramiro

pr12

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
	<action name="do_crop_animation">
		<!-- add attributes to the hotspot -->
		registerattribute(xframes, calc((imagewidth / %1) BOR 0));
		registerattribute(yframes, calc((imageheight / %2) BOR 0));
		registerattribute(frames, calc(xframes * yframes));
		registerattribute(frame, 0);

		set(crop, '0|0|%1|%2');

		setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
			if(loaded,
				inc(frame);
				if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
				mod(xpos, frame, xframes);
				div(ypos, frame, xframes);
				Math.floor(ypos);
				mul(xpos, %1);
				mul(ypos, %2);
				calc(crop, xpos + '|' + ypos + '|%1|%2');
			  ,
				clearinterval(calc('crop_anim_' + name));
			  );
		  );
	</action>

pr13

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
	<action name="do_crop_animation" scope="local" args="framewidth, frameheight, framerate">
		<!-- define local variables -->
		calc(local.xframes, (caller.imagewidth /framewidth) BOR 0);
		calc(local.frames, xframes * ((caller.imageheight / frameheight) BOR 0));
		def(local.frame, integer, 0);
		
		<!-- set the first frame -->
		calc(caller.crop, '0|0|' + framewidth + '|' + frameheight);
		
		<!-- do the animation -->
		setinterval(calc('crop_anim_' + caller.name), calc(1.0 / framerate),
			if(caller.loaded,
				inc(frame);
				if(frame GE frames, if(caller.onlastframe !== null, callwith(caller, onlastframe() ) ); set(frame,0); );
				mod(xpos, frame, xframes);
				div(ypos, frame, xframes);
				Math.floor(ypos);
				mul(xpos, framewidth);
				mul(ypos, frameheight);
				calc(caller.crop, xpos + '|' + ypos + '|' + framewidth + '|' + frameheight);
			  ,
				<!-- stop the interval when the hotspot gets removed -->
				clearinterval(calc('crop_anim_' + caller.name));
			);
		);
	</action>

28

Tuesday, September 26th 2017, 9:31am

Very nice update! Thanks for your continued support and development *thumbsup*

Is it possible to use the new "fisheye image"-support to also embed undistorted fisheye-images as hotspot or plugin/layer?

And is it now possible to change the pano-image on the fly? For example changing a 360-photo for a 360-video without loading a new scene?

Tuur

Sage

Posts: 3,120

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

29

Tuesday, September 26th 2017, 12:56pm

Quoted

And is it now possible to change the pano-image on the fly? For example changing a 360-photo for a 360-video without loading a new scene?

Why would you want that?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

30

Tuesday, September 26th 2017, 7:24pm

Could someone please explain to us that we still do not understand. Why the variable scope is especially helpful? I have read trying to understand, but I still do not grasp the meaning and I would like to understand how to apply the concept

Hi,

e.g. when doing a:

Source code

1
set(i, 0);
anywhere in a normal action then that 'i' variable will be defined in a 'global' scope - and that means that variable will be available also everywhere else in all other actions.

Here a case where this is problematic - one action does a for loop using an 'i' variable as counter and in the inner loop it calls another action that also does a for loop using an 'i' variable:

Source code

1
2
3
4
5
6
7
8
9
10
11
<action name="test" autorun="onstart">
  for(set(i, 0), i LT 3, inc(i), 
     test_inner_loop();
  );
</action>

<action name="test_inner_loop">
  for(set(i, 0), i LT 3, inc(i), 
     trace('hello');
  );
</action>
Both actions are using the same 'i' variable and so the output will be 3 x hello, because after the inner action call the 'i' is already 3 and so the outer loop will also end.

But when adding scope="local" to the actions:

Source code

1
2
3
4
5
6
7
8
9
10
11
<action name="test" autorun="onstart" scope="local">
  for(set(i, 0), i LT 3, inc(i), 
     test_inner_loop();
  );
</action>

<action name="test_inner_loop" scope="local">
  for(set(i, 0), i LT 3, inc(i), 
     trace('hello');
  );
</action>
both actions will define their own local 'i' variable and the output will 9 x hello.

That means it can help avoiding conflicts when using the same variable names in different actions.


The next thing is that this local variable scope for an action allows adding variables that will exist only in that action. And this is ideal for passing arguments. An argument passed to an action can be made available as local variable in that action.

And arguments as local variables has these advantages:
  • It allows writing better self-describing code - e.g. using 'caption' instead of just a '%2' in code.

  • It avoid problems with string escaping - when an argument will be a string that contains quote or comma characters then it can be problematic to quote the %NN placeholder in a way that it can be used as string again.

  • When the action doesn't contain any %NN placeholders, its code will be basically 'static' - and this allows internally to cache the parsing or to pre-compile the code - and this can make its execution much faster (currently this not implemented, but its' already in work for the next versions).

That means ideally all new actions should use scope="local".
With the following versions I will also update/port all current xml templates, plugins and examples to that (some where already updated).

Best regards,
Klaus

31

Tuesday, September 26th 2017, 7:35pm

Is it possible to use the new "fisheye image"-support to also embed undistorted fisheye-images as hotspot or plugin/layer?
No, the fisheye support is currently for pano images (btw - the fisheye support is not 'new' ;-)), but I was also already thinking about providing that feature also for hotspots - although there is a bit more difficult to implement, especially the hit-testing will be challenging - that would require an inverse formula for the fisheye distortion, but I think that's mathematically not possible...

And is it now possible to change the pano-image on the fly? For example changing a 360-photo for a 360-video without loading a new scene?
What's the problem with doing a loadpano/loadscene/loadxml call to change the pano image?

Best regards,
Klaus

32

Wednesday, September 27th 2017, 9:23am

Enter VR text show on top when first Open tour

Source code

1
<krpano version="1.19" title="Virtual Tour" onstart="callwhen(layer[webvr_enterbutton].alpha == 1,showlog();)">


in pr12 log not show

in pr13 log show

33

Wednesday, September 27th 2017, 9:26am

What's the problem with doing a loadpano/loadscene/loadxml call to change the pano image?

It would be a very helpfull feature for very complex tours with lots of global actions (events onnewpano, onremovepano etc.) and scene-based onstart-events. If you just need to switch to a 360°-Video for a short time for example, there are a lot of if-then-else routines necessary in those events, event-driven actions and autostart-actions to exclude their auto-execution. It would help to reduce the amount of work drastically if you have just a few scenes but each scene needs to switch to 10+ 360-Videos for just 10-20 seconds. With the possibility to replace the pano-image/video on the fly a simple action could replace 100+ 360-video-scenes.

And it would also be a great way to include window-views for example without the need to load a new scene. Just switch to a quick 180°x180° fisheye-pano for a few seconds and return to the room WITHOUT loading all scene-elements again. The keepall-flag is just not the best way all the time :-(

Best regards,
Nupsi

benji33

Intermediate

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

34

Wednesday, September 27th 2017, 10:44am

Very nice and stable update *thumbup*

Minor issue : Is it possible to avoid the image blink when editing a textfield css on the fly with an [img] link into ?
It can be tested on the Combobox sample with a "rounded" design on the "thumbnails bar".
And also with a multiple scenes project the select of an item can be masked into the list if a removeAll / addItem is used prior to the select.[/img]

This post has been edited 1 times, last edit by "benji33" (Sep 27th 2017, 10:59am)


samadi

Beginner

Posts: 30

Location: Iran

Occupation: Tehran,Alborz,nazarabad,

  • Send private message

35

Thursday, September 28th 2017, 6:36am

YES
PERFECT
*thumbsup*
www.livepano.ir

36

Thursday, September 28th 2017, 3:22pm

New Editor - not working with own tour.xml

Hi Klaus,

try out the new features...MANY THANKS for the cool new updates... *thumbsup*

Found out, that if you use an own tour.xml, not that one that's generated by the VTOUR droplet, I can`t add/edit hotspots.
With the old flashPlayer Version it was/is working...
My panos are also seperated in scenes like in your tour.xml, but I don`t use the "vtourskin.xml" and the "skin_settings"...


Will that be considered in future/final version?

Best regards,
Steve

This post has been edited 1 times, last edit by "svb" (Sep 28th 2017, 3:38pm)


37

Friday, September 29th 2017, 12:16pm

Ummm...this update totally killed all the (html) input fields in our plugins. Works well with 1.19 pr10, does not in pr13. Any ideas?

(ps.: not talking about mobile stuff, this is on the desktop platform)

Tuur

Sage

Posts: 3,120

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

38

Friday, September 29th 2017, 1:20pm

Yes, i have the same problem, with the text input script.
*cry*

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

39

Friday, September 29th 2017, 3:03pm

Enter VR text show on top when first Open tour
in pr12 log not show
in pr13 log show

Please see this post:
krpano 1.19-pr13

40

Friday, September 29th 2017, 3:07pm

And it would also be a great way to include window-views for example without the need to load a new scene. Just switch to a quick 180°x180° fisheye-pano for a few seconds and return to the room WITHOUT loading all scene-elements again. The keepall-flag is just not the best way all the time :-(
Additional IMAGEONLY and NOEVENTS flags for the loadpano/loadscene/loadxml actions might be a possibility for such...
What do you think?

But sending no events could be problematic when the fov-ranges of the new image would be different...

Similar threads