Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Increased spring tolerance
  • Loading branch information
nvh committed Feb 15, 2017
1 parent e1ddd6f commit eb38604
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion framer/Animators/SpringRK4Animator.coffee
Expand Up @@ -9,7 +9,7 @@ class exports.SpringRK4Animator extends Animator
tension: 250 tension: 250
friction: 25 friction: 25
velocity: 0 velocity: 0
tolerance: 1 / 100 tolerance: 1 / 1000


@_time = 0 @_time = 0
@_value = 0 @_value = 0
Expand Down
4 changes: 2 additions & 2 deletions test/tests/CurvesTest.coffee
Expand Up @@ -9,10 +9,10 @@ animatorEquals = (actual, expected) ->
describe "Curves", -> describe "Curves", ->
describe "defaults", -> describe "defaults", ->
it "should have correct 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", -> it "should listen to setting Framer Defaults", ->
Framer.Defaults.Spring.dampingRatio = 0.3 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", -> describe "fromString", ->
it "should parse Spring", -> it "should parse Spring", ->
Expand Down

0 comments on commit eb38604

Please sign in to comment.