feat: Refactor worker.js to use dynamic function dispatch

This commit is contained in:
Harvey Zack committed 2024-06-04 19:12:11 +08:00
1 parent d57a13a2bd
commit 69d99cc478
4 files changed
+15 -7

No files matched your search

@@ -514,7 +514,8 @@ export default class Danmuku {
const distance = clientWidth + danmu.$ref.clientWidth;
// 计算弹幕的top值
const { top } = await this.postMessage({
const { result: top } = await this.postMessage({
type: 'getDanmuTop',
target: {
mode: danmu.mode,
height: danmu.$ref.clientHeight,