Shader Reveal
Interactive liquid image reveal
Customize
Tweak the props liveInteraction
Auto Demo
Fluid Simulation
Props
| Name | Type | Default | Description |
|---|---|---|---|
frontImage | string | "" | URL of the front (covering) image texture |
backImage | string | "" | URL of the back (revealed) image texture |
mouseForce | number | 50 | Strength of fluid impulse from mouse/touch interactions |
cursorSize | number | 250 | Effective radius of the cursor interaction area |
resolution | number | 0.5 | Simulation resolution multiplier (0.25-1.0, lower = better performance) |
isViscous | boolean | true | Enable viscosity in the fluid simulation |
viscous | number | 30 | Viscosity strength (higher = thicker fluid) |
iterationsViscous | number | 24 | Number of viscosity solver iterations (higher = more accurate) |
iterationsPoisson | number | 28 | Number of pressure solver iterations (higher = more accurate) |
dt | number | 0.014 | Time delta for simulation step (lower = more stable) |
BFECC | boolean | true | Enable BFECC advection (higher quality, slightly slower) |
isBounce | boolean | false | Enable boundary bounce behavior |
autoDemo | boolean | true | Enable automatic motion when idle |
autoSpeed | number | 0.55 | Speed of automatic cursor movement |
autoIntensity | number | 2.2 | Intensity multiplier for automatic interactions |
takeoverDuration | number | 0.25 | Transition time when user takes control (seconds) |
autoResumeDelay | number | 1200 | Delay before auto-demo resumes after user interaction (ms) |
autoRampDuration | number | 0.6 | Ramp-up time when auto-demo resumes (seconds) |
revealStrength | number | 0.75 | How strongly the dye field controls the reveal effect |
revealSoftness | number | 1 | Softness of the reveal edge transition |
style | React.CSSProperties | undefined | Inline styles applied to the container |
className | string | "" | Additional CSS classes for the container |
frontImagestringURL of the front (covering) image texture
""backImagestringURL of the back (revealed) image texture
""mouseForcenumberStrength of fluid impulse from mouse/touch interactions
50cursorSizenumberEffective radius of the cursor interaction area
250resolutionnumberSimulation resolution multiplier (0.25-1.0, lower = better performance)
0.5isViscousbooleanEnable viscosity in the fluid simulation
trueviscousnumberViscosity strength (higher = thicker fluid)
30iterationsViscousnumberNumber of viscosity solver iterations (higher = more accurate)
24iterationsPoissonnumberNumber of pressure solver iterations (higher = more accurate)
28dtnumberTime delta for simulation step (lower = more stable)
0.014BFECCbooleanEnable BFECC advection (higher quality, slightly slower)
trueisBouncebooleanEnable boundary bounce behavior
falseautoDemobooleanEnable automatic motion when idle
trueautoSpeednumberSpeed of automatic cursor movement
0.55autoIntensitynumberIntensity multiplier for automatic interactions
2.2takeoverDurationnumberTransition time when user takes control (seconds)
0.25autoResumeDelaynumberDelay before auto-demo resumes after user interaction (ms)
1200autoRampDurationnumberRamp-up time when auto-demo resumes (seconds)
0.6revealStrengthnumberHow strongly the dye field controls the reveal effect
0.75revealSoftnessnumberSoftness of the reveal edge transition
1styleReact.CSSPropertiesInline styles applied to the container
undefinedclassNamestringAdditional CSS classes for the container
""Demo image by Alex Suprun @ unsplash.com, not part of the React Bits Pro offer.