Velora
forgeui/veloraFreeComponent
A WebGL-powered animated radial light effect featuring swirling color streaks, 3D noise-based flow, and dynamic color transitions with film grain.
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/velora.jsonSource
1"use client";23import { useEffect, useMemo, useRef } from "react";4import { cn } from "@/lib/utils";56const vertexShaderGLSL = `7attribute vec2 position;8varying vec2 vUv;9void main() {10 vUv = (position + 1.0) * 0.5;11 gl_Position = vec4(position, 0.0, 1.0);12}13`;1415const fragmentShaderGLSL = `16precision highp float;1718uniform vec2 u_resolution;19uniform float u_time;20uniform vec3 u_colorBottom;21uniform vec3 u_colorMid;22uniform vec3 u_colorTop;23uniform float u_flowStrength;24uniform float u_grain;25uniform float u_speed;2627varying vec2 vUv;2829float hash(vec3 p) {30 return fract(sin(dot(p, vec3(127.1, 311.7, 74.7))) * 43758.5453123);31}3233float noise(vec3 p) {34 vec3 i = floor(p);35 vec3 f = fract(p);36 vec3 u = f * f * (3.0 - 2.0 * f);3738 return mix(39 mix(mix(hash(i + vec3(0.0, 0.0, 0.0)), hash(i + vec3(1.0, 0.0, 0.0)), u.x),40 mix(hash(i + vec3(0.0, 1.0, 0.0)), hash(i + vec3(1.0, 1.0, 0.0)), u.x), u.y),41 mix(mix(hash(i + vec3(0.0, 0.0, 1.0)), hash(i + vec3(1.0, 0.0, 1.0)), u.x),42 mix(hash(i + vec3(0.0, 1.0, 1.0)), hash(i + vec3(1.0, 1.0, 1.0)), u.x), u.y), u.z43 );44}4546float fbm(vec3 p) {47 float v = 0.0;48 float a = 0.5;49 for (int i = 0; i < 4; i++) {50 v += a * noise(p);51 p *= 2.0;52 a *= 0.5;53 }54 return v;55}5657void main() {58 vec2 uv = (vUv - 0.5) * vec2(u_resolution.x / u_resolution.y, 1.0);5960 float radius = length(uv);61 float angle = atan(uv.y, uv.x);6263 float z = 1.0 / max(radius, 0.001);64 float t = u_time * u_speed * 5.0;6566 float streakScale = 5.0 * u_flowStrength;6768 vec3 cylPos = vec3(69 cos(angle) * streakScale,70 sin(angle) * streakScale,71 (z - t) * 0.272 );7374 float twist = sin(t * 0.1 + z * 0.05) * 2.5;75 float c = cos(twist);76 float s = sin(twist);77 cylPos.xy = mat2(c, -s, s, c) * cylPos.xy;7879 float n = fbm(cylPos);8081 float streak = smoothstep(0.4, 0.8, n);8283 vec3 color = mix(u_colorBottom, u_colorMid, smoothstep(0.3, 0.6, n));84 color = mix(color, u_colorTop, smoothstep(0.6, 1.0, n));8586 float centerFade = smoothstep(0.0, 0.25, radius);87 float edgeFade = smoothstep(1.5, 0.4, radius);8889 vec3 finalColor = color * streak * centerFade * edgeFade * 3.0;9091 finalColor += (fract(sin(dot(vUv + u_time, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * u_grain;9293 gl_FragColor = vec4(clamp(finalColor, 0.0, 1.0), 1.0);94}95`;9697interface VeloraProps extends React.HTMLAttributes<HTMLDivElement> {98 colorBottom?: string;99 colorMid?: string;100 colorTop?: string;101 flowStrength?: number;102// … 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 | |
| Auralisauralis | 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 |
