Skip to content

Commit 21a89b1

Browse files
committed
chore: reduce max meteors in MeteorEffect across multiple scripts for performance optimization
1 parent c34fbbd commit 21a89b1

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/ChronologyOfStellarTrails/detail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function StartBackground() {
439439

440440
// 创建流星效果
441441
new MeteorEffect(container, {
442-
maxMeteors: 20,
442+
maxMeteors: 5,
443443
zIndex: 1,
444444
});
445445
}

scripts/TwelveOrderStars/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/common/MeteorEffect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MeteorEffect {
4646

4747
// 流星参数
4848
this.meteors = [];
49-
this.maxMeteors = options.maxMeteors || 10;
49+
this.maxMeteors = options.maxMeteors || 5;
5050

5151
// 流星参数配置
5252
this.meteorConfig = {

scripts/index/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ document.addEventListener('DOMContentLoaded', () => {
472472
// 在第二页添加流星效果
473473
if (i == 1) {
474474
new MeteorEffect(pages[i], {
475-
maxMeteors: 15,
475+
maxMeteors: 5,
476476
zIndex: 1,
477477
meteor: {
478478
startXMin: 50,

0 commit comments

Comments
 (0)