You are not logged in.

1

Saturday, September 10th 2016, 4:18pm

How to show pano tiles only when the last one is loaded, not one-by-one

Hi Krpano enthusiasts,

When I load my pano, I see the loading of the tiles one by one. For some reason, I only want to show tiles only when all of the them are loaded at the same time, that is when the last one has been loaded. How can I do that?

Thanks

2

Tuesday, September 13th 2016, 10:10am

Hi,

the NOPREVIEW flag could be used for that - then krpano should wait until the current view is fully loaded before blending to the next pano.

Best regards,
Klaus

3

Tuesday, September 13th 2016, 10:46am

I've added the NOPREVIEW flag to the loadscene() function:

loadscene(get(startscene), null, MERGE|NOPREVIEW);

The result is just that I don't see the pano preview but tiles still load one-by-one, so the problem is not solved (unless I did something wrong). I still would like to see the preview, but just that the tiles should come in all at the same very moment.

4

Tuesday, September 13th 2016, 11:22am

That wouldn't work for the first pano.

Okay something different - add a layer that covers the screen and fade it out once the pano has loaded:

Source code

1
2
3
4
5
6
7
8
9
<layer name="cover" 
       keep="true"
       type="container"
       align="lefttop"
       width="100%" height="100%"
       bgcolor="0x000000"
       bgalpha="1.0"
       onloaded="wait(LOAD); tween(alpha, 0.0, 1.0, default, removelayer(get(name));" 
       />


Best regards,
Klaus

5

Tuesday, September 13th 2016, 11:52am

That code works, thanks, but there is an other issue coming out because I have the following other layer in my scene (that if I remember correctly I got in this forum).

Source code

1
2
3
4
5
6
7
8
9
10
11
	<layer name="reloadbutton"
	       url="%SWFPATH%/plugins/textfield.swf"
	       children="false"
	       vcenter="true"
	       backgroundcolor="0x000000" backgroundalpha="0.667" roundedge="10" border="false"
	       shadow="0.1" shadowrange="8" shadowcolor="0xFFFFFF"
	       css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:10px;"
	       html="Reload (without cache)"
	       align="bottom" width="140" height="22" y="40"
	       onclick="loadpano(get(xml.url),null,KEEPALL);"
	       />




which coupled with

Source code

1
2
3
	<include url="../progress_loadinganimation.xml" />
	<include url="../progress_loadingpercent.xml" />
	<include url="../progress_loadingbar.xml" />



gives a loading animation.

The problem is that this loading-animation layer disappear... so how would I overlay the cover layer with the animation layer?
(I've messed around with the attributes parent="reloadbutton" and maskchildren="false" but with no luck)

This post has been edited 1 times, last edit by "AJ_" (Sep 13th 2016, 12:04pm)


Sergey74

Intermediate

Posts: 193

Location: Russia, Chelyabinsk

Occupation: professional noob

  • Send private message

6

Tuesday, September 13th 2016, 12:22pm

Try this method Blur transitions
translation difficulties *huh*

7

Thursday, September 15th 2016, 9:18am

Try giving zorder settings to all elements to order them in depth and avoid unintended overlapping.

8

Tuesday, September 20th 2016, 2:57pm

Thanks for your answers.

I tried zorder but it doesn't seem to work... what would be the precedence relation by the way: the layer having the largest value is at the top as for DIV tags in html or the other way around? I didn't find it in the documentation, which says "All layer / plugin elements with a zorder setting will be sorted by the given value. ", but sorted in which order?

I tried putting larger and smaller buth either way I don't get what I want.

9

Tuesday, September 27th 2016, 9:43am

It was my fault: with z-order properly set, it works. Refreshing the page, probably the browser was looking at data saved in its cache!

Thanks again for your input.