|
@@ -135,6 +135,10 @@ export function moveSmoothAnimationByPlayTime(time?: number) {
|
|
const noteDuration =
|
|
const noteDuration =
|
|
(nextIndex > state.times.length - 1 ? state.times[state.activeNoteIndex]?.endtime : state.times[nextIndex].time) -
|
|
(nextIndex > state.times.length - 1 ? state.times[state.activeNoteIndex]?.endtime : state.times[nextIndex].time) -
|
|
state.times[state.activeNoteIndex]?.time
|
|
state.times[state.activeNoteIndex]?.time
|
|
|
|
+ // 妙极客曲目 有可能2个音符时值一样
|
|
|
|
+ if(noteDuration <=0 ){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
// 当前时值在该区间的占比
|
|
// 当前时值在该区间的占比
|
|
let playProgress = (currentTime - state.times[state.activeNoteIndex]?.time) / noteDuration
|
|
let playProgress = (currentTime - state.times[state.activeNoteIndex]?.time) / noteDuration
|
|
// 华为手机 fixtime 有个默认0.08的值,所以进度可能为负数 ,这里兼容一下
|
|
// 华为手机 fixtime 有个默认0.08的值,所以进度可能为负数 ,这里兼容一下
|