Permalink
Browse files

Increased spring tolerance

  • Loading branch information...
nvh committed Feb 15, 2017
1 parent e1ddd6f commit eb38604a7307f2f94bb00ea88724e470e68611b3
Showing with 3 additions and 3 deletions.
  1. +1 −1 framer/Animators/SpringRK4Animator.coffee
  2. +2 −2 test/tests/CurvesTest.coffee
@@ -9,7 +9,7 @@ class exports.SpringRK4Animator extends Animator
tension: 250
friction: 25
velocity: 0
tolerance: 1 / 100
tolerance: 1 / 1000
@_time = 0
@_value = 0
@@ -9,10 +9,10 @@ animatorEquals = (actual, expected) ->
describe "Curves", ->
describe "defaults", ->
it "should have correct defaults", ->
Spring()(time: 1).options.should.eql {tension: 161.7195015916278, friction: 12.716898269296165, velocity: 0, time: 1, tolerance: 0.01, dampingRatio: 0.5, mass: 1}
Spring()(time: 1).options.should.eql {tension: 161.7195015916278, friction: 12.716898269296165, velocity: 0, time: 1, tolerance: 0.001, dampingRatio: 0.5, mass: 1}
it "should listen to setting Framer Defaults", ->
Framer.Defaults.Spring.dampingRatio = 0.3
Spring()(time: 1).options.should.eql {tension: 367.4809527222421, friction: 11.501875628783644, velocity: 0, time: 1, tolerance: 0.01, dampingRatio: 0.3, mass: 1}
Spring()(time: 1).options.should.eql {tension: 367.4809527222421, friction: 11.501875628783644, velocity: 0, time: 1, tolerance: 0.001, dampingRatio: 0.3, mass: 1}
describe "fromString", ->
it "should parse Spring", ->

0 comments on commit eb38604

Please sign in to comment.