Docs/Formas

Nebula

MIT

A volumetric gas nebula sealed inside polished glass; billowing emission clouds with hollow dark cavities and hot glowing cores, star fields drifting at real depth behind the gas, all refracted through the curved walls of the shape and dressed with studio reflections

Cargando shader…

Ajústalo

1
0
1
0
0.55
0.4

Instalación

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

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

Uso

Demo.tsx
1import ShaderNebula from '@/components/bastard/ShaderNebula';
2
3export default function Demo() {
4 return (
5 <ShaderNebula
6 scale={1}
7 rotation={0}
8 coreColor="#ffd9b0"
9 gasColor="#ff5e7a"
10 veilColor="#3a5bdb"
11 colorSpace="oklab"
12 density={1}
13 cavity={0}
14 dust={0.55}
15 gasScale={0.4}
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
coreColorstring"#ffd9b0"Core Color
gasColorstring"#ff5e7a"Gas Color
veilColorstring"#3a5bdb"Veil Color
colorSpace'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch'"oklab"Color Space
densitynumber1Density
cavitynumber0Cavity
dustnumber0.55Dust
gasScalenumber0.4Gas Scale

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

Créditos

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