chore: Optimize danmuku plugin performance and update configuration handling

This commit is contained in:
Harvey Zack committed 2024-05-29 11:19:13 +08:00
1 parent d0f1f4a76c
commit 4971eaa17c
3 files changed
+1 -9

No files matched your search

@@ -695,7 +695,6 @@ class Danmuku {
return this;
}
stop() {
if (this.isStop) return this;
this.isStop = true;
this.suspend();
window.cancelAnimationFrame(this.timer);
@@ -703,7 +702,6 @@ class Danmuku {
return this;
}
start() {
if (!this.isStop) return this;
this.isStop = false;
this.continue();
this.update();
@@ -716,7 +714,6 @@ class Danmuku {
return this;
}
show() {
if (!this.isHide) return this;
this.isHide = false;
this.$danmuku.style.opacity = 1;
this.option.visible = true;
@@ -724,7 +721,6 @@ class Danmuku {
return this;
}
hide() {
if (this.isHide) return this;
this.isHide = true;
this.$danmuku.style.opacity = 0;
this.option.visible = false;