Use V2 instead of tuples and rename 'sceneAnimation' to 'scene'. (#165)

This commit is contained in:
David Himmelstrup 2020-09-19 22:17:51 +08:00 committed by GitHub
commit d37e71ca94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 140 additions and 214 deletions

View file

@ -22,7 +22,7 @@ main = reanimate $ parA bg latexExample
bg = animate $ const $ mkBackgroundPixel (PixelRGBA8 252 252 252 0xFF)
latexExample :: Animation
latexExample = sceneAnimation $ do
latexExample = scene $ do
-- Draw equation
play $ drawAnimation strokedSvg
sprites <- forM glyphs $ \(fn, _, elt) ->
@ -72,7 +72,7 @@ drawAnimation :: SVG -> Animation
drawAnimation = drawAnimation' Nothing 0.5 0.3
drawAnimation' :: Maybe Int -> Double -> Double -> SVG -> Animation
drawAnimation' mbSeed fillDur step svg = sceneAnimation $ do
drawAnimation' mbSeed fillDur step svg = scene $ do
forM_ (zip [0..] $ shuf $ svgGlyphs svg) $ \(n, (fn, attr, tree)) -> do
let sWidth =
case toUserUnit defaultDPI <$> getLast (attr ^. strokeWidth) of