mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
chore: Optimize danmuku plugin performance and update configuration handling
This commit is contained in:
1 parent
6719f516a5
commit
264ad16790
3 files changed
+10
-7
No files matched your search
@@ -572,12 +572,13 @@ export default class Danmuku {
|
||||
danmu.$lastStartTime = Date.now();
|
||||
switch (danmu.mode) {
|
||||
// 滚动的弹幕
|
||||
case 0:
|
||||
case 0: {
|
||||
const distance = clientWidth + danmu.$ref.clientWidth;
|
||||
danmu.$ref.style.left = `${clientWidth}px`;
|
||||
danmu.$ref.style.transform = `translateX(${-distance}px)`;
|
||||
danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user