Water
MITTranslucent water — a refractive, light-absorbing body that deepens to its color with thickness, wrapped in a wind-driven wave surface that reflects a procedural sky, with Fresnel-bright grazing edges and foam breaking on the crests and shoreline
Cargando shader…
Ajústalo
1
0
0.4
5
0.5
0.15
6
0.8
3.5
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-water.json
Crea components/bastard/ShaderWater.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderWater from '@/components/bastard/ShaderWater';23export default function Demo() {4 return (5 <ShaderWater6 scale={1}7 rotation={0}8 waterColor="#00bfeb"9 clarity={0.4}10 depth={5}11 shallows={0.5}12 caustics={0.15}13 causticScale={6}14 choppiness={0.8}15 waveScale={3.5}16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| scale | number | 1 | Scale |
| rotation | number | 0 | Rotation |
| waterColor | string | "#00bfeb" | Water Color |
| clarity | number | 0.4 | Clarity |
| depth | number | 5 | Depth |
| shallows | number | 0.5 | Shallows |
| caustics | number | 0.15 | Caustics |
| causticScale | number | 6 | Caustic Scale |
| choppiness | number | 0.8 | Choppiness |
| waveScale | number | 3.5 | Wave Scale |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Water · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.