mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-12 00:23:08 +00:00
More haddock docs. (#131)
* More haddock docs. * Remove unused imports. * Replace '#' with '&' from Control.Lens
This commit is contained in:
parent
b6975d705d
commit
d1b0a50e51
36 changed files with 310 additions and 142 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue