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.
This post has been edited 4 times, last edit by "indexofrefraction" (Feb 2nd 2020, 10:12am)
This post has been edited 1 times, last edit by "indexofrefraction" (Feb 1st 2020, 11:17am)
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
This post has been edited 1 times, last edit by "indexofrefraction" (Feb 2nd 2020, 10:24am)
This post has been edited 2 times, last edit by "indexofrefraction" (Feb 2nd 2020, 10:56am)
This post has been edited 3 times, last edit by "juyatu" (Jun 1st 2020, 1:33pm)
![]() |
Source code |
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 |
<krpano> <plugin name="zfilter" url="plugins/zfilter.js" preload="true" keep="true" fquality.mobile="5" fquality.tablet="10" fquality.desktop="15" /> <view hlookat="0" fov="90" fovmin="60" fovmax="120" /> <image> <sphere url="pano/lady_elliot.jpg"/> </image> <layer name="slider_bg" type="container" bgcolor="0x000000" bgalpha="0.5" align="topleft" x="30" y="30" handcursor="false" width="220" height="18" /> <layer name="slider_title" type="text" align="topleft" html="saturation / 饱和" parent="slider_bg" bg="false" css="color:#fff;font-size:10px;padding-left:5px;" alpha="0.5" enabled="false" /> <layer name="slider_grip" type="container" bgcolor="0xffffff" bgalpha="0.5" align="left" edge="center" parent="slider_bg" x="110" width="10" height="18" bgcapture="true" ondown="copy(drag_currentx, x); copy(drag_stagex, mouse.stagex); asyncloop(pressed, calc(newx, drag_currentx + (mouse.stagex - drag_stagex)); clamp(newx, calc(layer[slider_grip].width/2), calc(layer[slider_bg].pixelwidth - layer[slider_grip].width/2)); copy(x, newx); calc(valx, (newx - layer[slider_grip].width/2) / (layer[slider_bg].pixelwidth - layer[slider_grip].width)); calc(valx, valx * 2 - 1); copy(plugin[zfilter].saturation, valx); );" /> </krpano> |
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<action name="setup" autorun="onstart"> if(plugin[zfilter].ready, // add zfilter to layer and hotspot addzfilter(layer[mylayer1]); addzfilter(layer[mylayer2]); addzfilter(layer[mylayer3]); addzfilter(hotspot[myhotspot1]); addzfilter(hotspot[myhotspot2]); addzfilter(hotspot[myhotspot3]); set(layer[mylayer1].saturation, -1); set(layer[myhotspot2].blur, 10); // ... etc set(plugin[zfilter].brightness, 0.5); ); </action> |
This post has been edited 1 times, last edit by "indexofrefraction" (Jun 2nd 2020, 8:20am)