THX bulp. I need something similar, but not that.hye lorth2... try download krpano version 1.0.8 beta8 and examine the masked-radar-textfield-hotspot example... krpano have parentchild..
|
|
Quellcode |
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 27 28 29 30 31 |
<!-- Plugin image -- for your first image --> <plugin name="pic1" url="image1.jpg" visible="true" enabled="true" capture="false" align="center" x="0" y="0" onover="set(plugin[pic2].visible,true);" onout="set(plugin[pic2].visible,false);" /> <!-- masked Plugin image -- for your second image --> <plugin name="pic2" url="image2.jpg" visible="false" enabled="false" capture="false" align="center" x="0" y="0" mask="plugin[picmask]" /> <!-- the mask Plugin image --> <plugin name="picmask" url="image_mask.png" enabled="false" capture="false" align="center" x="0" y="0" /> |

|
|
Quellcode |
1 2 3 4 5 6 7 |
<plugin name="spotmask"
url="spotmask.png"
align="center"
enabled="false"
height="40%"
width="prop"
/>
|
|
|
Quellcode |
1 2 3 4 |
<hotspot name=".."
...
mask="plugin[spotmask]"
/>
|

I´ll try it tomorrow.Hi lorth22,
After many tries... I got this code that looks to do what you are looking for:
![]()
Quellcode
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 27 28 29 30 31 <!-- Plugin image -- for your first image --> <plugin name="pic1" url="image1.jpg" visible="true" enabled="true" capture="false" align="center" x="0" y="0" onover="set(plugin[pic2].visible,true);" onout="set(plugin[pic2].visible,false);" /> <!-- masked Plugin image -- for your second image --> <plugin name="pic2" url="image2.jpg" visible="false" enabled="false" capture="false" align="center" x="0" y="0" mask="plugin[picmask]" /> <!-- the mask Plugin image --> <plugin name="picmask" url="image_mask.png" enabled="false" capture="false" align="center" x="0" y="0" />
The plugin[pic1] listens to onover and onout mouse action to make plugin[pic2].visible true or false...
I hope this can help.
Salut.
thanks great!You ask me for the images I want to use.
I already know this problem,I have noticed something strange on the "maskedhostspot" example .... *confused*
Open your example http://krpano.com/examples/maskedhotspot/index.html , zoom out a little to make more visible the mistake, then pan left or right... when you arrive between 65º (depending of the FOV) the "maskedhostspot" seems to "loose his mask" and becomes visible *attention*
yes, right, pannini projection can't be used for hotspots,I also noticed that distorted hospot does not apply correctly on Pannini projection...
wow, great example!I have made an example using your image cave1d.jpg as the Pano, a cropped image from your first uploaded image (image1 + image2 + mask = result) as the distorted hospot and the spotmask.png from the example made by Klaus (the car). I have proceeded as Klaus explain.
Here is the result : http://andorra360.com/test/ForumKrpano/lorth22/
Zitat
How do you know it for be in the correct place ?
- use cube faces
- the changing area should be in one cube face
- crop out the modified/different area out
- important - note the position and size of the cropped area
- then calculate the position and size for the hotspot:
- some explanations first:
- the internal space in krpano for distorted hotspots is 1000x1000
- that means a hotspot with a size of 1000x1000 covers the same area like a cube face
- now with the noted sizes about the cropped area the position and size of the hotspot can be calculated:
- hotspot.width = area-width * 1000 / original-cubeface-width
- hotspot.height = area-height * 1000 / original-cubeface-height
- hotspot.ox = area-x * 1000 / original-cubeface-width - 500
- hotspot.oy = area-y * 1000 / original-cubeface-height - 500
- the "hotspot.edge" must be set to "lefttop" for these calculations
- finally the ath/atv position of the hotspot must be set to move the hotspot to the correct cube face:
here are the positions for the cube sides:
- front: ath="0" atv="0"
- right: ath="90" atv="0"
- left: ath="-90" atv="0"
- back: ath="180" atv="0"
- up: ath="0" atv="-90"
- down: ath="0" atv="+90"
)
Also, there is the context menu for switching between different projections.
)
even if the mask is the same mask for each hotspot. I have tried to mask each hotspots with the same plugin as mask but it does not work. ( in the example above I use the same mask file for each hotspot )
You can notice this yourself on the example above: enable a cube button and disable his mask, then switch between normal view and fisheye view... In normal view the cube hotspot match perfectly with the background... In fisheye view the cube hotspot match near perfectly with the background but there is little differences.