More haddock docs. (#131)

* More haddock docs.

* Remove unused imports.

* Replace '#' with '&' from Control.Lens
This commit is contained in:
David Himmelstrup 2020-08-07 11:09:15 +08:00 committed by GitHub
commit d1b0a50e51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 310 additions and 142 deletions

View file

@ -1,14 +1,14 @@
#!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ApplicativeDo #-}
module Main (main) where
import Reanimate
import Codec.Picture
import Codec.Picture.Types
import Control.Lens ((^.))
import Control.Lens ((&), (^.))
import Control.Monad
import Data.Monoid
import Graphics.SvgTree
@ -38,7 +38,7 @@ latexExample = sceneAnimation $ do
mapM_ destroySprite sprites
-- Undraw equations
play $ drawAnimation' (Just 0xdeadbeef) 1 0.1 strokedSvg
# reverseA
& reverseA
where
glyphs = svgGlyphs svg
strokedSvg =
@ -80,7 +80,7 @@ drawAnimation' mbSeed fillDur step svg = sceneAnimation $ do
fork $ do
wait (n*step)
play $ mapA fn $ (animate (\t -> withFillOpacity 0 $ partialSvg t tree)
# applyE (overEnding fillDur $ fadeLineOutE sWidth))
& applyE (overEnding fillDur $ fadeLineOutE sWidth))
fork $ do
wait (n*step+(1-fillDur))
newSprite $ do