tweak(wish-tree): 弹幕改为自然首尾相接,不再一行一条
Publish Mini Program Dev Version / publish (push) Successful in 1m3s
Publish Mini Program Dev Version / publish (push) Successful in 1m3s
- 顶部行 12%→14%,树桩3行 68/73/78→70/73/76(间隔3%) - 核心:从'一行同一时刻只一条'改为'前一条完全进入屏幕后就出下一条' 同一时刻屏上可有多条,但首尾相接不重叠,更接近真实弹幕 - 每行发射定时器间隔=duration*0.35(完全进入屏幕约需飘总路程35%) - 弹幕播完后从列表移除,stop时清空屏上弹幕避免残留
This commit is contained in:
@@ -45,14 +45,14 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- 弹幕层(超出30条的心愿缓缓飘过,每行一条完毕再出下一条) -->
|
||||
<!-- 弹幕层(超出30条的心愿缓缓飘过,前一条完全进入后出下一条) -->
|
||||
<view class="danmaku-layer">
|
||||
<block wx:for="{{currentDanmaku}}" wx:key="key" wx:if="{{item}}">
|
||||
<view
|
||||
class="danmaku-item {{item.type === 'paid' ? 'paid' : ''}}"
|
||||
style="top: {{item.top}}%; animation-duration: {{item.duration}}s;"
|
||||
>{{item.content}} · {{item.author}}</view>
|
||||
</block>
|
||||
<view
|
||||
wx:for="{{currentDanmaku}}"
|
||||
wx:key="key"
|
||||
class="danmaku-item {{item.type === 'paid' ? 'paid' : ''}}"
|
||||
style="top: {{item.top}}%; animation-duration: {{item.duration}}s;"
|
||||
>{{item.content}} · {{item.author}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 边缘暗角 -->
|
||||
|
||||
Reference in New Issue
Block a user