'use client'; import { forwardRef, HTMLAttributes } from 'react'; export interface NoisePatternProps extends HTMLAttributes { /** Noise opacity */ opacity?: number; /** Noise frequency */ frequency?: number; /** Noise type */ type?: 'fractal' | 'turbulence' | 'uniform' | 'grain'; /** Animation speed (0 = static) */ speed?: number; /** Color */ color?: string; /** Blend mode */ blendMode?: string; } export const NoisePattern = forwardRef( ( { opacity = 0.1, frequency = 0.8, type = 'fractal', speed = 0, color = '#000', blendMode = 'overlay', className, ...props }, ref ) => { const svgId = `noise-${type}-${Math.random().toString(36).substr(2, 9)}`; const animationClass = speed > 0 ? 'animate-noise-shift' : ''; return (
{type === 'fractal' && ( )} {type === 'turbulence' && ( )} {type === 'uniform' && ( )} {type === 'grain' && ( )}
); } ); NoisePattern.displayName = 'NoisePattern'; export default NoisePattern;