Fix: 烟花/下雨改用clearRect不遮挡背景,雷电次数增至10次更密集
This commit is contained in:
@@ -78,14 +78,9 @@ const RainEffect = (() => {
|
||||
let animId = null;
|
||||
const startTime = performance.now();
|
||||
|
||||
// 画"乌云"背景遮罩(让画面有阴暗感但不完全遮住聊天)
|
||||
ctx.fillStyle = "rgba(30, 40, 60, 0.18)";
|
||||
ctx.fillRect(0, 0, w, h);
|
||||
|
||||
function animate(now) {
|
||||
// 用极轻微的透明背景刷新(保留少量拖尾感)
|
||||
ctx.fillStyle = "rgba(30, 40, 60, 0.08)";
|
||||
ctx.fillRect(0, 0, w, h);
|
||||
// 清除画布(保持透明,不遮挡聊天背景)
|
||||
ctx.clearRect(0, 0, w, h);
|
||||
|
||||
drops.forEach((d) => {
|
||||
d.update();
|
||||
|
||||
Reference in New Issue
Block a user