Docs/Fondos

Worley Noise

MIT

Cellular noise field — distance-based, with selectable feature combinations and fractal octaves

Cargando shader…

Ajústalo

6
1
2
0.5
1

Instalación

Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-worley-noise.json

Crea components/bastard/ShaderWorleyNoise.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderWorleyNoise from '@/components/bastard/ShaderWorleyNoise';
2
3export default function Demo() {
4 return (
5 <ShaderWorleyNoise
6 colorA="#ffffff"
7 colorB="#000000"
8 colorSpace="linear"
9 scale={6}
10 mode="f1"
11 distance="euclidean"
12 octaves={1}
13 lacunarity={2}
14 persistence={0.5}
15 jitter={1}
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
colorAstring"#ffffff"Color A (Low)
colorBstring"#000000"Color B (High)
colorSpace'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch'"linear"Color Space
scalenumber6Scale
mode'f1' | 'f2' | 'f2MinusF1' | 'f1PlusF2' | 'f1TimesF2'"f1"Mode
distance'euclidean' | 'manhattan' | 'chebyshev'"euclidean"Distance
octavesnumber1Octaves
lacunaritynumber2Lacunarity
persistencenumber0.5Persistence
jitternumber1Jitter

Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.

Créditos

Basado en Worley Noise · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.