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.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

1

Thursday, January 6th 2011, 9:10am

One more effects on the Vtour thumbs

I have been struggling on a way to mark the viewed panoramas on the thumbs.

Finally got it working.

if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
openthumb(get(thumbname));
set(plugin[get(thumbname)].onclick,set(effect,glow(0x000000,1.0,2,10000));set(events.onclick,null);closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
inc(i);
openthumbs(NEXT);

This changes the border to black when you click the thumb and open a panorama. I guess there are many other effects you can use.
Works fine both with the thumbs staying open and with the closethumbs() action.

If you want the thumbs to open at start and stay open just ad openthumbs(); to the startup action and remove the closethumbs(); from the code above.

Hans

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

2

Thursday, January 6th 2011, 9:35am

Well maybe not as many effects as I thought.

I can do the blur effect and I can also just remove the thumb by using this onclick,set(scale,0.0);

But where are the saturation, brightness and contrast effects.
I have searched all the XML documentation but there is nothing.

I want to be able to make them almost black or just lower saturation to make them blackandwhite.

Hans

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

3

Thursday, January 6th 2011, 3:16pm

Hans there are no setting for them at least not that i am aware of. you might be able to gain what you are looking for using the blendmode setting though there are a handful of settings. invert will swap all color with thier opposite.

the thumbnail thing is something I have done in my code also. i use red borders and turn the current scene blue and when that scene is left i then leave the border green to show that it has already been visited once. one of my vtours demos we are doing for a local arena had 20+ scene, since then i stripped it down to 18. it is still nice to know where you have been.

4

Friday, July 29th 2011, 1:37pm

Hiiii...

I had used the following code to build a thumbnail gallery. It works fine on PC but does not work on IPAD.
The code is
<action name="startup">

loadscene(get(scene[0].name), null, MERGE);
<!-- build the thumbnails (remove the next line to remove the thumbnails) -->
buildthumbs();

openthumbs();
</action>

<action name="hidethumbs">

if(%1 != NEXT, set(i,0));
if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));

set(plugin[get(thumbname)].visible, false );set(plugin[loader].visible,true);set(plugin[list].visible,false); inc(i);
hidethumbs(NEXT);
);
</action><action name="showthumbs">

if(%1 != NEXT, set(i,0));
if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));

set(plugin[get(thumbname)].visible, true);set(plugin[loader].visible,false);set(plugin[list].visible,true);
inc(i);
showthumbs(NEXT);
);
</action><!-- thumbnail actions begin (remove the 'buildthumbs()' call in the onstart event to remove the thumbs) --><action name="buildthumbs">
if(%1 != NEXT, set(i,0));
if(i LT scene.count,
copy(thumb, scene[get(i)].thumburl);
txtadd(thumbname,'thumb_',get(i));
addplugin(get(thumbname));
set(plugin[get(thumbname)].url, get(thumb));
set(plugin[get(thumbname)].keep, true);
set(plugin[get(thumbname)].align, topleft);
set(plugin[get(thumbname)].alpha,1.0);
set(plugin[get(thumbname)].width, 40);
set(plugin[get(thumbname)].height, 40);
set(plugin[get(thumbname)].x, 10);
set(plugin[get(thumbname)].y, 10);
mul(plugin[get(thumbname)].x, i,3);
mul(plugin[get(thumbname)].y, i,3);
add(plugin[get(thumbname)].x, 5);
add(plugin[get(thumbname)].y, 5);



add(plugin[get(thumbname)].zorder, 100, i);
set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000));
set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF');
copy(plugin[get(thumbname)].thumbpos, i);
set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) );

set(plugin[get(thumbname)].onclick, openthumbs() );
inc(i);
buildthumbs(NEXT);


);
</action><action name="openthumb">
if(%2 != NEXT,
set(pos,0);
copy(curpos, plugin[%1].thumbpos);
set(xdst,5);
set(ydst, 20);
);

if(pos LT curpos,
inc(pos);
inc(xdst,54);
sub(xmax,500,100);
if(xdst GT xmax, inc(ydst,54);set(xdst,5); );
openthumb(%1,NEXT);
,
add(ydst,20);
add(xdst,20);
tween(plugin[%1].y, get(ydst) );
tween(plugin[%1].x, get(xdst) );
tween(plugin[%1].width, 50);
tween(plugin[%1].height, 50);
);
</action><action name="closethumb">
tween(plugin[%1].x, get(plugin[%1].xsmall));
tween(plugin[%1].y, get(plugin[%1].ysmall));
tween(plugin[%1].width, 20);
tween(plugin[%1].height, 20);
</action><action name="openthumbs">
if(%1 != NEXT,
set(i,0);
set(events.onclick, set(events.onclick,null); delayedcall(0.1, ); );
);

if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
openthumb(get(thumbname));
set(plugin[get(thumbname)].onclick,set(events.onclick,null); hidethumbs();loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
inc(i);
openthumbs(NEXT);
);
</action><action name="closethumbs">
if(%1 != NEXT, set(i,0));
if(i LT scene.count,
txtadd(thumbname,'thumb_',get(i));
closethumb(get(thumbname));
set(plugin[get(thumbname)].onclick, openthumbs() );
inc(i);
closethumbs(NEXT);
);
</action>


I have 20 thumbnails. out of which 18 of them are visible on ipad but the 19 and 20 are clusterd on top.[/list][/list]

5

Friday, July 29th 2011, 1:39pm

just add on your <action name="buildthumbs">

set(plugin[get(thumbname)].devices, all);

6

Friday, July 29th 2011, 1:57pm

Thnx for your reply...
I included set(plugin[get(thumbname)].devices, all); still it is not working. The last two thumbnails would open only after clicking on it. Please help. I m not able to figure out where the problem is...

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

7

Friday, July 29th 2011, 2:47pm

the default thumbnail code works on all devices. just drop your files on the vtour droplet then upload and test that make sure your changes are not breaking things. then start to modify from there, test and see where it starts to break.

8

Saturday, July 30th 2011, 7:26am

I downloaded the krpano Viewer 1.0.8.12 and just increased the number of scenes in examples\virtual-tours\simple-tour-with-scenes to 20 . but still the thumbs do not show properly on IPAD. The code is attached here simpletour.xml .


Pls let me know why the code is not working on IPAD for more than 18 scenes.
smi has attached the following image:
  • krpanosimpletour.jpg

This post has been edited 1 times, last edit by "smi" (Jul 30th 2011, 7:54am)


9

Monday, August 1st 2011, 11:41am

Please reply....

11

Thursday, August 4th 2011, 2:11pm

Please let me know why this code is not working....

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

12

Thursday, August 4th 2011, 3:31pm

Please let me know why this code is not working....


If you want help, try posting a link.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

13

Wednesday, August 10th 2011, 1:24pm

thnx all,
The problem has been resolved... *g*

14

Wednesday, July 11th 2012, 1:18pm

I'm giving it a try in this thread.

I'm able to change the border on onclick(set)) but if I want the border to go back to "normal" (or turning to another color to see you've watched that scene) when clicking another thumbnail, how is that done?

And also, the border of the glow effect has rounded corners which doesn't look very good when putting a thick border on it. Is there any way to have a "normal" border (ala css solid border)?

Hope you guys can help me out:)
Cheers!