Aurora
The Aurora component creates a stunning, animated aurora borealis effect using WebGL and the OGL library. It renders a fluid, gradient-based animation with customizable colors, amplitude, and blending effects.Overview
Aurora uses shader-based rendering to create smooth, organic wave patterns that simulate the northern lights. The component is highly performant and responsive, automatically adjusting to container size changes.Props
An array of hex color codes that define the gradient color palette. Three colors are recommended for optimal visual effect.
Controls the wave height intensity. Higher values create more dramatic wave patterns. Typical range: 0.5 to 2.0.
Controls the smoothness of the aurora alpha blending. Higher values create softer edges.
Custom time value for animation. If not provided, uses automatic time progression.
Animation speed multiplier. Values below 1.0 slow down the animation, values above 1.0 speed it up.
Usage
Technical Details
WebGL Shaders
The component uses custom GLSL shaders:- Vertex Shader: Simple position-based rendering
- Fragment Shader: Implements Simplex noise for organic wave patterns with color ramping
Performance Considerations
The Aurora component uses hardware-accelerated WebGL rendering for optimal performance. It automatically cleans up resources on unmount to prevent memory leaks.
- Automatically resizes on window resize events
- Uses
requestAnimationFramefor smooth 60fps animation - Properly disposes of WebGL context on component unmount
- Transparent background with proper alpha blending
Customization Examples
Blue-Green Ocean Theme
Fire Theme
Subtle Background
Browser Compatibility
Supported browsers:- Chrome 56+
- Firefox 51+
- Safari 11+
- Edge 79+