mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 07:26:45 +00:00
点击烟花特效可以配置彩色
This commit is contained in:
@@ -60,6 +60,9 @@ const BLOG = {
|
|||||||
|
|
||||||
// 鼠标点击烟花特效
|
// 鼠标点击烟花特效
|
||||||
FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || true, // 鼠标点击烟花特效
|
FIREWORKS: process.env.NEXT_PUBLIC_FIREWORKS || true, // 鼠标点击烟花特效
|
||||||
|
// 是否启用彩色的烟花
|
||||||
|
FIREWORKSCOLOR: true,
|
||||||
|
FIREWORKSBIG: true,
|
||||||
|
|
||||||
// 悬浮挂件
|
// 悬浮挂件
|
||||||
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件
|
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || true, // 是否显示宠物挂件
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import anime from 'animejs'
|
import anime from 'animejs'
|
||||||
|
import BLOG from 'blog.config'
|
||||||
|
|
||||||
export const Fireworks = () => {
|
export const Fireworks = () => {
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@@ -17,7 +18,10 @@ export const Fireworks = () => {
|
|||||||
* @param config
|
* @param config
|
||||||
*/
|
*/
|
||||||
function createFireworks(config) {
|
function createFireworks(config) {
|
||||||
const defaultColors = ['102, 167, 221', '62, 131, 225', '33, 78, 194']
|
let defaultColors = []
|
||||||
|
BLOG.FIREWORKSCOLOR
|
||||||
|
? defaultColors = ['255, 20, 97', '24, 255, 146', '90, 135, 255', '251, 243, 140']
|
||||||
|
: defaultColors = ['102, 167, 221', '62, 131, 225', '33, 78, 194']
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
colors: defaultColors,
|
colors: defaultColors,
|
||||||
numberOfParticules: 20,
|
numberOfParticules: 20,
|
||||||
|
|||||||
Reference in New Issue
Block a user