Skip to content

Commit

Permalink
added easing to transition animation
Browse files Browse the repository at this point in the history
  • Loading branch information
erkal committed Nov 26, 2018
1 parent 84b04ef commit cce2842
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"elm/svg": "1.0.1",
"elm/time": "1.0.0",
"elm-community/dict-extra": "2.4.0",
"elm-community/easing-functions": "2.0.0",
"elm-community/graph": "6.0.0",
"elm-community/intdict": "3.0.0",
"elm-community/undo-redo": "3.0.0",
Expand Down
6 changes: 5 additions & 1 deletion src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Circle2d exposing (Circle2d)
import Colors
import Dict exposing (Dict)
import Direction2d exposing (Direction2d)
import Ease
import Element as El exposing (Color, Element)
import Element.Background as Background
import Element.Border as Border
Expand Down Expand Up @@ -3787,7 +3788,10 @@ mainSvg m =
gFToShow =
case m.animation of
TransitionAnimation { fromGraphAt, toGraphAt, transitionState } ->
GF.transitionGraphFile (Transition.elapsedTimeRatio transitionState)
GF.transitionGraphFile
(Ease.outElastic
(Transition.elapsedTimeRatio transitionState)
)
{ start = graphFileAt fromGraphAt m
, end = graphFileAt toGraphAt m
}
Expand Down

0 comments on commit cce2842

Please sign in to comment.