Loading WebGL Simulation...

How to use

01Import the component
import LiquidWave from "@/components/shitui/LiquidWave";
02Use in your application
export default function App() {
return (
  <div style={{ width: '100%', height: '500px', position: 'relative' }}>
      <LiquidWave />
  </div>
);
}

Examples

01Custom Colors
<LiquidWave 
color1="#5227FF"
color2="#FF9FFC"
color3="#B19EEF"
/>
02Custom Force and Cursor Size
<LiquidWave 
mouseForce={30}
cursorSize={150}
/>
03With Viscosity
<LiquidWave 
isViscous={true}
viscous={50}
/>

Features

High-performance WebGL fluid dynamics with advection, diffusion, and pressure handling.

Props

PropTypeDefaultDescription
color1string"orange"Primary gradient color (any CSS color format)
color2string"orange"Secondary gradient color (optional)
color3string"orange"Tertiary gradient color (optional)
mouseForcenumber20Strength of mouse interaction (0-100)
cursorSizenumber100Size of the interaction cursor in pixels
isViscousbooleanfalseEnable viscous fluid behavior
viscousnumber30Viscosity strength (only when isViscous is true)
isBouncebooleanfalseEnable boundary bounce effect
dtnumber0.014Time delta for simulation step
resolutionnumber0.5Simulation resolution (0.1-1.0, higher = better quality)
iterationsPoissonnumber32Pressure solver iterations (higher = more accurate)
iterationsViscousnumber32Viscosity solver iterations
BFECCbooleantrueUse BFECC advection for better stability
classNamestring""Additional CSS classes for the canvas
Component Info