Skip to content

Commit

Permalink
Merge pull request #31 from maxgribov/develop
Browse files Browse the repository at this point in the history
Animation stepped timingFunction fix
  • Loading branch information
maxgribov authored Feb 7, 2020
2 parents eadc7cf + f411dd0 commit af43bc9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Spine/Animation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import SpriteKit
import simd

class Animation {

Expand Down Expand Up @@ -59,7 +58,7 @@ func setTiming(_ action: SKAction, _ curve: CurveModelType) {

switch curve {
case .linear: action.timingMode = .linear
case .stepped: action.timingFunction = { time in return simd_smoothstep(0, 1, time) }
case .stepped: action.timingFunction = { time in return time < 1.0 ? 0 : 1.0 }
case .bezier(let bezierModel): action.timingFunction = BezierCurveSolver(bezierModel).timingFunction()
}
}
Expand Down

0 comments on commit af43bc9

Please sign in to comment.