Set viewbox to 16 by 9. (#11)

* Set viewbox to 16 by 9.

* Update examples and fix process termination bug in driver.

* Add module for constants.


Former-commit-id: 1c77569e771455e674485e2fc58ee57e7df5f3c5
This commit is contained in:
David Himmelstrup 2019-09-18 19:20:14 +08:00 committed by GitHub
commit 89905ebe39
24 changed files with 167 additions and 121 deletions

View file

@ -22,7 +22,6 @@ import Reanimate.Monad
import Reanimate.Signal
import Reanimate.Svg
main :: IO ()
main = reanimate $ mkAnimation 10 $ do
n <- getSignal $ signalFromTo 1 500 signalLinear
@ -33,7 +32,7 @@ main = reanimate $ mkAnimation 10 $ do
where
cached = [ dSvg n | n <- [0..]]
dSvg n = renderDiagram $ withEnvelope (D.rect 320 180 :: SvgDiagram) $
D.scale 5 $ sunflower n
D.scale 0.2 $ sunflower n
mkCoords :: [P2 Double]
mkCoords =[coord (fromIntegral i) | i <- [1..]]