Local web viewer.

This commit is contained in:
David 2019-03-08 10:37:15 +01:00
commit 41c30b453b
19 changed files with 16998 additions and 9 deletions

25
examples/latex_color.hs Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env stack
-- stack --resolver lts-11.22 runghc --package reanimate
module Main (main) where
import Control.Lens
import Graphics.SvgTree (Number(..))
import Reanimate.Driver (reanimate)
import Reanimate.LaTeX (latex)
import Reanimate.Monad (emit, mkAnimation)
import Reanimate.Svg
main :: IO ()
main = reanimate $ mkAnimation 1 $ do
emit $ mkBackground "black"
emit $ withStrokeWidth (Num 0.1) $
withStrokeColor "white" $
withSubglyphs [0] (withFillColor "blue") $
withSubglyphs [1] (withFillColor "yellow") $
withSubglyphs [2] (withFillColor "green") $
withSubglyphs [3] (withFillColor "red") $
withSubglyphs [4] (withFillColor "darkslategrey") $
svg
where
svg = scale 10 $ center $ latex "\\LaTeX"