mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-12 00:23:08 +00:00
Use V2 instead of tuples and rename 'sceneAnimation' to 'scene'. (#165)
This commit is contained in:
parent
ff880e7296
commit
d37e71ca94
68 changed files with 140 additions and 214 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue