Installation
npx kinetic-ui-cli@latest add liquid-mercury-dropletArchitecture & Shaders
Liquid Mercury Droplet runs entirely on the GPU via Three.js and React Three Fiber.
- Vertex Displacement: Evaluates a classic 3D Simplex noise field combined with mouse pointer screen-space distance. As the user interacts with the canvas, exponential damping propagates concentric ripples across the sphere mesh surface.
- Metallic Reflection Fragment: Uses dynamic normal matrix calculations to evaluate a double Blinn-Phong specular lobe, a cubic Fresnel rim equation, and simulated horizon environment reflections with subtle chromatic aberration at grazing angles.
- Spring Inertia & Presentation Controls: Supports drag and touch orbiting with automatic spring-back snapping.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { LiquidMercuryDroplet } from "@/components/creative/liquid-mercury-droplet";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { LiquidMercuryDroplet } from "@/components/creative/liquid-mercury-droplet";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<LiquidMercuryDroplet
viscosity{10}
distortion{10}
metalness{10}
/>
</div>
);
}