# danmu **Repository Path**: weijordan/danmu ## Basic Information - **Project Name**: danmu - **Description**: 弹幕 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2026-03-26 - **Last Updated**: 2026-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 弹幕 demo ## 本地运行 ```bash npm run dev ``` ## Demo 列表 | 序号 | Demo 说明 | 本地访问地址 | --- | --- | --- | --- | | 1 | 基础 demo | http://localhost:8585/demo-basic/demo-basic.html | 2 | 优化后的 | http://localhost:8585/demo-skip/demo-skip.html | 3 | 已滚动距离计算方式的优化(性能提升) | http://localhost:8585/demo-distance/demo-distance.html | | 4 | 丢弃排队时间过长的弹幕 | http://localhost:8585/demo-discard/demo-discard.html ### 弹幕难点和亮点 数据量过大怎么办? - 弹幕数量太多,导致页面卡顿 - 每一条弹幕都需要计算位置,导致页面卡顿 - 弹幕如果速度不一样,那么弹幕的间隔时间应该怎么计算? - 弹幕的间隔时间怎么计算? - 弹幕放的位置怎么计算?防止弹幕重叠 - 如果每一条弹幕字体大小不一样,那么弹幕的间隔时间怎么计算? https://mrluo.life/article/detail/146/danmaku-implement