Fix some hlint warnings, and more consistency in examples (#167)

* Remove redundant brackets

* Various hlint fixes

* Remove unused language pragrams and other fixes

* Use addStatic more consistently in examples

* Rename remaining usages of sceneAnimation to scene
This commit is contained in:
Jan Hrcek 2020-09-20 16:51:22 +02:00 committed by GitHub
commit 0aca2333e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 240 additions and 275 deletions

View file

@ -33,10 +33,10 @@ main = reanimate $ scene $ do
wait 1
moveDot (V2 0 1) (V2 4 2)
moveDot (V2 (-1) 0) (V2 (-4) 3)
moveDot (V2 (0) 0) (V2 (-4) (-3))
moveDot (V2 (0) 0) (V2 (5) (-2))
moveDot (V2 (6) 2) (V2 2 1)
moveDot (V2 (0) 0) (V2 0 0)
moveDot (V2 0 0) (V2 (-4) (-3))
moveDot (V2 0 0) (V2 5 (-2))
moveDot (V2 6 2) (V2 2 1)
moveDot (V2 0 0) (V2 0 0)
redDot :: V2 Double -> SVG
redDot (V2 x y) = translate x y $ mkGroup
@ -89,12 +89,12 @@ grid = withStrokeColor "grey" $ withStrokeWidth (defaultStrokeWidth * 0.5) $ mkG
[ mkGroup
[ translate
0
(i / (screenHeight) * screenHeight - screenHeight / 2 - screenHeight / 18)
(i / screenHeight * screenHeight - screenHeight / 2 - screenHeight / 18)
$ mkLine (-screenWidth, 0) (screenWidth, 0)
| i <- [0 .. screenHeight]
]
, mkGroup
[ translate (i / (screenWidth) * screenWidth - screenWidth / 2) 0
[ translate (i / screenWidth * screenWidth - screenWidth / 2) 0
$ mkLine (0, -screenHeight) (0, screenHeight)
| i <- [0 .. screenWidth]
]