You are not logged in.

1

Thursday, February 17th 2022, 6:44am

Create selection hover in tour

I'm new to KRP, I don't know about tweaks. I want to make a selection for hover, I really hope someone can help me. Thanks a lot!




Illustrated link:

https://www.youtube.com/watch?v=FFXarGTcUDc

[list][*][/list]

2

Thursday, February 17th 2022, 10:17am

welcome to the forum ...
but.. please do not post the same question in (four!) different places!

what you show in the video is a polygon hotspot
if you need more/different sections of the street to select, you need to create more polygon hotspots
there are helper tools to create polygon hotspots (search the forum)
here links to the documentation and an example with polygon hotspots
https://krpano.com/docu/xml/#hotspot
https://krpano.com/releases/1.20.11/examples/#textstyles

This post has been edited 3 times, last edit by "indexofrefraction" (Feb 17th 2022, 11:41am)


3

Thursday, February 17th 2022, 10:39am

Hi,

in your video there is a polygonal hotspots that changes its color on hovering.

That would be possible e.g. this way:

Source code

1
2
3
4
5
<hotspot
    ...
    onover="tween(fillcolor,0x00FF00);"
    onout="tween(fillcolor,0x777777);"
    />


The tween changes the current fillcolor to the given one and that happens when the mouse comes over and moves out the hotspots.

(btw - I have removed your duplicated posts)

Best regards,
Klaus

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

4

Thursday, February 17th 2022, 12:25pm

Hi Hank,

you could download the free ToolBox I made here:
https://krpano.com/forum/wbb/index.php?p…74910#post74910

include it in your project
open project in browser,
press P on your keyboard,,
press start new hotspot
and then make some clicks in your pano

press spacebar to stop
press L to show the code in the log.
and copy paste it to your code.

example:
https://www.virtualtuur.com/krpano/120/help/poly/1/

xml:
https://www.virtualtuur.com/krpano/120/help/poly/1/tour.xml

don't forget to take the toolbox out of the code when you don't need it.

Here you can find more info on the settings and functionality of the polygonal hotspots:
https://krpano.com/docu/xml/#hotspot


Hope it helps,
Tuur *thumbsup*

5

Thursday, February 17th 2022, 4:32pm

Hi,

in your video there is a polygonal hotspots that changes its color on hovering.

That would be possible e.g. this way:

Source code

1
2
3
4
5
<hotspot
    ...
    onover="tween(fillcolor,0x00FF00);"
    onout="tween(fillcolor,0x777777);"
    />


The tween changes the current fillcolor to the given one and that happens when the mouse comes over and moves out the hotspots.

(btw - I have removed your duplicated posts)

Best regards,
Klaus
Thank you for the support. I have done it, but what if I want the polygon point to be transparent and disappear after hovering?
Sorry for posting so many times!

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

6

Thursday, February 17th 2022, 4:46pm

Quoted

but what if I want the polygon point to be transparent and disappear after hovering?


Source code

1
onout="tween(fillalpha,0);"


you could also add: set(enabled, false) there, or removehotspot(bla); (bla is the name of the hotspot)
but that depends on if you want to keep the hotspot or remove it definitely.

Tuur *thumbsup*

7

Thursday, February 17th 2022, 5:06pm


Quoted

but what if I want the polygon point to be transparent and disappear after hovering?


Source code

1
onout="tween(fillalpha,0);"


you could also add: set(enabled, false) there, or removehotspot(bla); (bla is the name of the hotspot)
but that depends on if you want to keep the hotspot or remove it definitely.

Tuur *thumbsup*
https://www.youtube.com/watch?v=FFXarGTcUDc

Thank you very much! When creating polygon points using the toolbox there will be an opaque white overlay inside the polygon points
What I mean is that the polygon point will not show on hover and on hover will show the color. Finally, when no longer hovering, it will return to transparent state. Hope you can help me!

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

8

Thursday, February 17th 2022, 5:10pm

Just set the fillalpha to 0 and the fillcolor as desired.
Onover tween the fillalpha to 1 (or 0.4 or what wver you want)
Onout tween it to 0

Tuur *thumbsup*

9

Thursday, February 17th 2022, 5:13pm

Just set the fillalpha to 0 and the fillcolor as desired.
Onover tween the fillalpha to 1 (or 0.4 or what wver you want)
Onout tween it to 0

Tuur *thumbsup*

Example video:
https://www.youtube.com/watch?v=FFXarGTcUDc

Thank you very much! When creating polygon points using the toolbox there will be an opaque white overlay inside the polygon points
What I mean is that the polygon point will not show on hover and on hover will show the color. Finally, when no longer hovering, it will return to transparent state. Hope you can help me!

10

Thursday, February 17th 2022, 5:23pm

Just set the fillalpha to 0 and the fillcolor as desired.
Onover tween the fillalpha to 1 (or 0.4 or what wver you want)
Onout tween it to 0

Tuur *thumbsup*
Thank you. I got the border color worked out, but still not the opacity inside the polygon. If I leave fillcolour or fillalpha = 0 the whole polygon disappears. Can you guide me?

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

11

Thursday, February 17th 2022, 5:24pm

Source code

1
<hotspot name="hs1" borderwidth="0" fillcolor="0xff0000" fillalpha="0" onover="tween(fillalpha,0.8)" onout="tween(fillalpha,0);" >. .. </hotspot> 

or something like that

Tuur *thumbsup*

12

Thursday, February 17th 2022, 5:30pm

Source code

1
. ..  

or something like that

Tuur *thumbsup*
I have done it already. thank you very much