Add testsuite.

Former-commit-id: bc34312dfef68bc81fc1257970786ea7b23ee99b
This commit is contained in:
David Himmelstrup 2019-09-09 19:10:31 +08:00
commit 1b17180569
8 changed files with 135 additions and 8 deletions

21
examples/counter.hs Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env stack
-- stack --resolver lts-13.14 runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main (main) where
import Control.Lens
import Data.Text (pack, Text)
import Numeric
import Graphics.SvgTree hiding (Text)
import Reanimate.Driver (reanimate)
import Reanimate.LaTeX
import Reanimate.Monad
import Reanimate.Svg
import Reanimate.Signal
main :: IO ()
main = reanimate $ mkAnimation 2 $ do
s <- getSignal $ signalFromTo 0 (2*60-1) signalLinear
emit $ mkCircle (Num 0, Num 0) (Num s)