Aurora V2 background effect with interactive glow and shader-driven animation.
- 🌌 Smooth Flow: Aurora flow with starfield background.
- ⚡ High Performance: WebGL-based rendering with resize handling.
- 🎨 Configurable: Adjustable speed, brightness, and colors.
- 🖱️ Interactive: Optional mouse interaction.
- 🛠️ Debug Mode: Built-in visual debug panel for real-time adjustments.
pnpm add @bg-effects/aurora oglNote:
oglis a peer dependency and needs to be installed manually.
<script setup lang="ts">
import { Aurora } from '@bg-effects/aurora'
// Styles are automatically injected by vite-plugin-css-injected-by-js
</script>
<template>
<div style="width: 100vw; height: 100vh; background: #000;">
<Aurora
:speed="1.2"
:brightness="2.0"
:interactive="true"
/>
</div>
</template>| Prop | Type | Default | Description |
|---|---|---|---|
speed |
number |
1.0 |
Animation speed |
brightness |
number |
1.8 |
Brightness intensity |
interactive |
boolean |
true |
Enable mouse interaction |
color1 |
string |
'#7aa2f7' |
Primary aurora color |
color2 |
string |
'#bb9af7' |
Secondary aurora color |
debug |
boolean |
false |
Enable debug panel |
lang |
'zh-CN' | 'en' |
'zh-CN' |
UI language |
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build library
pnpm buildMIT