chore:弹幕位置不正确的问题

This commit is contained in:
ShakeFlower 2025-07-05 22:15:06 +08:00
parent 9cab140129
commit cc31f23782

View File

@ -2424,7 +2424,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.fillText(ctxName, content, x + ani.x, y, 'white', '16px Verdana');
})
// 弹幕的最大长度5600再长属于异常数据
const aim = 100 + Math.min(core.calWidth(ctxName, content, '16px Verdana'), 5000);
const aim = 100 + x + Math.min(core.calWidth(ctxName, content, '16px Verdana'), 5000);
ani.mode(linear())
.time(aim / vx)
.absolute()