Feat: 新增下雪特效,加强烟花/下雨在浅色背景的显色(发光粒子+深色雨线)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user