Revert "feat: enhance Danmuku plugin with batch processing for top calculations"

This reverts commit 1841f754dc.
This commit is contained in:
Harvey Zhao committed 2026-03-05 13:58:53 +08:00
1 parent e112b33f97
commit 3ae89ab349
4 files changed
+65 -251

No files matched your search

@@ -135,29 +135,12 @@ function getDanmuTop({ target, visibles, clientWidth, clientHeight, marginBottom
}
}
function getDanmuTopBatch({ targets, visibles, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {
if (!Array.isArray(targets) || targets.length === 0)
return []
return targets.map((target) => {
return getDanmuTop({
target,
visibles,
clientWidth,
clientHeight,
marginBottom,
marginTop,
antiOverlap,
})
})
}
onmessage = (event) => {
const { data } = event
if (!data.id || !data.type)
return
const fns = { getDanmuTop, getDanmuTopBatch }
const fns = { getDanmuTop }
const fn = fns[data.type]
const result = fn(data)