Docs/Formas

Water

MIT

Translucent 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';
2
3export default function Demo() {
4 return (
5 <ShaderWater
6 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

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
waterColorstring"#00bfeb"Water Color
claritynumber0.4Clarity
depthnumber5Depth
shallowsnumber0.5Shallows
causticsnumber0.15Caustics
causticScalenumber6Caustic Scale
choppinessnumber0.8Choppiness
waveScalenumber3.5Wave 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.