Auralis
forgeui/auralisFreeComponent
A WebGL-powered animated background featuring layered simplex noise, glowing light effects, vignette, and subtle film grain for a dramatic ambiance.
Live preview
live · rendered by the registry
Rendered by ForgeUI on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://forgeui.in/r/auralis.jsonSource
1"use client";23import { useEffect, useRef } from "react";4import { cn } from "@/lib/utils";56const vertexShaderGLSL = `7attribute vec2 position;8varying vec2 vUv;9void main() {10 vUv = position * 0.5 + 0.5;11 gl_Position = vec4(position, 0.0, 1.0);12}13`;1415const fragmentShaderGLSL = `16precision highp float;17varying vec2 vUv;1819uniform vec2 u_resolution;20uniform float u_time;21uniform float u_grain;22uniform vec3 u_colors[3];2324vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }25vec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }26vec3 permute(vec3 x) { return mod289(((x*34.0)+1.0)*x); }2728float snoise(vec2 v) {29 const vec4 C = vec4(0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439);30 vec2 i = floor(v + dot(v, C.yy));31 vec2 x0 = v - i + dot(i, C.xx);32 vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);33 vec4 x12 = x0.xyxy + C.xxzz;34 x12.xy -= i1;35 i = mod289(i);36 vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0));37 vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);38 m = m*m; m = m*m;39 vec3 x = 2.0 * fract(p * C.www) - 1.0;40 vec3 h = abs(x) - 0.5;41 vec3 ox = floor(x + 0.5);42 vec3 a0 = x - ox;43 m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h);44 vec3 g;45 g.x = a0.x * x0.x + h.x * x0.y;46 g.yz = a0.yz * x12.xz + h.yz * x12.yw;47 return 130.0 * dot(m, g);48}4950void main() {51 vec2 uv = vUv;52 float ratio = u_resolution.x / u_resolution.y;53 vec2 p = uv * vec2(ratio, 1.0);54 float t = u_time * 0.2;5556 float n1 = snoise(p * 0.5 + t);57 float n2 = snoise(p * 0.9 - t * 0.5 + n1);5859 float light = pow(abs(n2), 2.5) * 0.5;6061 vec3 col = vec3(0.02, 0.01, 0.01);6263 col += u_colors[0] * smoothstep(0.1, 1.0, n1) * 0.5;64 col += u_colors[1] * light;6566 float grain = fract(sin(dot(uv, vec2(12.9898, 78.233))) * 43758.5453 + u_time);67 col += (grain - 0.5) * u_grain * 0.5;6869 float dist = length(uv - 0.5);70 col *= smoothstep(1.2, 0.2, dist);7172 gl_FragColor = vec4(col, 1.0);73}74`;7576export interface AuralisProps {77 colors?: string[];78 speed?: number;79 grain?: number;80 height?: string;81 className?: string;82}8384const DEFAULT_COLORS = ["#ef4444", "#dc2626", "#b91c1c"];8586const Auralis = ({87 colors = DEFAULT_COLORS,88 speed = 0.3,89 grain = 0.6,90 height = "100vh",91 className,92}: AuralisProps) => {93 const canvasRef = useRef<HTMLCanvasElement | null>(null);94 const containerRef = useRef<HTMLDivElement | null>(null);9596// … truncated
Files it writes
More from ForgeUI
All 28 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Formanimated-form | ForgeUI | Components | Free | no deps | |
| Animated OTPanimated-otp | ForgeUI | Components | Free | no deps | |
| Animated Tabsanimated-tabs | ForgeUI | Components | Free | no deps | |
| Bot Detectionbot-detection | ForgeUI | Components | Free | no deps | |
| Chromatic Fluidchromatic-fluid | ForgeUI | Components | Free | no deps | |
| Cloudscapecloudscape | ForgeUI | Components | Free | no deps | |
| Cosmicriftcosmicrift | ForgeUI | Components | Free | no deps | |
| Expandable Cardexpandable-card | ForgeUI | Components | Free | no deps |
