PRO

Inversion Lens Hover

A WebGL image where a soft circular lens tracks the cursor and inverts a grayscale version of the image inside it, its edge broken up by 8-octave turbulence scrolling over time so the boundary churns like a living blot; the lens eases open on enter and closes when the pointer leaves or the element scrolls out of view.

Component
Install
npx shadcn@latest add https://ui.aryank.space/r/inversion-lens-hover.json

Installs from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.

Files

API
PropTypeDefaultDescription
srcstringBLANK-hosted JPEGImage inverted inside the lens.
maskRadius / turbulenceIntensity / maskSpeednumber0.15 / 0.075 / 0.75Lens radius, edge turbulence, and churn speed.
lerpFactor / radiusLerpSpeednumber0.05 / 0.1Cursor follow easing and lens open/close easing.
Customize
maskRadius / turbulenceIntensitytuple

Lens size and how ragged its edge churns.

maskSpeed / lerpFactortuple

Turbulence scroll speed and cursor easing.

Dependencies
three