Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不同轨道怎么设置不同速度? #13

Closed
XiaoIsGood opened this issue May 26, 2022 · 2 comments
Closed

不同轨道怎么设置不同速度? #13

XiaoIsGood opened this issue May 26, 2022 · 2 comments

Comments

@XiaoIsGood
Copy link

如题,想让同一轨道的弹幕速度相同。不同轨道有差异

@hugeorange
Copy link
Owner

暂不支持哈,后续可以考虑加入这一功能

@hugeorange
Copy link
Owner

@XiaoIsGood 不同轨道怎么设置不同速度 该功能已加入,
yarn add js-bullets@latest
参数设置

{
	trackHeight: 35, // 每条轨道高度
	speed: 100, // 速度 100px/s 根据实际情况去配置 
        trackArr: [ { speed: 120 }, { speed: 150 }, ... ]  // 数组索引与轨道序号相对应,当数组长度小于轨道数时降级取 speed 参数
}

详见 README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants