A cloth simulation rendered on canvas, pinned to a decorative rail at the top. The fabric grid uses verlet integration with distance constraints for realistic draping. Drag any point on the curtain and it parts to reveal what's behind it, then gently swings back to rest. The pleats are shaded by stretch ratio for depth.
curtain-reveal-preview
Loading preview...
Why it helps: A curtain reveal adds drama and surprise. It turns a simple show/hide into a tactile, satisfying interaction - users feel like they're physically pulling back a drape.
Also good to know:
// Loading source...
import { CurtainReveal } from "@/components/live/CurtainReveal";
<CurtainReveal
curtainColor="#8b1e3f"
hintLabel="Drag to peek"
/>Primary curtain fabric color.
Secondary shade for pleat highlights.
Color of the curtain rod and rings.
Number of rows in the cloth grid.
Number of columns in the cloth grid.
Downward pull in px/s².
How strongly points return to rest position.
Velocity decay per frame (0-1).
How much the top row sags to create pleats.
How close your cursor must be to grab a point.
Text in the hint pill at the bottom.
Content shown behind the curtain.
Additional CSS classes.
Hidden content revealed
import { CurtainReveal } from "@/components/live/CurtainReveal";
<CurtainReveal
curtainColor="#8b1e3f"
hintLabel="Drag to peek"
/>