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

  • 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

  • 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.

  • 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.

  • 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...

  • 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.

  • 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!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!