Feat: 新增下雪特效,加强烟花/下雨在浅色背景的显色(发光粒子+深色雨线)

This commit is contained in:
2026-02-27 14:22:13 +08:00
parent 215fbd7221
commit 4da2d19b1f
7 changed files with 166 additions and 54 deletions
+6 -1
View File
@@ -51,7 +51,7 @@ const EffectManager = (() => {
/**
* 播放指定特效
*
* @param {string} type 特效类型:fireworks / rain / lightning
* @param {string} type 特效类型:fireworks / rain / lightning / snow
*/
function play(type) {
// 防重入:同时只允许一个特效
@@ -81,6 +81,11 @@ const EffectManager = (() => {
LightningEffect.start(canvas, _cleanup);
}
break;
case "snow":
if (typeof SnowEffect !== "undefined") {
SnowEffect.start(canvas, _cleanup);
}
break;
default:
console.warn(`[EffectManager] 未知特效类型:${type}`);
_cleanup();