樱花飘落特效

This commit is contained in:
Vixcity
2023-01-05 14:55:18 +08:00
parent 62f555af85
commit b3692265bc
3 changed files with 194 additions and 0 deletions

View File

@@ -66,6 +66,9 @@ const BLOG = {
// 烟花色彩,感谢 https://github.com/Vixcity 提交的色彩
FIREWORKS_COLOR: ['255, 20, 97', '24, 255, 146', '90, 135, 255', '251, 243, 140'],
// 樱花飘落特效
SAKURA: process.env.NEXT_PUBLIC_SAKURA || true, // 开关
// 悬浮挂件
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件
WIDGET_PET_LINK: 'https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models

189
components/Sakura.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -25,6 +25,7 @@ import { GlobalContextProvider } from '@/lib/global'
import { DebugPanel } from '@/components/DebugPanel'
import { ThemeSwitch } from '@/components/ThemeSwitch'
import { Fireworks } from '@/components/Fireworks'
import { Sakura } from '@/components/Sakura'
import MusicPlayer from '@/components/MusicPlayer'
const Ackee = dynamic(() => import('@/components/Ackee'), { ssr: false })
@@ -48,6 +49,7 @@ const MyApp = ({ Component, pageProps }) => {
{BLOG.ADSENSE_GOOGLE_ID && <GoogleAdsense />}
{BLOG.FACEBOOK_APP_ID && BLOG.FACEBOOK_PAGE_ID && <Messenger />}
{JSON.parse(BLOG.FIREWORKS) && <Fireworks />}
{JSON.parse(BLOG.SAKURA) && <Sakura />}
{JSON.parse(BLOG.MUSIC_PLAYER) && <MusicPlayer />}
</>