mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-10 23:52:22 +00:00
* 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
20 lines
649 B
Haskell
Executable file
20 lines
649 B
Haskell
Executable file
#!/usr/bin/env stack
|
|
-- stack runghc --package reanimate
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
module Main (main) where
|
|
|
|
import Reanimate
|
|
|
|
main :: IO ()
|
|
main = reanimate $
|
|
addStatic bg $ playThenReverseA $ drawText `andThen` fillText
|
|
where
|
|
bg = mkBackground "black"
|
|
msg = "\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}"
|
|
glyphs = withStrokeWidth 0.01 $ center $ latexAlign msg
|
|
fillText = mkAnimation 1 $ \t ->
|
|
scale 2 $ withFillColor "white" $ withFillOpacity t glyphs
|
|
drawText = mkAnimation 2 $ \t ->
|
|
scale 2 $
|
|
withStrokeColor "white" $ withFillOpacity 0 $
|
|
partialSvg t glyphs
|