Permalink
Browse files

Don’t take the shortest route when animating gradient angles

  • Loading branch information...
jonastreub committed Jun 29, 2017
1 parent cfa6db3 commit 338f8401087d4fd695216e81cd41175c89d294de
Showing with 0 additions and 4 deletions.
  1. +0 −4 framer/Gradient.coffee
View
@@ -46,12 +46,8 @@ class exports.Gradient extends BaseClass
fraction = Utils.clamp(fraction, 0, 1)
start = Color.mix(gradientA.start, gradientB.start, fraction, false, model)
end = Color.mix(gradientA.end, gradientB.end, fraction, false, model)
startAngle = gradientA.angle
endAngle = gradientB.angle
normalizer = Utils.rotationNormalizer()
normalizer(startAngle)
endAngle = normalizer(endAngle)
angle = startAngle + (endAngle - startAngle) * fraction
return new Gradient

0 comments on commit 338f840

Please sign in to comment.