数据结构优化

This commit is contained in:
李琦
2026-01-20 14:31:39 +08:00
parent 05b315013c
commit 946855bff2
16 changed files with 104045 additions and 157 deletions

View File

@@ -95,12 +95,16 @@ const drawStars = () => {
}
}
ctx.globalAlpha = star.alpha
ctx.beginPath()
ctx.arc(star.x, star.y, star.radius, 0, Math.PI * 2)
ctx.fill()
if (ctx) {
ctx.globalAlpha = star.alpha
ctx.beginPath()
ctx.arc(star.x, star.y, star.radius, 0, Math.PI * 2)
ctx.fill()
}
})
ctx.globalAlpha = 1
if (ctx) {
ctx.globalAlpha = 1
}
}
// 生成流星