perf(khira): eliminate UI lag and jitter with GPU-composited glass, rAF translate3d lens, and zero-overhead borders

This commit is contained in:
2026-10-26 17:53:01 +05:30
parent 16c232a2d3
commit 889d959a70
3 changed files with 56 additions and 121 deletions
+2 -44
View File
@@ -15,10 +15,10 @@
</head>
<body>
<!-- Kube.io SVG Liquid Glass Filters (Magnifying Glass Pipeline) -->
<!-- Kube.io SVG Liquid Glass Magnifying Lens Filter -->
<svg color-interpolation-filters="sRGB" style="position:fixed;width:0;height:0;pointer-events:none;z-index:-1;opacity:0" aria-hidden="true">
<defs>
<!-- 1. Kube.io Precision Magnifying Glass Filter -->
<!-- Kube.io Precision Magnifying Glass Filter -->
<filter id="kube-magnifying-glass-filter" color-interpolation-filters="sRGB" x="-20%" y="-20%" width="140%" height="140%">
<feImage href="/khira/assets/magnifying-map.png" x="0" y="0" width="210" height="150" result="magnifying_displacement_map"></feImage>
<feDisplacementMap in="SourceGraphic" in2="magnifying_displacement_map" xChannelSelector="R" yChannelSelector="G" result="magnified_source" scale="24"></feDisplacementMap>
@@ -34,48 +34,6 @@
<feBlend in="specular_saturated" in2="displaced" mode="normal" result="withSaturation"></feBlend>
<feBlend in="specular_faded" in2="withSaturation" mode="normal"></feBlend>
</filter>
<!-- 2. Kube.io Liquid Glass Panels, Modals & Sheets -->
<filter id="kube-glass-panel" color-interpolation-filters="sRGB" x="-10%" y="-10%" width="120%" height="120%">
<feImage href="/khira/assets/displacement-map-panel.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="disp_map"></feImage>
<feDisplacementMap in="SourceGraphic" in2="disp_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="42"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="saturated" values="6"></feColorMatrix>
<feImage href="/khira/assets/specular-map-panel.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="spec_layer"></feImage>
<feComposite in="saturated" in2="spec_layer" operator="in" result="spec_sat"></feComposite>
<feComponentTransfer in="spec_layer" result="spec_fade">
<feFuncA type="linear" slope="0.45"></feFuncA>
</feComponentTransfer>
<feBlend in="spec_sat" in2="displaced" mode="normal" result="withSat"></feBlend>
<feBlend in="spec_fade" in2="withSat" mode="normal"></feBlend>
</filter>
<!-- 3. Kube.io Liquid Glass Pills (Search, Buttons & Chips) -->
<filter id="kube-glass-pill" color-interpolation-filters="sRGB" x="-10%" y="-10%" width="120%" height="120%">
<feImage href="/khira/assets/displacement-map-pill.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="disp_map"></feImage>
<feDisplacementMap in="SourceGraphic" in2="disp_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="32"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="saturated" values="6"></feColorMatrix>
<feImage href="/khira/assets/specular-map-pill.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="spec_layer"></feImage>
<feComposite in="saturated" in2="spec_layer" operator="in" result="spec_sat"></feComposite>
<feComponentTransfer in="spec_layer" result="spec_fade">
<feFuncA type="linear" slope="0.4"></feFuncA>
</feComponentTransfer>
<feBlend in="spec_sat" in2="displaced" mode="normal" result="withSat"></feBlend>
<feBlend in="spec_fade" in2="withSat" mode="normal"></feBlend>
</filter>
<!-- 4. Kube.io Liquid Glass Bars (Header & Navigation) -->
<filter id="kube-glass-bar" color-interpolation-filters="sRGB" x="-5%" y="-5%" width="110%" height="110%">
<feImage href="/khira/assets/displacement-map-bar.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="disp_map"></feImage>
<feDisplacementMap in="SourceGraphic" in2="disp_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="26"></feDisplacementMap>
<feColorMatrix in="displaced" type="saturate" result="saturated" values="5"></feColorMatrix>
<feImage href="/khira/assets/specular-map-bar.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="spec_layer"></feImage>
<feComposite in="saturated" in2="spec_layer" operator="in" result="spec_sat"></feComposite>
<feComponentTransfer in="spec_layer" result="spec_fade">
<feFuncA type="linear" slope="0.35"></feFuncA>
</feComponentTransfer>
<feBlend in="spec_sat" in2="displaced" mode="normal" result="withSat"></feBlend>
<feBlend in="spec_fade" in2="withSat" mode="normal"></feBlend>
</filter>
</defs>
</svg>