|
@@ -1333,23 +1333,27 @@ extension PQStuckPointEditerController {
|
|
|
|
|
|
|
|
|
let jumpTime = Float(selectedTotalDuration) / Float(lastJumpSpeedSelectIndex + 2)
|
|
|
-
|
|
|
- while useAssestDuration < Float(jumpTime) {
|
|
|
-
|
|
|
- if i + 1 >= stuckPointsTemp.count {
|
|
|
- i = 0
|
|
|
+
|
|
|
+ if(jumpTime > 0){
|
|
|
+ while useAssestDuration < Float(jumpTime) {
|
|
|
+
|
|
|
+ if i + 1 >= stuckPointsTemp.count {
|
|
|
+ i = 0
|
|
|
+ }
|
|
|
+
|
|
|
+ let LA = (stuckPointsTemp[i + 1] - stuckPointsTemp[i])
|
|
|
+ useAssestDuration = useAssestDuration + Float(LA)
|
|
|
+
|
|
|
+ i = i + 1
|
|
|
+ clipNum = clipNum + 1
|
|
|
}
|
|
|
-
|
|
|
- let LA = (stuckPointsTemp[i + 1] - stuckPointsTemp[i])
|
|
|
- useAssestDuration = useAssestDuration + Float(LA)
|
|
|
-
|
|
|
- i = i + 1
|
|
|
- clipNum = clipNum + 1
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
- finallyStuckPoints.append(stuckPointsTemp.first ?? 0.0)
|
|
|
- clipPoint(clipCount:clipNum , oldPoints: stuckPointsTemp)
|
|
|
+
|
|
|
+ finallyStuckPoints.append(stuckPointsTemp.first ?? 0.0)
|
|
|
+ clipPoint(clipCount:clipNum , oldPoints: stuckPointsTemp)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
break
|
|
|
case .createStickersModelSpeed, .createStickersModelOnlyMusic:
|
|
@@ -1438,23 +1442,11 @@ extension PQStuckPointEditerController {
|
|
|
|
|
|
finallyStuckPoints.append(stuckPointsTemp.first ?? 0.0)
|
|
|
|
|
|
- clipPoint(clipCount: sticker.clipCount , oldPoints: stuckPointsTemp)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ clipPoint(clipCount: sticker.clipCount + 1 , oldPoints: stuckPointsTemp)
|
|
|
BFLog(message: "finallyStuckPoints\(finallyStuckPoints)")
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if useAssestDurationTemp < assetDuration {
|
|
|
|
|
|
|
|
@@ -1471,26 +1463,22 @@ extension PQStuckPointEditerController {
|
|
|
var b:Float = 0.0
|
|
|
if((lastPointIndex ?? 0) + 1 < stuckPointsTemp.count){
|
|
|
b = stuckPointsTemp[(lastPointIndex ?? 0) + 1]
|
|
|
-
|
|
|
let pointDuration = b - a
|
|
|
|
|
|
let needSpeed = lastAssetDuration / pointDuration
|
|
|
-
|
|
|
|
|
|
if tempSpeed >= 1 {
|
|
|
- if needSpeed >= 0.4 * tempSpeed {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }else{
|
|
|
- BFLog(message: "条件不满足不用补位")
|
|
|
+ if needSpeed < 0.4 * tempSpeed {
|
|
|
+ BFLog(message: "条件不满足不用补位 删除多加的一位")
|
|
|
+ finallyStuckPoints.removeLast()
|
|
|
}
|
|
|
} else {
|
|
|
if needSpeed >= 0.4 * tempSpeed && needSpeed >= 0.2 {
|
|
|
|
|
|
-
|
|
|
}else{
|
|
|
- BFLog(message: "条件不满足不用补位")
|
|
|
+
|
|
|
+ BFLog(message: "条件不满足不用补位 删除多加的一位")
|
|
|
+ finallyStuckPoints.removeLast()
|
|
|
}
|
|
|
}
|
|
|
|