Skip to content

Commit 7f1fd71

Browse files
committed
Update for 0.18
1 parent 3f775d9 commit 7f1fd71

File tree

4 files changed

+63
-61
lines changed

4 files changed

+63
-61
lines changed

Ease.elm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ inElastic time =
275275
p =
276276
0.3
277277

278-
t' =
278+
t =
279279
time - 1
280280
in
281-
-((2 ^ (10 * t')) * sin ((t' - s) * (2 * pi) / p))
281+
-((2 ^ (10 * t)) * sin ((t - s) * (2 * pi) / p))
282282

283283

284284
{-| -}

elm-package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"Ease"
1111
],
1212
"dependencies": {
13-
"elm-lang/core": "4.0.0 <= v < 5.0.0"
13+
"elm-lang/core": "5.0.0 <= v < 6.0.0"
1414
},
15-
"elm-version": "0.17.0 <= v < 0.18.0"
16-
}
15+
"elm-version": "0.18.0 <= v < 0.19.0"
16+
}

test/Test.elm

Lines changed: 55 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,73 +8,75 @@ import Color exposing (gray, black)
88

99

1010
width =
11-
120
11+
120
1212

1313

1414
height =
15-
64
15+
64
1616

1717

1818
plot : Int -> ( Easing, String ) -> Form
1919
plot i ( f, name ) =
20-
group
21-
[ rect width 1 |> filled gray
22-
, rect width 1 |> filled gray |> moveY height
23-
, path
24-
(List.map (\x -> ( x - width / 2, f (x / width) * height )) [0..width])
25-
|> traced (solid black)
26-
--|> (\ls -> {ls | width = 3}),
27-
, Text.fromString name |> text |> moveY (height + 8)
28-
]
29-
|> move ( (width + 10) * (i % 6) |> toFloat, (-height - 20) * (i // 6) |> toFloat )
20+
group
21+
[ rect width 1 |> filled gray
22+
, rect width 1 |> filled gray |> moveY height
23+
, List.map
24+
(toFloat >> (\x -> ( x - width / 2, f (x / width) * height )))
25+
(List.range 0 (round width))
26+
|> path
27+
|> traced (solid black)
28+
--|> (\ls -> {ls | width = 3}),
29+
, Text.fromString name |> text |> moveY (height + 8)
30+
]
31+
|> move ( (width + 10) * (i % 6) |> toFloat, (-height - 20) * (i // 6) |> toFloat )
3032

3133

3234
title =
33-
Text.fromString "This is a replication of easings.net for testing purposes. You can see the plots are nearly identical."
34-
|> text
35-
|> move ( 200, height + 30 )
35+
Text.fromString "This is a replication of easings.net for testing purposes. You can see the plots are nearly identical."
36+
|> text
37+
|> move ( 200, height + 30 )
3638

3739

3840
main =
39-
let
40-
forms =
41-
title :: List.indexedMap plot easingFunctions
41+
let
42+
forms =
43+
title :: List.indexedMap plot easingFunctions
4244

43-
grouped =
44-
group forms |> move ( -200, 300 )
45-
in
46-
collage 1000 1000 [ grouped ] |> toHtml
45+
grouped =
46+
group forms |> move ( -200, 300 )
47+
in
48+
collage 1000 1000 [ grouped ] |> toHtml
4749

4850

4951
easingFunctions =
50-
[ ( inSine, "inSine" )
51-
, ( outSine, "outSine" )
52-
, ( inOutSine, "inOutSine" )
53-
, ( inQuad, "inQuad" )
54-
, ( outQuad, "outQuad" )
55-
, ( inOutQuad, "inOutQuad" )
56-
, ( inCubic, "inCubic" )
57-
, ( outCubic, "outCubic" )
58-
, ( inOutCubic, "inOutCubic" )
59-
, ( inQuart, "inQuart" )
60-
, ( outQuart, "outQuart" )
61-
, ( inOutQuart, "inOutQuart" )
62-
, ( inQuint, "inQuint" )
63-
, ( outQuint, "outQuint" )
64-
, ( inOutQuint, "inOutQuint" )
65-
, ( inExpo, "inExpo" )
66-
, ( outExpo, "outExpo" )
67-
, ( inOutExpo, "inOutExpo" )
68-
, ( inCirc, "inCirc" )
69-
, ( outCirc, "outCirc" )
70-
, ( inOutCirc, "inOutCirc" )
71-
, ( inBack, "inBack" )
72-
, ( outBack, "outBack" )
73-
, ( inOutBack, "inOutBack" )
74-
, ( inElastic, "inElastic" )
75-
, ( outElastic, "outElastic" )
76-
, ( inOutElastic, "inOutElastic" )
77-
, ( inBounce, "inBounce" )
78-
, ( outBounce, "outBounce" )
79-
, ( inOutBounce, "inOutBounce" )
80-
]
52+
[ ( inSine, "inSine" )
53+
, ( outSine, "outSine" )
54+
, ( inOutSine, "inOutSine" )
55+
, ( inQuad, "inQuad" )
56+
, ( outQuad, "outQuad" )
57+
, ( inOutQuad, "inOutQuad" )
58+
, ( inCubic, "inCubic" )
59+
, ( outCubic, "outCubic" )
60+
, ( inOutCubic, "inOutCubic" )
61+
, ( inQuart, "inQuart" )
62+
, ( outQuart, "outQuart" )
63+
, ( inOutQuart, "inOutQuart" )
64+
, ( inQuint, "inQuint" )
65+
, ( outQuint, "outQuint" )
66+
, ( inOutQuint, "inOutQuint" )
67+
, ( inExpo, "inExpo" )
68+
, ( outExpo, "outExpo" )
69+
, ( inOutExpo, "inOutExpo" )
70+
, ( inCirc, "inCirc" )
71+
, ( outCirc, "outCirc" )
72+
, ( inOutCirc, "inOutCirc" )
73+
, ( inBack, "inBack" )
74+
, ( outBack, "outBack" )
75+
, ( inOutBack, "inOutBack" )
76+
, ( inElastic, "inElastic" )
77+
, ( outElastic, "outElastic" )
78+
, ( inOutElastic, "inOutElastic" )
79+
, ( inBounce, "inBounce" )
80+
, ( outBounce, "outBounce" )
81+
, ( inOutBounce, "inOutBounce" )
82+
]

test/elm-package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
],
99
"exposed-modules": [],
1010
"dependencies": {
11-
"elm-lang/core": "4.0.0 <= v < 5.0.0",
12-
"evancz/elm-graphics": "1.0.0 <= v < 2.0.0"
11+
"elm-lang/core": "5.0.0 <= v < 6.0.0",
12+
"evancz/elm-graphics": "1.0.1 <= v < 2.0.0"
1313
},
14-
"elm-version": "0.17.0 <= v < 0.18.0"
14+
"elm-version": "0.18.0 <= v < 0.19.0"
1515
}

0 commit comments

Comments
 (0)